skills/okx-dex-strategy/SKILL.md
Limit-order strategy trading on OKX Agentic Wallet. Use this skill when the user wants to place a price-triggered limit order (buy a dip, take profit, stop loss, chase a high), cancel one or more pending orders, list active or historical orders, or resume orders that have been suspended by SA TEE upgrades. Distinct from okx-dex-swap (market orders, immediate execution at the best available aggregated price). Strategy orders are stored on the Agentic Wallet TEE and execute automatically when the user-defined trigger fires. Trigger phrases: limit order, place limit order, buy at price, sell when price reaches, take profit at, stop loss at, chase high, buy dip, cancel order, cancel all orders, my orders, list orders, active orders, suspended orders, resume orders, recover suspended orders, trader mode, agentic limit order.
npx skillsauth add okx/onchainos-skills okx-dex-strategyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
4 subcommands that wrap the Agentic Wallet limit-order surface — create-limit, cancel, list, resume. SA activation (Trader Mode upgrade / re-upgrade) is performed transparently by the CLI when the BE returns UPGRADE_REQUIRED; the skill does not need to expose that detail.
Read
../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, fall back to_shared/preflight.md. Strategy endpoints require an authenticated Agentic Wallet session — confirm login before running any subcommand.
This section is the canonical rule for user-facing strings. Every other section in this skill defers to it.
Canonical Display labels — the only strings the agent may surface to the user. The CLI returns these directly (statusLabel) for status; for strategyType the agent looks them up from the §strategyType and §status tables below.
| Surface | Canonical EN Display labels |
|---|---|
| strategyType (4 values) | Buy Dip / Take Profit / Stop Loss / Buy Above |
| status (9 values) | Expired / Cancelling / Cancelled / Failed / Trading / Completed / Creating / Active / Suspended |
Translation rule — match the user's conversation language. Display labels above are canonical English. When the user converses in another language, the agent translates the label at output time to match the conversation language.
Never (these rules apply everywhere in this skill):
BUY_DIP, CHASE_HIGH, COMPLETED, …) to the user,buy_dip, chase_high, completed, cancelled, …) to the user,statusLabel verbatim when the user is conversing in a non-English language — translate it.Notes:
Buy Above in English (not "Chase High").okx-dex-swap| User intent | Skill |
|---|---|
| "Swap X for Y now" / "Buy 0.5 ETH with USDC" | okx-dex-swap (market order, immediate execution) |
| "Buy ETH if it dips to $2000" / "Sell when ETH hits $5000" / "Take profit at X" / "Stop loss at Y" | this skill (price-triggered limit order) |
| "Cancel my pending order" | this skill |
| "What limit orders do I have?" | this skill |
If the venue is named explicitly (Uniswap, PancakeSwap, Raydium, Curve, ...) → re-route to okx-dapp-discovery. This skill is for OKX-aggregated limit orders only.
onchainos strategy create-limitPlace a single price-triggered limit order.
onchainos strategy create-limit \
--chain-id <id|alias> \
--from-token <address> \
--to-token <address> \
--amount <decimal-string> \
--direction <buy|sell> \
--trigger-price <usd> \
[--current-price <usd>] \
[--slippage <value>] \
[--mev-protection <on|off|default>] \
[--expires-in <secs>]
| Flag | Required | Notes |
|---|---|---|
| --chain-id | Y | Chain id or alias: 1, solana, bsc, arbitrum, base, xlayer |
| --from-token | Y | Sell-side token contract address |
| --to-token | Y | Buy-side token contract address |
| --amount | Y | Amount of from_token to sell (string, no precision loss) |
| --direction | Y | buy or sell (case-insensitive). Strategy type is derived from --direction + --trigger-price + the current market price; the agent does not pass a strategy type explicitly. |
| --trigger-price | Y | USD trigger price. Required for strategy type derivation. |
| --current-price | N | Current USD price of the comparison token (to-token for buy, from-token for sell). When omitted the CLI fetches it via market price. Pass it to skip the extra HTTP round-trip when the agent already retrieved the price for the confirmation page. |
| --slippage | N | Slippage in percent. Default 15. Pass the percent as a plain number (slippage 20% → --slippage 20). Note 0.05 = 0.05%, NOT 5% — for 5% pass --slippage 5. |
| --mev-protection | N | Tri-state on / off / default (default = default; default = BE picks). |
| --expires-in | N | Order TTL in seconds. Default 604800 (7 days) — see §Default order expiry. |
Output (JSON, always — the CLI has no human-format mode):
{
"ok": true,
"data": {
"orderId": "<id>",
"status": <int>,
"statusLabel": "<label>",
"estimatedWaitTime": <int|null>,
"eventCursor": "<string|null>"
}
}
Solana orders return estimatedWaitTime=0 — the order is queryable immediately; for all other chains the agent follows §Async wait pattern (fixed 3-second sleep before re-querying).
BE default = 7 days (604800 seconds). All other "7 days" mentions in this skill derive from here.
Strategy orders are only supported on these 6 chains. Any other chain MUST be rejected upfront by the agent — do not call create-limit and do not even open the Step 1 confirmation.
| chainIndex | Name | --chain-id aliases |
|---|---|---|
| 1 | Ethereum | ethereum, eth, 1 |
| 56 | BSC | bsc, 56 |
| 196 | X Layer | xlayer, 196 |
| 501 | Solana | solana, sol, 501 |
| 8453 | Base | base, 8453 |
| 42161 | Arbitrum | arbitrum, arb, 42161 |
Pre-flight rule (agent): when the user mentions a chain, resolve it to its chainIndex and check this list. If the chain is not in the table (e.g. Polygon 137, Optimism 10, Avalanche 43114, Linea 59144, Sui 784, Tron 195, ...), respond directly with:
Strategy orders are only supported on Ethereum / BSC / X Layer / Solana / Base / Arbitrum right now.
<requested chain>is not supported — pick one of these to continue.
Do NOT proceed to Step 1 confirmation. Do NOT call the CLI. The CLI also defends against this (validates against the same 6-chain whitelist before BE), but the agent catching it earlier saves a round trip and gives a clearer message tied to the user's exact phrasing.
strategyType enum + derivationstrategyType is fully derived inside the CLI from (--direction, --trigger-price, current market price) — there is no --type flag and the agent never passes or computes the integer. This single table covers both uses: deriving the Display label for the Step 1 confirmation page, and mapping the strategyType integer in list responses back to a Display label. The Display label is the only user-facing string (see §Display labels & output language).
| strategyType (int) | Enum name | Direction | trigger vs current | Display label | Semantics | |---|---|---|---|---|---| | 2 | BUY_DIP | buy | trigger < current | Buy Dip | Buy when price falls to trigger | | 5 | CHASE_HIGH | buy | trigger ≥ current | Buy Above | Buy when price rises above trigger | | 3 | TAKE_PROFIT | sell | trigger > current | Take Profit | Sell when price rises to trigger | | 4 | STOP_LOSS | sell | trigger ≤ current | Stop Loss | Sell when price falls to trigger |
Equality folds into the aggressive side (CHASE_HIGH / STOP_LOSS), matching the CLI.
Agent flow:
--direction <buy|sell>.onchainos market price --chain <chain> --address <token>, read data[0].price. For BUY direction query the to-token's current price; for SELL direction query the from-token's current price. The agent needs this for (a) Step 0 USD-value pre-flight, (b) the Step 1 confirmation page "Trigger Price vs current", and (c) computing the Display label per the table above.--current-price <usd> to the CLI so it does not re-fetch. (If the agent omits it, the CLI fetches the same value itself — correct but one extra round-trip.)create-limit is a write operation. The agent MUST present a confirmation summary to the user first and only call the CLI after the user explicitly confirms. The CLI itself does not gate (it calls BE directly); this contract is enforced at the skill layer.
Step 0 — Minimum order value pre-flight (must run before Step 1):
BE enforces a minimum order value of $1 USD (returns error 100010 ORDER_AMOUNT_TOO_SMALL otherwise). To avoid wasting a round-trip and a confirmation page on an amount that BE will reject, the agent MUST verify the from-side USD value first.
from_price ≈ 1.0 without an HTTP call.onchainos market price --chain <chain> --address <from_token>, read data[0].price as from_price.usd_value = from_amount × from_price.usd_value < 1.0:
Compute min_from_amount = ceil(1.0 ÷ from_price) rounded up to a reasonable display precision for the token (e.g. whole units when from_price ≥ 0.1; 2-4 significant digits otherwise).
Surface exactly this single canonical line to the user, with no extra prose — no USD-value math, no $1 threshold mention, no echo of the user's original amount, no follow-up sentence, no apology:
Minimum order amount: <min_from_amount> <from_symbol>
Translate the prefix at output time per §Display labels & output language (e.g. for a Chinese user the agent renders the same fact in Chinese). The structure stays single-line: <localised prefix> <min_from_amount> <from_symbol>.
STOP. Do NOT render Step 1. Do NOT call the CLI. Wait for the user to provide a larger --amount, then re-run Step 0 from the top.
usd_value ≥ 1.0: carry from_price forward (Step 1's "Value" column reuses it; no need to re-fetch) and proceed to Step 1.Example (user wants to spend 1 OKB on a chain where OKB ≈ $0.10):
from_price = 0.10, usd_value = 1 × 0.10 = 0.10 < 1.0 → failmin_from_amount = ceil(1.0 / 0.10) = 10Minimum order amount: 10 OKBStep 1 — Show the order summary for the user to confirm. Five top-level categories with sub-items; the agent may freely organise prose at runtime, but no category may be dropped:
| # | Category | Sub-items | Source |
|---|---|---|---|
| 1 | Chain | — | Human-readable chain name resolved from --chain-id (Arbitrum / BSC / Solana / ...) |
| 2 | Order Type | Display label per the §strategyType table (Buy Dip / Take Profit / Stop Loss / Buy Above) — translate per §Display labels & output language | Derived per "Strategy type derivation" above |
| 3 | From token | Symbol (e.g. USDC); Amount (e.g. 10) | Symbol from token metadata; Amount is raw --amount value |
| 4 | To token | Symbol (e.g. ARB); Trigger Price (e.g. $0.10, USD-denominated); Estimated Amount (predicted to-token amount); Value (estimated USD value) | Symbol/Trigger Price direct; Estimated Amount and Value computed by the agent — see formulas below |
| 5 | Slippage | Either Default 15% (user did not mention slippage) or User-specified X% (user explicitly said "slippage X%") | See Slippage display rules below |
Estimated Amount / Value formulas:
Estimated Amount = from_amount ÷ trigger_price (in units of to-token)Value = from_amount × from_token_USD_price (if from is a stablecoin, ≈ from_amount)Estimated Amount = from_amount × trigger_price (in units of to-token, usually a stablecoin)Value = from_amount × trigger_price (if to is a stablecoin, equals Estimated Amount)Slippage display rules:
Slippage: Default 15%, and omit --slippage on the CLI call (the CLI default is 15).Slippage: User-specified X%, and pass --slippage X on the CLI call.Structural example (display labels come from the §strategyType / §status tables; see §Display labels & output language for the cross-cutting rule):
1. Chain: Arbitrum
2. Order Type: Buy Dip
3. From: USDC 10
4. To:
- Symbol: ARB
- Trigger Price: $0.10
- Estimated Amount: 100 ARB
- Value: $10
5. Slippage: 15% (default)
If the trigger condition is not met within 7 days, this order auto-expires.
Reply confirm / change / cancel.
Expiry note (mandatory): After the 5 categories and before the reply prompt, the agent must surface that the limit order auto-expires 7 days after creation if the trigger never fires. Default phrasing: If the trigger condition is not met within 7 days, this order auto-expires.
Step 2 — Handle the user's reply:
onchainos strategy create-limit ....Hard constraints:
- Never call
strategy create-limituntil the user has explicitly confirmed.Estimated Amount/Valueare agent-side estimates derived fromtrigger_price, not BE quotes. The realised fill amount is decided at BE execution time by slippage and aggregator routing; the agent must not present these estimates as "actual fill amounts".--trigger-priceis a USD price. The agent must make this clear to the user to avoid confusion with "exchange rate = X from-token per 1 to-token".- Never render Step 1 when Step 0's USD-value check fails. Output the single-line minimum-amount warning instead and stop — the user must restart with a larger
--amount.
onchainos strategy cancelCancel a single, batch, or all active orders. Pass exactly one of the three flags:
onchainos strategy cancel --order-id <id>
onchainos strategy cancel --order-ids id1,id2,...
onchainos strategy cancel --all
Output (JSON): {ok:true,data:{updateNum:N,estimatedWaitTime:null|n}}. updateNum is the count BE accepted, not the count that reached terminal state — re-query with list after the wait.
onchainos strategy listonchainos strategy list \
[--order-id <id>] \
[--status active,suspended,...] \
[--chain-id 1,501] \
[--token <address>] \
[--limit <int>] \
[--cursor <string>] \
[--strategy-mode 7]
Two modes:
--order-id <id> → GET openOrderDetail (returns full order shape).--order-id → POST getOpenOrder. The active wallet's addresses are auto-supplied; pass --limit (max 100, default 100) and --cursor from the previous response's nextCursor for pagination.Flag CSV support — --status and --chain-id accept comma-separated lists; --token accepts a single address only. For multi-token queries, call list once per token and merge the results.
Full
getOpenOrderrequest-body schema (auto-injected fields, flag mapping): see references/backend-schema.md.
status enumFull 10-state mapping — agent reads data.list[].status integer and looks up the display label here:
| Int value | Enum name | CLI --status value | Display label | Terminal? |
|---|---|---|---|---|
| -7 | EXPIRED | expired | Expired | Yes |
| -3 | CANCELLING | cancelling | Cancelling | No (transient) |
| -2 | CANCELLED | cancelled | Cancelled | Yes |
| -1 | FAILED | failed | Failed | Yes |
| 0 | TRADING | processing or trading | Trading | No |
| 1 | COMPLETED | completed | Completed | Yes |
| 2 | CREATING | creating | Creating | No |
| 3 | ACTIVE | active | Active | No |
| 4 | SUSPENDED | suspended | Suspended | No |
SPEEDING_UP (-4) is not a valid filter option. CLI's
statusLabelalready returns the display label (the only user-facing string); translate per §Display labels & output language.
Non-terminal set (5): {-3, 0, 2, 3, 4} = CANCELLING / TRADING / CREATING / ACTIVE / SUSPENDED
Terminal set (4): {-7, -2, -1, 1} = EXPIRED / CANCELLED / FAILED / COMPLETED
Default status filter (when --status is omitted): the CLI sends the 5 non-terminal states [-3, 0, 2, 3, 4] (CANCELLING / TRADING / CREATING / ACTIVE / SUSPENDED); terminal orders (Cancelled / Completed / Failed / Expired) are excluded by default — "show my orders" almost always means live ones.
To see terminal orders the agent must pass --status explicitly:
| User intent | --status value to pass |
|---|---|
| "show my completed orders" | completed (orderStatusList=[1]) |
| "show my cancelled orders" | cancelled (orderStatusList=[-2]) |
| "show failed orders" | failed (orderStatusList=[-1]) |
| "show expired orders" | expired (orderStatusList=[-7]) |
| "show all orders including terminal" | active,suspended,creating,trading,cancelling,completed,cancelled,failed,expired (full 9) |
| "show my live orders" / no qualifier | (omit --status — uses non-terminal default) |
--status accepts comma-separated values; each entry is either an integer (e.g. 4) or a string label (active, suspended, processing, creating, cancelling, cancelled, completed, failed, expired).
User prompts that match this rule include: "show my strategy orders" / "list orders" / "show my limit orders" / "what orders do I have" — i.e. any general "show me my orders" intent without a status qualifier.
Steps the agent must follow:
Run onchainos strategy list --limit 10 (no --status) — the CLI puts orderStatusList=[-3, 0, 2, 3, 4] (non-terminal set) into the request body; BE applies the filter server-side and returns only matching orders. Always pass --limit 10 for general "show my orders" queries; full pagination is opt-in via "next page" follow-up.
Render the response data.list as a Markdown table with exactly these 8 columns (locked):
| Order id | Order Status | Order Type | Estimated Amount | To Token addr | Value | Trigger price | Expire after | |---|---|---|---|---|---|---|---|
Per-row mapping (order matters, no extra columns):
| Column | Source | Notes |
|---|---|---|
| Order id | data.list[i].orderId | — |
| Order Status | data.list[i].statusLabel (Display label per the §status table) | Translate per §Display labels & output language |
| Order Type | Display label per the §strategyType table, derived from data.list[i].strategyType integer (2 → Buy Dip / 3 → Take Profit / 4 → Stop Loss / 5 → Buy Above) | Translate per §Display labels & output language |
| Estimated Amount | data.list[i].toToken.tokenAmount + + data.list[i].toToken.tokenSymbol | e.g. 0.2 SOL |
| To Token addr | data.list[i].toToken.tokenContractAddress, truncated to first-6 + last-4 | EVM: 0x1234...cdef (0x + 4 chars + ... + 4 chars); Solana base58: first 6 + ... + last 4 |
| Value | data.list[i].toToken.tokenUsd, formatted as <n> USD | e.g. 16 USD (round or 2-decimal, follow BE precision) |
| Trigger price | data.list[i].triggerInfo.triggerPrice, prefixed with $ | e.g. $80; if empty (trigger-rate path, not currently used) display data.list[i].triggerInfo.triggerRate |
| Expire after | data.list[i].expireTime (13-digit ms UTC), converted to the user's current timezone, formatted MM/DD/YYYY HH:MM:SS | e.g. 05/15/2026 17:50:49 (semantically = createTime + 7 days by default) |
Sample row (Solana SOL→USDC take_profit):
| 17262791359882688 | Active | Take Profit | 0.2 SOL | 9xQeWv...vEjz | 16 USD | $80 | 05/15/2026 17:50:49 |
Address shortening rules:
0x prefix): first 6 chars (0x + 4) + ... + last 4 chars... + last 4Expire timezone conversion:
expireTime from BE is a UTC millisecond timestampIntl.DateTimeFormat, Rust chrono::Local, or equivalent)MM/DD/YYYY HH:MM:SS, 24-hour clockAfter the table, append a single combined reminder covering pagination + status filter. Include the pagination line only when nextCursor is non-empty.
Canonical EN; the agent translates per §Display labels & output language:
Showing live orders by default (10 per page).
- Reply "next page" to load more.
- To filter by a specific state, ask for orders by their Display label — e.g.
Completed,Cancelled,Failed,Expired. Example: "show my completed orders" → I'll re-query with that filter.
If nextCursor is empty (no more pages), drop the "next page" bullet and keep only the status-filter bullet.
If the user replies "next page" / similar, re-run with --limit 10 --cursor <nextCursor> carrying the previous response's nextCursor. Render with the same table format.
If the user names a specific status (any of the 9 Display labels), re-run as list --limit 10 --status <label> (single value) and render the same table. Drop the status-filter bullet from the reminder; keep the pagination bullet if nextCursor is non-empty.
onchainos strategy resumeonchainos strategy resume # auto-discover all SUSPENDED + canResume=true on active wallet
onchainos strategy resume --order-ids id1,id2 # explicit
When ids are omitted, the CLI runs list filtered to status=4 and keeps only orders whose canResume flag is true; the discovered ids are then submitted to reactivate. After resume, the agent should advise the user that orders whose trigger condition was already met may execute immediately — re-query with list to confirm.
The CLI surfaces the BE error code in human-readable form. Map each code to a recommended next step:
| Code | Name | What the agent should do |
|---|---|---|
| 100 | REQUEST_PARAM_ERROR | Surface the BE message; ask the user to fix the offending flag |
| 10019 | INSUFFICIENT_NATIVE_GAS_BALANCE | Wallet's native token balance is below the BE-required minimum (the response msg includes minAmount = <N>, e.g. 0.001 BNB on BSC). Tell the user their native gas balance is insufficient to pay this chain's gas fees and prompt them to top up — deposit from an exchange, transfer from another account, or swap a stablecoin to native via onchainos swap execute. Do NOT auto-retry. |
| 10026 | JWT_TOKEN_VERIFY_FAILED | Suggest onchainos wallet login then retry |
| 10106 | CHAIN_NOT_SUPPORT_ERROR | Tell the user the chain is not supported; suggest a supported alternative |
| 60002 | NO_ORDER_FOUND | Cancel/resume target id is wrong or already terminal — suggest list |
| 60003 | LIMIT_ORDER_NO_AUTHORITY | Trader Mode may not be activated yet; the next CLI call will trigger SD-A automatically — retry once |
| 60006 | LIMIT_ORDER_OUT_LIMIT_FAIL | Pending order count is at the per-account limit (max 100); ask the user to cancel some pending orders (cancel --all or cancel --order-id) and retry |
| 60009 | LIMIT_ORDER_ILLIQUIDITY_ERROR | No liquidity for the pair at the trigger; suggest a different pair or wider trigger |
| 60014 | LIMIT_ORDER_EXPIRED_CANNOT_OPERATE | Order already expired |
| 60015 | LIMIT_ORDER_PENDING_CANNOT_OPERATE | Order is mid-lifecycle; wait for terminal state |
| 60017 | LIMIT_ORDER_SUCCESS_CANNOT_OPERATE | Order already completed |
| 60018 | LIMIT_ORDER_TEE_SA_VERSION_UPGRADE_REQUIRED | Transparent — CLI handles via SD-A retry; the agent should NOT see this code in normal flow. If it leaks, just retry the same command |
| 60030 | QUOTA_EXCEEDED | Account-level quota reached |
| 100005 | WALLET_ADDRESS_BLACKLISTED | Wallet address flagged by risk control; ask the user to contact support — do not retry |
| 100007 | TEE_SIGN_FAILURE | Transient TEE issue — retry once |
| 100010 | ORDER_AMOUNT_TOO_SMALL | Order value is below the BE-enforced minimum of $1 USD. Ask the user to increase --amount so the order value clears $1, then retry |
| 100008 | TEE_SERVICE_UNAVAILABLE | TEE service is temporarily unavailable; ask the user to retry later |
| 100012 | LIMIT_ORDER_INSUFFICIENT_BALANCE | Insufficient balance; suggest checking with onchainos wallet balance |
Match by integer code, not msg string. The msg text is for humans and may change.
executionHistoryList[].code)Emitted by the TEE swap-trade engine while it executes an active order. Read the latest entry first; older entries are historical context. For each recognised code the CLI injects three fields next to the raw code:
| Field | Use |
|---|---|
| name | Internal label; do NOT surface to the user |
| message | Surface verbatim to the user (translate per §Display labels & output language) |
| terminal | true ⇒ engine will not retry; stop polling and surface. false ⇒ engine retries; safe to wait |
Unrecognised codes pass through with name / message / terminal absent — surface the raw BE msg if present, else "event code <N>".
executionHistoryList[] item; older entries are historical context only.txHash appearing, the engine is in a soft retry loop. Surface the latest message, mention the repeat count ("this is the 5th No quote due to low liquidity event"), and ask the user whether to wait, cancel, or adjust parameters.terminal=true codes. Stop polling immediately and surface to the user; engine will not retry.terminal=false codes that repeat 3+ times. Treat as user-actionable: suggest changing slippage / amount / pair / chain, or cancelling.0 with txHash. Trade succeeded; surface txHash and explorer link.The message field is the user-facing string. The agent additionally chooses one of these action hints based on code:
| code | what the agent should do |
|---|---|
| 0 | report success; surface txHash + explorer link |
| 3013 | suggest topping up the from-token or recreating with smaller amount |
| 3014 | tell user to fund the chain's native fee token (SOL / ETH / BNB / ...) |
| 3015 | suggest widening --slippage |
| 3016 | non-transient — suggest different pair, smaller amount, wider trigger, or different chain |
| 3017 | engine retries; if recurring 3+ times, treat like 3016 |
| 3019 | terminal — destination token is blocklisted; order will not execute |
| 3020 | terminal — wallet address is flagged; surface explicitly |
| 3023 | recreate with longer --expires-in |
Codes outside this table: read terminal from the CLI output. terminal=true ⇒ surface and stop. terminal=false ⇒ surface and wait one more cycle.
create-limit, cancel, and resume return after the request has been accepted, not after the order reached a terminal state. The CLI surfaces estimatedWaitTime (seconds, BE-supplied — typically 0 for Solana, ~3 for BSC, ~12 for ETH-class chains).
Agent recipe (locked):
estimatedWaitTime; the BE-supplied number is conservative and inflates the wait unnecessarily.onchainos strategy list --order-id <orderId> to read the final state.Do not run a long polling loop. The CLI is not designed for that; the BE backs the order finalisation off-chain and one targeted re-query is sufficient in normal conditions.
Trader Mode upgrade / re-upgrade is performed transparently by the CLI:
create-limit or resume, if the BE returns code 60018 (UPGRADE_REQUIRED), the CLI activates Trader Mode transparently and retries the original op once. On success the user sees Trader Mode activated. followed by the normal command output.onchainos wallet status to inspect the session.All strategy subcommands always emit the standard onchainos JSON envelope {ok: true, data: { ... }} on stdout. There is no --format flag — strategy CLI is agent-facing, so structured JSON is the only output and the agent renders any user-visible tables (e.g. the §list 8-column Markdown table) from that JSON.
Symbol→address resolution is out of scope — pass --from-token / --to-token as contract addresses directly.
Full current-limitations list: see references/backend-schema.md.
development
Surfaces social-layer signals for crypto markets. Three capability groups: news (latest aggregated crypto news feed, filter articles by coin symbol, run full-text keyword searches, fetch a single article in full, and list available upstream platforms — blockbeats, odaily, theblock and similar — for use as filters); sentiment (rank coins by social mention volume over 1h / 4h / 24h, plus per-coin bullish/bearish/neutral counts with an optional time-bucketed trend); vibe (per-contract hotness score over 24h / 72h / 7d / 30d with timeline and sample KOLs per bucket, plus a TOP50 KOL leaderboard sortable by engagement, mentions, or impressions). Triggers: 'latest crypto news', 'BTC headlines', 'search news for X', 'is BTC bullish', 'hottest coins by chatter', 'who is tweeting about <token>', 'vibe score', 'first-mention KOL', and Chinese variants like '最新加密新闻', '搜索新闻', '市场情绪', '情绪排行', 'KOL榜', '热度走势'. Also handles x402/402 payment, quota, MARKET_API_*_OVER_QUOTA, and confirming:true notifications on social endpoints.
documentation
Onchain OS entry router for open-ended onboarding questions. Renders a welcome banner with a Quick-start menu and routes the user into the right skill or workflow (Polymarket, DeFi APY, smart-money signals, new-token screening, daily on-chain brief). Triggers: 'what is onchainos', 'what is onchain os', 'what does this do', 'what can it do', 'what can I do here', 'how do I use this', 'how do I play', 'how to use onchainos', 'how to play onchainos', 'how does this work', 'how do I start', 'getting started', 'how do I get started', 'tutorial', 'onboarding', 'first time', 'I just installed', 'now what', 'what do I do now', 'where do I start', 'who are you', 'what are you', 'introduce yourself', 'introduction', 'introduce onchainos', 'tell me about onchainos', 'I'm new'.
testing
List OKX Agentic Wallet exclusive trading competitions, register users for contests, track participation and leaderboard rankings, and claim won rewards. Use when users want to list available trading competitions or trading cups, view competition rules / prize pool / total prizes, register or sign up or enroll or join a contest, check the leaderboard (who is winning) or their own rank (am I in the prize zone, what is my place), ask did I win or query participation / claim status, claim won rewards or prizes from completed competitions, see which wallet account they registered with, or submit Telegram / WeChat / Email / Twitter contact for prize delivery to top-tier winners.
data-ai
Unified payment dispatcher for agent-to-service payments. Covers x402 (`exact`, `exact+Permit2`, `upto`, `aggr_deferred` schemes), MPP (`charge` / `session` intents), and a2a-pay (`a2a_charge` paymentId flow). Detects HTTP 402 from response headers and routes to the matching scheme reference; also handles a2a paymentId mentions without a 402. Loads references/{exact,aggr_deferred,upto,charge,session,a2a_charge}.md. Returns a ready-to-paste authorization header (x402/MPP) or a tx-hash + status (a2a). Triggers (EN): 402, payment required, x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, permit2, upto, metered billing, open/close/topup/settle channel, voucher, session payment, channelId, channel_id, paymentId, a2a_, create payment link, payment link, payment status. Triggers (中文): 按量计费、支付上限、支付通道、关闭/充值/续费/结算通道、关闭会话、结算会话、凭证、会话支付、付款链接、创建支付、支付状态. Any close/topup/settle/voucher/refund near a channel_id or session context = MPP mid-session op → load references/session.md.