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

# ONE Prediction

Trade YES/NO Shares on the ONE Prediction Market with one sentence. Three interchangeable signing strategies: local PK, Playwright UI, ONEx gateway.

<br />

<Callout icon="✨" theme="default">
  ### **Trade YES/NO Shares with one sentence.**

  Drives the [ONE Prediction Market](https://prediction.crossdefi.io) on ONE Chain (`612055`). Lists active events, shows BILL + CROSS balance + Share holdings, reads settled results, places BILL-denominated YES/NO buy/sell.
</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-prediction into a temporary directory and run the install.sh script inside it to install the cross-prediction skill into my environment. Tell me the result in one line when you're done.
```

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

  All three strategies need a local runtime — Strategy A signs with viem, Strategy B drives Playwright, Strategy C calls the ONEx gateway. Browser-only agents can't run any of them.
</Callout>

### 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 · 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` signing, Playwright, and the ONEx gateway client all need a local Node runtime.

***

## 3. What you can do

| Subcommand       | What it does                                                           |
| ---------------- | ---------------------------------------------------------------------- |
| 🟢 `list-events` | Filterable active event list.                                          |
| 🟢 `get-event`   | Single event detail with live orderbook prices.                        |
| 🟢 `get-results` | Settled market results; `--only-mine` for your redeemables.            |
| 🟢 `balance`     | BILL + CROSS wallet balance; `--with-shares` for active CTF positions. |
| 🔴 `buy`         | Buy YES/NO Shares. DRY-RUN by default. Add `--live` to actually sign.  |
| 🔴 `sell`        | Sell Shares. DRY-RUN by default. Add `--live` to actually sign.        |

<Callout icon="✅" theme="okay">
  ### **Trades are dry-run by default.** You'll see the order envelope, then add `--live` to submit. Optionally `--strategy A|B|C` to force a path; default `auto` prefers A → B → C.
</Callout>

***

## 4. Try it

<Callout icon="💬" theme="default">
  ### **Any natural language works.** Examples below are in English; phrase your intent in whichever language you prefer — the agent forwards your intent, not the wording.
</Callout>

```text Example prompts
List active prediction events
Find the BTC 1-min prediction event
Show my BILL balance and active shares
Open event <id> with live prices
Buy 10 YES shares of event <id> at max 0.55 BILL each — live
Sell all my YES shares of event <id>
Show settled results for event <id> — only mine
Force strategy A on the next trade
```

***

## 5. Command reference

| command       | args                                                                 | auth             | mutation           | description                    |
| ------------- | -------------------------------------------------------------------- | ---------------- | ------------------ | ------------------------------ |
| `list-events` | `[--status ACTIVE\|SETTLED] [--query <q>]`                           | —                | read               | Filterable list.               |
| `get-event`   | `<eventId>`                                                          | —                | read               | Detail + live prices.          |
| `get-results` | `<eventId> [--only-mine]`                                            | optional         | read               | Settled results / redeemables. |
| `balance`     | `[--with-shares]`                                                    | resolved EOA     | read               | BILL + CROSS + CTF Shares.     |
| `buy`         | `<marketId> <UP\|DOWN> <shares> [--live] [--strategy A\|B\|C\|auto]` | A: PK · B/C: PIN | tx (when `--live`) | YES/NO buy.                    |
| `sell`        | `<marketId> <UP\|DOWN> <shares> [--live] [--strategy A\|B\|C\|auto]` | A: PK · B/C: PIN | tx (when `--live`) | YES/NO sell.                   |

Env: `WALLET_ADDRESS`, `MAX_TRADE_BILL` (default `100`, recommend `10` for new users). Strategy vars: `PRIVATE_KEY` (A), `PIN` (B/C).

***

## 6. Safety & credentials

<Callout icon="🛑" theme="error">
  ### **This skill signs EIP-712 orders that lock BILL collateral.**
</Callout>

| Rail                        | What it does                                                                                                                                                                                                           |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **DRY-RUN by default**      | Trades only sign when `--live` is passed.                                                                                                                                                                              |
| **Required credential**     | A: `PRIVATE_KEY` (64 hex). B/C: `PIN` (6 digit). Plus optional `WALLET_ADDRESS` cross-check.                                                                                                                           |
| **Chain-id check**          | Re-verifies `eth_chainId == 612055`.                                                                                                                                                                                   |
| `MAX_TRADE_BILL`            | Worst-case notional (`shares × maxPrice`) is compared to the cap.                                                                                                                                                      |
| **User confirmation**       | `SKILL.md` renders the parsed intent (event, side, price, amount, total, MAX cap, chosen strategy) and asks for explicit confirmation (`yes` / `proceed` / equivalent in your language) before any trade > 1 BILL.     |
| **Address mismatch abort**  | If `WALLET_ADDRESS` is set and the resolved EOA differs, abort with `ADDRESS_MISMATCH`.                                                                                                                                |
| **Strategy C approval gap** | Strategy C can't send on-chain `BILL.approve` / `CTF.setApprovalForAll`. If allowance is missing, abort with `APPROVAL_GAP` and instruct you to do one tiny manual trade through the website UI to set approvals once. |

<Callout icon="💡" theme="default">
  ### **Hosted-agent tip.** Use a disposable wallet. Secrets handling: `PRIVATE_KEY` / `PIN` / SIWE-derived JWT never appear in the conversation transcript or in process argv.
</Callout>

***

## 7. Troubleshooting

<Accordion title="ADDRESS_MISMATCH" icon="fa-info-circle">
  Your `WALLET_ADDRESS` env doesn't match the EOA that strategy A/B/C resolved. Either remove the env override or update it.
</Accordion>

<Accordion title="APPROVAL_GAP on Strategy C." icon="fa-info-circle">
  Strategy C (ONEx gateway) only signs messages, not transactions. Do one tiny manual trade through the website UI once to grant `BILL.approve` and `CTF.setApprovalForAll`. After that, Strategy C is autonomous.
</Accordion>

<Accordion title="Strategy B opened a browser unexpectedly." icon="fa-info-circle">
  That's `_login-capture.mjs` running its one-time auth capture (headful). Subsequent trades are headless and reuse `.auth/state.json`.
</Accordion>

<Accordion title="The trade returned dry_run." icon="fa-info-circle">
  You didn't pass `--live`. Re-issue with: _"... — live"_.
</Accordion>

<Accordion title="My settled position shows redeemable but I never received funds." icon="fa-info-circle">
  Outcome redemption is a planned v0.4 addition — for now, redeem manually on the website. `get-results --only-mine` will surface the positions awaiting redemption.
</Accordion>