Install
openclaw skills install ltp-rapidx-tradingUse when an agent needs to operate RapidX through MCP or CLI for account reads, market reads, order preview, order submit/amend/cancel, position management, algo orders, or explicit live trading verification.
openclaw skills install ltp-rapidx-tradingUse this skill after ltp-rapidx-config has confirmed the runtime path as MCP_READY or CLI_ONLY_READY. Prefer MCP tools only when the agent host is MCP_READY. Use direct CLI commands only when the confirmed path is CLI_ONLY_READY.
rapidx ... --json response, and final summaries must include toolOrCommandEvidence or equivalent observed evidence.confirmation.submitToken from the preview response as the submit continueConsentId.Before any trading workflow, read the latest integration review from ltp-rapidx-config or run that skill first.
MCP_READY: use rapidx/... MCP tools and do not shell out to wrapper scripts.CLI_ONLY_READY: use direct rapidx ... --json commands and do not claim MCP tools were called.NOT_VERIFIED or only CLI_READY: stop and run config self-check before account, market, or trade workflows.Do not switch paths during a task without new evidence. If an MCP call fails after MCP_READY, mark MCP degraded and verify state before retrying or falling back to CLI.
At the start of a trading session or before the first write in a session, check the cached release status once:
MCP_READY: call rapidx/update/check or rapidx/self-check with checkUpdates=true.CLI_ONLY_READY: run rapidx update check --json.Do not perform a fresh network update check before every trade submit. If the update result is WRITE_BLOCKED or UPGRADE_REQUIRED, stop all trade-write actions, upgrade the CLI, restart or reload the MCP host when applicable, and rerun self-check. If skillsUpdateRecommended=true, tell the user the skills should be reinstalled from GitHub, but do not block read-only work solely for that reason.
Use rapidx/tools for the authoritative runtime schema. Current normal-use tool names are:
Market: rapidx/market/get-ticker, rapidx/market/get-orderbook,
rapidx/market/get-klines, rapidx/market/get-funding-rate,
rapidx/market/get-mark-price, rapidx/market/get-symbol-info,
rapidx/market/get-open-interest
Account: rapidx/account/overview, rapidx/account/balance,
rapidx/account/set-position-mode
Update: rapidx/update/check
Trade: rapidx/trade/preview, rapidx/trade/verify-live
Order: rapidx/order/place-preview, rapidx/order/amend-preview,
rapidx/order/cancel-preview, rapidx/order/place,
rapidx/order/amend, rapidx/order/cancel,
rapidx/order/get, rapidx/order/list, rapidx/order/history
Position: rapidx/position/list, rapidx/position/history,
rapidx/position/close, rapidx/position/set-leverage
Algo: rapidx/algo/place, rapidx/algo/amend,
rapidx/algo/cancel, rapidx/algo/list
rapidx/order/preview and rapidx/trading-verification are compatibility tools. Prefer rapidx/order/place-preview and rapidx/trade/verify-live in new workflows.
Before making trading decisions, refresh state:
1. rapidx/account/overview
2. rapidx/account/balance with mode="portfolio"
3. rapidx/order/list
4. rapidx/position/list
5. rapidx/algo/list
For a symbol, refresh market data:
1. rapidx/market/get-symbol-info
2. rapidx/market/get-ticker
3. rapidx/market/get-orderbook
4. rapidx/market/get-mark-price
5. rapidx/market/get-klines
6. rapidx/market/get-funding-rate # PERP only
7. rapidx/market/get-open-interest # PERP only
Use symbol format {EXCHANGE}_{TYPE}_{BASE}_{QUOTE}, for example BINANCE_PERP_BTC_USDT or OKX_PERP_BTC_USDT. For OKX perpetuals, quantity is contract count; inspect symbol info before placing or amending orders.
All writes use this pattern:
previewId and confirmation.submitToken.requestSummary, businessParams, max notional, order id/client order id, and riskNotes.previewId and continueConsentId=<confirmation.submitToken>.If the preview response does not include confirmation.submitToken, do not submit the write. Re-run preview with the current CLI/MCP runtime or report the integration as stale.
maxNotional is a safety upper bound, not the target order amount. Before increasing quantity, amount, or notional to satisfy an exchange rule, check symbol minNotional and ask the user to confirm the new amount.
Order placement:
rapidx/order/place-preview
rapidx/order/place
rapidx/order/get or rapidx/order/list
Order amend:
rapidx/order/amend-preview
rapidx/order/amend
rapidx/order/get or rapidx/order/list
Order cancel:
rapidx/order/cancel-preview
rapidx/order/cancel
rapidx/order/list
Non-order writes:
rapidx/trade/preview with targetCapabilityId
target tool, such as rapidx/position/set-leverage
matching read-back tool
Common targetCapabilityId values are position.set-leverage, position.close, account.set-position-mode, algo.place, algo.amend, and algo.cancel.
clientOrderId when the schema accepts one so status can be checked after a timeout.order/get, order/list, order/history, or positions.minNotional, do not auto-increase to the minimum. Ask the user to approve the revised amount first.Use preview/submit for rapidx/algo/place, rapidx/algo/amend, and rapidx/algo/cancel.
Before placing TPSL or conditional orders:
rapidx/algo/list.Use separate explicit consent for each:
rapidx/position/set-leverage changes future risk for the symbol.rapidx/account/set-position-mode changes account position mode and can affect existing workflows.rapidx/position/close is a real close-position action. Verify current position first.Do not pass side or quantity to position.close. The close-position API determines BUY or SELL from the current position and closes the target symbol/positionSide. In NET mode, closing a long behaves like SELL and closing a short behaves like BUY. Treat position.close as a market close unless the tool schema explicitly exposes another order type, and verify the result with rapidx/position/list. Use a reduce-only order flow for partial closes. If order/get later shows reduceOnly=false, do not treat that alone as a failed close; position.close uses the RapidX close-position API and the order readback may not echo the reduce-only intent.
Do not test these writes as part of ordinary setup.
Use rapidx/trade/verify-live only when the user explicitly asks for a small real-trade verification and authorizes symbol, exchange, amount cap, cleanup behavior, and test window.
The verification must include:
1. read-only self-check
2. market and symbol rule lookup
3. explicit user consent
4. internal preview
5. post-only or safely far-from-market limit submit
6. order query
7. amend when supported
8. cancel
9. cleanup check for open orders, positions, and algo orders
If any step cannot be verified, return NOT_VERIFIED, EXPECTED_ERROR, or FAIL with observed evidence. Do not call it successful without real evidence.
When MCP is unavailable, use direct CLI equivalents with --json and the same preview/submit discipline:
rapidx order place-preview --input '{"symbol":"BINANCE_PERP_BTC_USDT","side":"BUY","orderType":"LIMIT","price":"65000","quantity":"0.001","maxNotional":"100","clientOrderId":"example-001"}' --json
rapidx order place --input '{"symbol":"BINANCE_PERP_BTC_USDT","side":"BUY","orderType":"LIMIT","price":"65000","quantity":"0.001","maxNotional":"100","clientOrderId":"example-001","previewId":"<previewId>","continueConsentId":"<confirmation.submitToken>"}' --json
rapidx trade preview --input '{"targetCapabilityId":"position.set-leverage","symbol":"BINANCE_PERP_BTC_USDT","leverage":5}' --json
rapidx trade verify-live --input '{"symbol":"BINANCE_PERP_BTC_USDT","side":"BUY","maxNotional":"100","clientOrderId":"verify-001","explicitUserConsent":true}' --json
Avoid shell chaining and wrapper scripts. Run commands from the agent workspace or use absolute paths supported by the host.
For trading work, state: