---
updatedAt: 2026-08-07T01:38:23.000Z
agentTools:
  projectIndex: https://docs.onechain.nexus/llms.txt
---

# ONE DEX (Gametoken)

Trade Gametoken pairs on ONE Chain with one sentence — limit / market buy & sell, balance, cancel. OpenClaw-compatible.

<br />

<Callout icon="✨" theme="default">
  ### **Trade Gametoken pairs with one sentence.**

  Executes on-chain orders on the **Gametoken orderbook** at ONE Chain (`612055`), optionally dispatched through an [OpenClaw](https://github.com/openclaw/openclaw) agent. Limit / market buy & sell, cancel, balance, pair list.
</Callout>

***

## 1. Install

The block below is a **natural-language prompt to paste into your AI agent** — not a terminal command.

```text Paste-into-agent prompt
Clone https://github.com/to-nexus/skill-cross-dex-trade into a temporary directory and run the install.sh script inside it to install the cross-dex-trade skill into my environment. Tell me the result in one line when you're done.
```

<Callout icon="🚧" theme="warn">
  ### **Bash execution required.**

  The skill uses `viem` to sign and broadcast real transactions. Browser-only agents can't run it. See §2.
</Callout>

After install, ask your agent to "add `PRIVATE_KEY` to my cross-dex-trade `.env`" and "set `MAX_TRADE_CROSS` to 1" before your first trade.

### Install all ONE skills at once

```text Paste-into-agent prompt
Clone https://github.com/to-nexus/cross-skills-suite into a temporary directory and run the bootstrap.sh script inside it to install every ONE skill into my environment. Tell me which skills succeeded and which failed.
```

***

## 2. Where it runs

### ✅ Supported · CLI agents with Bash access

Claude Code (CLI) · **OpenClaw** (ships `SOUL.template.md`) · Cursor Composer · Codex CLI · Aider · Goose · Gemini CLI · OpenInterpreter · any other Bash-capable CLI.

### ❌ Not supported · Browser / hosted only

Claude.ai (web) · ChatGPT (web) · Gemini (web) · Copilot Chat (web). `viem` and signing keys cannot execute in those environments.

***

## 3. What you can do

| Subcommand      | What it does                                          |
| --------------- | ----------------------------------------------------- |
| 🟢 `pairs`      | List active Gametoken pairs.                          |
| 🟢 `balance`    | Show CROSS + per-pair token balances.                 |
| 🔴 `buy`        | Place a limit buy at a price you specify.             |
| 🔴 `sell`       | Place a limit sell at a price you specify.            |
| 🔴 `market-buy` | Spend up to N CROSS at market. CROSS-spend semantics. |
| 🔴 `cancel`     | Cancel an open order by id.                           |

<Callout icon="✅" theme="okay">
  ### Every trade emits a post-tx `fill` block (filled / partial / open / reverted) so you never confuse a successful tx receipt with an actual fill.
</Callout>

***

## 4. Try it

```text 🇰🇷 Korean
gametoken 활성 페어 보여줘
내 CROSS 잔고 보여줘
RUBYx 31개 0.128 CROSS 에 매수
SHOUT 100개 0.03 에 매도
CROSS 5개로 RUBYx 시장가 매수
RUBYx 주문 12345 취소
openclaw 로 RUBYx 10 개 매수해줘
```

```text 🇺🇸 English
List active gametoken pairs
Show my CROSS balance
Buy 31 RUBYx at 0.128 CROSS
Sell 100 SHOUT at 0.03
Market-buy RUBYx with 5 CROSS
Cancel order 12345 on RUBYx
Use openclaw to buy 10 RUBYx
```

***

## 5. Command reference

| command      | args                        | auth                     | mutation | description                            |
| ------------ | --------------------------- | ------------------------ | -------- | -------------------------------------- |
| `pairs`      | —                           | —                        | read     | Active pair list.                      |
| `balance`    | —                           | PK (for derived address) | read     | CROSS + token balances.                |
| `buy`        | `<symbol> <price> <amount>` | PK                       | tx       | Limit buy.                             |
| `sell`       | `<symbol> <price> <amount>` | PK                       | tx       | Limit sell.                            |
| `market-buy` | `<symbol> <crossSpend>`     | PK                       | tx       | Market buy with CROSS-spend semantics. |
| `cancel`     | `<symbol> <orderId>`        | PK                       | tx       | Cancel an open order.                  |

Env: `PRIVATE_KEY`, `MAX_TRADE_CROSS`, optional `CROSS_RPC_URL`, optional `WALLET_ADDRESS`.

***

## 6. Safety & credentials

<Callout icon="🛑" theme="error">
  ### **This skill signs on-chain transactions.**
</Callout>

| Rail                    | What it does                                                                                |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| **Required credential** | `PRIVATE_KEY` (EOA, `0x` + 64 hex).                                                         |
| **Chain-id check**      | Aborts unless `eth_chainId == 612055`.                                                      |
| `MAX_TRADE_CROSS`       | Per-trade CROSS notional cap. Any trade above aborts before signing.                        |
| **Confirm threshold**   | Trades > 1 CROSS prompt for explicit "yes" in `SKILL.md`.                                   |
| **OpenClaw whitelist**  | The bundled `SOUL.md` only allows the five whitelisted subcommands — never arbitrary shell. |

<Callout icon="💡" theme="default">
  ### **Hosted-agent tip.** Use a disposable wallet. The skill never echoes `PRIVATE_KEY` back to the transcript — it's passed via `process.env` to the spawned `node`.
</Callout>

***

## 7. Troubleshooting

<Accordion title="The tx succeeded but my order isn't filled." icon="fa-info-circle">
  Read the `fill` block in the JSON. `status: "open"` means your limit order is now resting on the book. `status: "partial"` means part filled. The tx receipt alone doesn't tell you fill state — the `fill` block does.
</Accordion>

<Accordion title="wrong_chain" icon="fa-info-circle">
  Your RPC is pointing at a different chain. Remove `CROSS_RPC_URL` override or set it back to `https://mainnet.crosstoken.io:22001/`.
</Accordion>

<Accordion title="max_trade_cap_exceeded" icon="fa-info-circle">
  You set `MAX_TRADE_CROSS` and asked for more than that. Either raise the cap or split the trade.
</Accordion>

<Accordion title="Market-buy filled less than expected." icon="fa-info-circle">
  `market-buy` uses **CROSS-spend semantics**: it spends _up to_ the CROSS you specified, against whatever liquidity is on the book. Thin books mean partial fills.
</Accordion>

<Accordion title="Can I use this without OpenClaw?" icon="fa-info-circle">
  Yes. OpenClaw is optional. The skill works the same from Claude Code / Cursor / any other CLI agent.
</Accordion>