Install any skill in seconds. Free to start, no credit card required.
Get Started Free →OKX Agentic Wallet skill manages login, balances, transfers, contract calls, swaps, bridges and Gas Station payments via onchainos CLI.
Use this skill ↓55% 68%+14 ptsof test cases passed
Passed 15 of 22 test cases with the skill, and 12 of 22 without it.
3 of 3 safety checks passed
Not used yet
4 subcommands: create-limit, cancel, list, resume. All emit the JSON envelope {ok:true,data:{...}} on stdout (no --format flag — strategy CLI is agent-facing; the agent renders any user-visible table from JSON). Behavior/flow is in strategy.md.
strategy create-limitonchainos 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 <percent>] [--mev-protection <on|off|default>] [--expires-in <secs>] [--wait]
| Flag | Required | Notes |
|---|---|---|
--chain-id | Y | 1 / solana / bsc / arbitrum / base / xlayer (6 supported chains only). |
--from-token / --to-token | Y | Sell-side / 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 by the CLI — no --type flag. |
--trigger-price | Y | USD trigger price. |
--current-price | N | Current USD price of the comparison token (to-token for buy, from-token for sell). Omit → CLI fetches via market price. |
--slippage | N | Percent, default 15. Pass a plain number (20% → 20; 0.05 = 0.05%, not 5%). |
--mev-protection | N | on / off / default (default = BE picks). |
--expires-in | N | TTL in seconds. Default 604800 (7 days). |
--wait | N | bool [UNIT: bool], default false. Wait for terminal state: fixed 3 s sleep, then re-query + merge (see Output). |
Output: {orderId, status:<int>, statusLabel, estimatedWaitTime:<int|null>, eventCursor:<string|null>}. Solana returns estimatedWaitTime=0; other chains follow the async wait pattern.
belowMinimum (exit 0, no order created): below the $1 USD minimum — caught by the local pre-check OR by normalizing backend 100010 — the CLI returns {belowMinimum:true, minFromAmount:<string>, fromSymbol:<string>} instead. minFromAmount = ceil(1.0 / from_token_price) as an integer string; both paths emit identical shape. Render per strategy.md Step 2.
--wait merge: appends settled:<bool>; when settled, also transactionInfo / executionHistoryList / fromToken / toToken / orderStatusUpdateTime. status / statusLabel reflect the re-query.
strategy cancelPass exactly one target selector:
onchainos strategy cancel --order-id <id> [--wait]
onchainos strategy cancel --order-ids id1,id2,... [--wait]
onchainos strategy cancel --all
--wait (bool, [UNIT: bool]) waits for terminal state (fixed 3 s + per-order re-query/merge). --all + --wait is rejected before any cancel is sent (code: invalid_input, field: wait, exit 1) — use --order-id / --order-ids with --wait, or omit --wait for bulk cancel. Output without --wait: {updateNum:N, estimatedWaitTime:null|n}; with --wait: {settled:<bool>, orders:[{orderId, settled, status, statusLabel, ...}]} (top-level settled = logical AND across orders). updateNum is the count BE accepted, not the count that reached terminal state — re-query with list if you did not pass --wait.
Next to this one in the catalogue, plus more from the same author.