{"id":"b9af95d4-7abb-4dc1-b466-d46b37bb900b","entityType":"agent","slug":"clawhub-liquiditytech-ltp-rapidx-trading","name":"LTP RapidX Trading","canonicalUrl":"https://www.xpersona.co/agent/clawhub-liquiditytech-ltp-rapidx-trading","canonicalPath":"/agent/clawhub-liquiditytech-ltp-rapidx-trading","generatedAt":"2026-10-11T01:48:16.394Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":null},"description":"Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s173s0dt05mxhb6rxrs383nhg587xdfv:ltp-rapidx-trading","sourceUrl":"https://clawhub.ai/liquiditytech/ltp-rapidx-trading","homepage":"https://clawhub.ai/liquiditytech/skills/ltp-rapidx-trading","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/liquiditytech/ltp-rapidx-trading","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/liquiditytech/skills/ltp-rapidx-trading","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"LTP RapidX Trading technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":null},"stars":null,"forks":null,"downloads":1237,"packageName":null,"latestVersion":"1.0.17","tractionLabel":"1.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:51:23.559Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T22:51:23.629Z","lastCrawledAt":"2026-10-10T22:51:23.559Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T22:51:23.559Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.17","createdAt":"2026-09-07T08:14:47.121Z","changelog":"Add OKX klines guidance and sync RapidX CLI/MCP capability references.","fileCount":5,"zipByteSize":16963},{"version":"1.0.16","createdAt":"2026-06-30T11:37:34.075Z","changelog":"Update RapidX MCP env materialization fallback guidance","fileCount":5,"zipByteSize":16934},{"version":"1.0.15","createdAt":"2026-06-29T07:39:23.178Z","changelog":"Update RapidX endpoint mapping reference","fileCount":5,"zipByteSize":16678},{"version":"1.0.14","createdAt":"2026-06-22T14:38:50.724Z","changelog":"Clarify MCP setup handoff to config skill","fileCount":5,"zipByteSize":16539},{"version":"1.0.13","createdAt":"2026-06-22T05:56:21.360Z","changelog":"Bump RapidX skills release version to 1.0.13","fileCount":5,"zipByteSize":16561},{"version":"1.0.12","createdAt":"2026-06-22T02:17:23.151Z","changelog":"Update RapidX official docs references and best practices","fileCount":5,"zipByteSize":16626},{"version":"1.0.11","createdAt":"2026-06-21T16:58:39.463Z","changelog":"Remove quote amount order input and document automation session trading flow","fileCount":3,"zipByteSize":7550},{"version":"1.0.10","createdAt":"2026-06-21T15:57:38.419Z","changelog":"Update RapidX automation trading guidance","fileCount":3,"zipByteSize":7549}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s173s0dt05mxhb6rxrs383nhg587xdfv:ltp-rapidx-trading","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s173s0dt05mxhb6rxrs383nhg587xdfv:ltp-rapidx-trading` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/liquiditytech/ltp-rapidx-trading before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T01:48:16.390Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-liquiditytech-ltp-rapidx-trading/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":null},"readme":"Skill: LTP RapidX Trading\n\nOwner: liquiditytech\n\nSummary: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n\nTags: latest:1.0.17\n\nVersion history:\n\nv1.0.17 | 2026-09-07T08:14:47.121Z | user\n\nAdd OKX klines guidance and sync RapidX CLI/MCP capability references.\n\nv1.0.16 | 2026-06-30T11:37:34.075Z | user\n\nUpdate RapidX MCP env materialization fallback guidance\n\nv1.0.15 | 2026-06-29T07:39:23.178Z | user\n\nUpdate RapidX endpoint mapping reference\n\nv1.0.14 | 2026-06-22T14:38:50.724Z | user\n\nClarify MCP setup handoff to config skill\n\nv1.0.13 | 2026-06-22T05:56:21.360Z | user\n\nBump RapidX skills release version to 1.0.13\n\nv1.0.12 | 2026-06-22T02:17:23.151Z | user\n\nUpdate RapidX official docs references and best practices\n\nv1.0.11 | 2026-06-21T16:58:39.463Z | user\n\nRemove quote amount order input and document automation session trading flow\n\nv1.0.10 | 2026-06-21T15:57:38.419Z | user\n\nUpdate RapidX automation trading guidance\n\nv1.0.9 | 2026-06-21T08:15:28.420Z | user\n\nUpdate RapidX trading skill guidance\n\nv1.0.8 | 2026-06-18T14:43:11.375Z | user\n\nAlign trading guidance with update handling flow\n\nv1.0.7 | 2026-06-18T14:23:27.771Z | user\n\nAdd skill version metadata and upgrade handling guidance\n\nv1.0.6 | 2026-06-18T13:42:56.539Z | user\n\nUpdate RapidX trading skill guidance for CLI 1.0.32\n\nv1.0.5 | 2026-06-08T07:29:44.039Z | user\n\nAdd Binance native symbol normalization guidance\n\nv1.0.4 | 2026-06-03T14:42:00.698Z | user\n\nUpdate RapidX trading skill guidance\n\nv1.0.3 | 2026-06-03T11:49:28.438Z | user\n\nUpdate RapidX trading skill guidance\n\nv1.0.2 | 2026-06-03T06:59:08.316Z | user\n\nUpdate RapidX trading skill guidance\n\nv1.0.1 | 2026-06-02T11:25:40.093Z | user\n\nInitial RapidX trading skill release\n\nArchive index:\n\nArchive v1.0.17: 5 files, 16963 bytes\n\nFiles: references/best-practices.md (18650b), references/capability-overview.md (6747b), skill-card.md (2260b), SKILL.md (17561b), _meta.json (138b)\n\nFile v1.0.17:SKILL.md\n\n---\nname: ltp-rapidx-trading\nversion: 1.0.17\ndescription: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n---\n\n# RapidX Trading\n\nUse 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`.\n\n## References\n\n- Read `references/capability-overview.md` when selecting a CLI command, MCP tool, capability id, or RapidX endpoint mapping.\n- Read `references/best-practices.md` when planning a full workflow across skills, CLI, MCP, preview, automation, and readback.\n\n## Non-Negotiable Rules\n\n- Do not fake query or trading results. Every claim must come from an actual MCP tool or `rapidx ... --json` response, and final summaries must include `toolOrCommandEvidence` or equivalent observed evidence.\n- Do not use shell bridge scripts, temporary JavaScript scripts, directory-changing shell chains, or chained shell invocations.\n- Treat all trade-write tools as real production actions.\n- Never submit a write without preview evidence and explicit user consent for that specific write, unless the user has explicitly enabled RapidX automation mode for the current scope in chat.\n- Use `confirmation.submitToken` from the preview response as the submit `continueConsentId`.\n- Keep business parameters unchanged between preview and submit. If symbol, side, positionSide, quantity, price, order id, leverage, or mode changes, create a new preview.\n- If a write times out or the result is uncertain, query state before retrying.\n- Never echo secrets.\n\n## Invocation Path\n\nBefore any trading workflow, read the latest integration review from `ltp-rapidx-config` or run that skill first.\n\n- `MCP_READY`: use `rapidx/...` MCP tools and do not shell out to wrapper scripts.\n- `CLI_ONLY_READY`: use direct `rapidx ... --json` commands and do not claim MCP tools were called.\n- `NOT_VERIFIED` or only `CLI_READY`: stop and run config self-check before portfolio, market, or trade workflows.\n\nDo 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.\n\nIf MCP setup or discovery is missing, stale, or failing, stop trading setup work and return to `ltp-rapidx-config` MCP Config. Do not invent host-specific MCP add commands in this trading skill.\n\n## Version Check\n\nAt the start of a trading session or before the first write in a session, check the cached release status once:\n\n- `MCP_READY`: call `rapidx/update/check` once, then `rapidx/self-check`.\n- `CLI_ONLY_READY`: run `rapidx update check --json`.\n\nDo not perform a fresh network update check before every trade submit. If the update result is `WRITE_BLOCKED`, `UPGRADE_REQUIRED`, or `skillsUpdateRecommended=true`, stop all trade-write actions and run `ltp-rapidx-config` upgrade handling first. Upgrade or reinstall skills first when their local frontmatter `version` is missing, stale, or unknown; then upgrade the CLI when needed, restart or reload the MCP host when applicable, and rerun self-check. Do not block read-only work solely because skills update is recommended.\n\n## Current MCP Surface\n\nUse `rapidx/tools` for the authoritative runtime schema. It returns the tool list plus concrete `inputSchemas`; read the relevant input schema before constructing write inputs. Current normal-use tool names are:\n\n```text\nMarket:   rapidx/market/get-ticker, rapidx/market/get-orderbook,\n          rapidx/market/get-klines, rapidx/market/get-funding-rate,\n          rapidx/market/get-mark-price, rapidx/market/get-symbol-info,\n          rapidx/market/get-open-interest\nPortfolio: rapidx/portfolio/overview, rapidx/portfolio/assets,\n          rapidx/portfolio/statement, rapidx/portfolio/user-fee-rate,\n          rapidx/portfolio/position-bracket, rapidx/portfolio/set-position-mode\nUpdate:   rapidx/update/check\nTrade:    rapidx/trade/preview, rapidx/trade/verify-live\nAutomation:\n          rapidx/automation/start, rapidx/automation/list,\n          rapidx/automation/status, rapidx/automation/extend,\n          rapidx/automation/stop\nOrder:    rapidx/order/place-preview, rapidx/order/replace-preview,\n          rapidx/order/cancel-preview, rapidx/order/place,\n          rapidx/order/replace, rapidx/order/cancel,\n          rapidx/order/cancel-all, rapidx/order/query,\n          rapidx/order/open-orders, rapidx/order/history\nTransactions:\n          rapidx/transaction/executions\nPosition: rapidx/position/query, rapidx/position/history,\n          rapidx/position/get-leverage, rapidx/position/close,\n          rapidx/position/close-all, rapidx/position/set-leverage\nAlgo:     rapidx/algo/place, rapidx/algo/replace,\n          rapidx/algo/cancel, rapidx/algo/open-orders,\n          rapidx/algo/history, rapidx/algo/query\n```\n\nUse `rapidx/trade/verify-live` for small real-trade verification.\n\n`open-orders` means current non-terminal orders, not \"open an order\". These orders may still be fillable, replaceable, or cancelable. `algo/open-orders` means current non-terminal algo orders such as conditional or TPSL orders that have not triggered, been canceled, or otherwise ended.\n`rapidx/order/history` and `rapidx/algo/history` accept optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream server default range.\n\n## Read Workflow\n\nBefore making trading decisions, refresh state:\n\n```text\n1. rapidx/portfolio/overview\n2. rapidx/portfolio/assets\n3. rapidx/order/open-orders\n4. rapidx/position/query\n5. rapidx/algo/open-orders\n6. rapidx/transaction/executions when fills/transactions are needed\n```\n\nFor a symbol, refresh market data:\n\n```text\n1. rapidx/market/get-symbol-info\n2. rapidx/market/get-ticker\n3. rapidx/market/get-orderbook\n4. rapidx/market/get-mark-price\n5. rapidx/market/get-klines\n6. rapidx/market/get-funding-rate      # PERP only\n7. rapidx/market/get-open-interest     # PERP only\n```\n\nUse RapidX symbol format `BINANCE_PERP_<BASE>_<QUOTE>`, for example `BINANCE_PERP_BTC_USDT` or `BINANCE_PERP_ETH_USDT`. `OKX_PERP_<BASE>_<QUOTE>` is supported for OKX perpetual instruments. If the user says an OKX swap symbol, `OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`. Market adapters may return `originalSymbol` for venue-native symbols such as `BTCUSDT` or `BTC-USDT-SWAP`.\n\n`rapidx/market/get-klines` supports Binance and OKX symbols. For OKX perpetual candles, use `OKX_PERP_<BASE>_<QUOTE>` or its `OKX_SWAP_<BASE>_<QUOTE>` input alias with the same `interval` and optional `limit` fields used for Binance.\n\nNormalize user-facing Binance symbols before tool calls. If the user says `BTCUSDT`, `btcusdt`, or `BTC/USDT`, call RapidX with `BINANCE_PERP_BTC_USDT`. If the base asset contains Chinese characters, preserve the base exactly: `币安人生USDT` becomes `BINANCE_PERP_币安人生_USDT`. Do not translate Chinese base assets. Do not pass Binance native symbols directly as the `symbol` field. If exchange, type, base, or quote cannot be identified, ask the user to confirm the RapidX symbol first.\n\nInspect symbol info before placing or replacing orders.\nFor hedge-mode orders, pass `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` in order placement, algo placement, set-leverage, or verify-live inputs when the schema exposes it. Do not call `rapidx/portfolio/set-position-mode` just to choose an order side.\n\n## Preview Then Submit\n\nAll writes use this pattern:\n\n1. Call the write-specific preview tool.\n2. Read `previewId` and `confirmation.submitToken`.\n3. Show the user the actual `requestSummary`, `businessParams`, max notional, order id/client order id, and `riskNotes`.\n4. Ask for explicit consent for this one write.\n5. Submit the target write with the same business parameters plus `previewId` and `continueConsentId=<confirmation.submitToken>`.\n6. Query resulting state with the relevant read tool.\n\nIf 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.\n\nPreview ids are runtime-local. Use MCP preview ids only with the same MCP server runtime. Use CLI preview ids only with the same CLI preview store. Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n\nAutomation session still requires preview. Use it only when the user explicitly enables RapidX automation in chat and authorizes symbol, per-order max notional, total max notional, duration, allowed actions, and allowed order types. For normal order lifecycle automation, use `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]`. First create a session with `rapidx/automation/start`; the input must include `explicitUserConsent=true` and `acceptedRiskText` copied from the user's authorization. Then add `automationSessionId` to order place/replace/cancel preview input. If the preview returns `automationSession.confirmationMode=\"automation-session\"` and `confirmation.submitToken`, submit that preview without asking for another per-order chat confirmation. Do not invent automation scope. If no matching session exists, create one only after user authorization. If multiple sessions match, ask which session to use or pass the intended `automationSessionId`.\n\nAutomation session flow:\n\n```text\n1. rapidx/automation/start with explicitUserConsent=true and acceptedRiskText from the user\n2. rapidx/order/place-preview, rapidx/order/replace-preview, or rapidx/order/cancel-preview with automationSessionId\n3. Submit the matching order write with the same business parameters plus previewId and continueConsentId\n4. rapidx/automation/status when the agent needs remaining session scope\n5. rapidx/automation/extend only after the user authorizes more time; include explicitUserConsent=true and a new acceptedRiskText\n6. rapidx/automation/stop when the user says to stop automation\n```\n\nStopping automation blocks future automation previews/submits. It does not cancel existing orders.\n\nAutomation notional accounting: `order.place` consumes notional by `maxNotional`; `order.replace` consumes the replacement order notional; `order.cancel` consumes no notional.\n\n`maxNotional` is a safety upper bound, not the target order quantity. Before increasing quantity or notional to satisfy an exchange rule, check symbol `minNotional` and ask the user to confirm the new quantity or notional.\n\nOrder placement:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/open-orders\n```\n\n`rapidx/order/cancel` is asynchronous. If the result has `cancelAccepted=true` and `terminalStateConfirmed=false`, poll `rapidx/order/query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout before claiming a final state.\n\nNon-order writes:\n\n```text\nrapidx/trade/preview with targetCapabilityId\ntarget tool, such as rapidx/position/set-leverage\nmatching read-back tool\n```\n\nCommon `targetCapabilityId` values are `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Order Rules\n\n- LIMIT order: requires quantity and price.\n- MARKET order: allowed after preview and explicit user authorization. Treat it as immediate execution with possible slippage and no guaranteed fill price.\n- For RapidX PERP order placement, pass `quantity`. Do not use quote `amount`.\n- PERP writes are leverage and margin sensitive.\n- Hedge-mode order placement uses `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` when needed.\n- Use a stable `clientOrderId` when the schema accepts one so status can be checked after a timeout.\n- Do not infer fills from placement. Confirm through `order/query`, `order/open-orders`, `order/history`, executions, or positions.\n- If a requested order is below the symbol `minNotional`, do not auto-increase to the minimum. Ask the user to approve the revised quantity or notional first.\n- Do not tell users that RapidX blocks all MARKET orders by default. Do not silently replace a requested MARKET order with a best-bid/best-ask LIMIT order.\n\n## Algo Orders\n\nUse preview/submit for `rapidx/algo/place`, `rapidx/algo/replace`, and `rapidx/algo/cancel`.\n\nBefore placing TPSL or conditional orders:\n\n- Confirm target symbol, side, quantity when required, trigger price, stop/take-profit intent, and position side if hedge mode is used.\n- For TPSL, require at least one valid take-profit or stop-loss trigger.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- After submit, verify through `rapidx/algo/open-orders`.\n\n## Position And Portfolio Risk Writes\n\nUse separate explicit consent for each:\n\n- `rapidx/position/set-leverage` changes future risk for the symbol.\n- `rapidx/portfolio/set-position-mode` changes account position mode and can affect existing workflows. Use it only when the user explicitly asks to change account position mode.\n- `rapidx/position/close` is a real close-position action. Verify current position first.\n\nDo 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/query`. Use a reduce-only order flow for partial closes. If `order/query` 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.\n\nDo not test these writes as part of ordinary setup.\n\n## Live Trading Verification\n\nUse `rapidx/trade/verify-live` only when the user explicitly asks for a small real-trade verification and authorizes symbol, exchange, notional cap, cleanup behavior, and test window. The tool input must include `acceptedRiskText` that names the exact symbol, side, positionSide when provided, maxNotional, real-order risk, and cancel cleanup behavior.\n\nThe verification must include:\n\n```text\n1. read-only self-check\n2. market and symbol rule lookup\n3. explicit user consent\n4. internal preview\n5. post-only or safely far-from-market limit submit\n6. order query\n7. replace when supported\n8. cancel\n9. cleanup check for open orders, positions, and algo orders\n```\n\nIf any step cannot be verified, return `NOT_VERIFIED`, `EXPECTED_ERROR`, `INVALID_INPUT`, `BLOCKED`, `NOT_FOUND`, `PERMISSION_SCOPE_ERROR`, `BUSINESS_ERROR`, or `FAIL` with observed evidence. Do not call it successful without real evidence.\n\nOrder id checks have two layers: invalid `orderId` format is local `INVALID_INPUT`; valid-format but missing/non-open orders are discovered through RapidX readback during `order.query`, `order.replace-preview`, or `order.cancel-preview` and should be reported as `NOT_FOUND` or `BLOCKED` with evidence. If the user provides only `clientOrderId`, do not invent or validate an `orderId`.\n\n## CLI Fallback\n\nWhen MCP is unavailable, use direct CLI equivalents with `--json` and the same preview/submit discipline:\n\n```bash\nrapidx order place-preview --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"LIMIT\",\"price\":\"65000\",\"quantity\":\"0.001\",\"maxNotional\":\"100\",\"clientOrderId\":\"example-001\"}' --json\nrapidx 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\nrapidx automation start --input '{\"symbols\":[\"BINANCE_PERP_BTC_USDT\"],\"maxNotionalPerOrder\":\"100\",\"maxTotalNotional\":\"1000\",\"expiresInSeconds\":3600,\"allowedActions\":[\"order.place\",\"order.replace\",\"order.cancel\"],\"allowedOrderTypes\":[\"MARKET\",\"LIMIT\"],\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"}' --json\nrapidx order place-preview --input '{\"automationSessionId\":\"<automationSessionId>\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"MARKET\",\"quantity\":\"0.001\",\"maxNotional\":\"60\",\"clientOrderId\":\"auto-001\"}' --json\nrapidx trade preview --input '{\"targetCapabilityId\":\"position.set-leverage\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"leverage\":5}' --json\nrapidx trade verify-live --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"maxNotional\":\"100\",\"clientOrderId\":\"verify-001\",\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize a real verification order for BINANCE_PERP_BTC_USDT BUY maxNotional 100 with cancel cleanup.\"}' --json\n```\n\nAvoid shell chaining and wrapper scripts. Run commands from the agent workspace or use absolute paths supported by the host.\n\n## Final Answer\n\nFor trading work, state:\n\n- Which real tools or commands were called.\n- Which portfolio/order/position facts were verified.\n- Whether the final state is open, filled, cancelled, closed, unchanged, or not verified.\n- Any remaining action the user must explicitly authorize.\n\nFile v1.0.17:_meta.json\n\n{\n  \"ownerId\": \"kn73kps0f7zwmrka0kz101ymad87wexe\",\n  \"slug\": \"ltp-rapidx-trading\",\n  \"version\": \"1.0.17\",\n  \"publishedAt\": 1788768887121\n}\n\nFile v1.0.17:references/best-practices.md\n\n# RapidX Skills / CLI / MCP Best Practices\n\n## Overview\n\nRapidX is delivered as a complete Agent integration stack:\n\n- **Skills** teach the Agent how to install, configure, choose CLI or MCP, run self-checks, and operate RapidX.\n- **CLI** is the unified local runtime for atomic operations and also starts the MCP server through `rapidx mcp serve`.\n- **MCP** is the structured tool surface for MCP-capable Agents and shares the same CLI/Core capabilities.\n\nThe best practice is not to make users memorize every command. Let the Agent install and read the skills first. Load the installed `ltp-rapidx-config` skill to configure CLI/MCP and run self-checks, then load `ltp-rapidx-trading` for queries, preview, submit, automation, and readback. Skill names are not shell commands.\n\nRecommended flow:\n\n```text\nInstall Skills\n→ ltp-rapidx-config installs/configures CLI\n→ configure credentials and API host\n→ choose MCP_READY or CLI_ONLY_READY\n→ run self-check\n→ ltp-rapidx-trading uses MCP or CLI\n→ preview before write\n→ submit\n→ readback and reconcile\n```\n\n## 1. Role Of Each Layer\n\n| Layer | Role | Best Practice |\n|---|---|---|\n| Skills | Agent guidance | Install and read `ltp-rapidx-config` first, then use `ltp-rapidx-trading`. |\n| CLI | Unified local runtime | Install from official npm and use `rapidx ... --json` for CLI-only Agents. |\n| MCP | Structured tool interface | Start with `rapidx mcp serve`; MCP-capable Agents call `rapidx/*` tools directly. |\n| Core | Shared implementation | CLI and MCP share schemas, API client, preview, automation, audit, and self-check. |\n\nThe MCP server is not a separate package. It is started by the CLI:\n\n```bash\nrapidx mcp serve\n```\n\nMCP tools should call the shared RapidX core directly. They should not shell out through temporary scripts, wrapper files, or `cd ... && node ...` command chains.\n\n## 2. Recommended External User Flow\n\n### Step 1: Install Skills\n\nUsers can install skills themselves, or send an executable instruction to their Agent.\n\nRecommended instruction to send to the Agent:\n\n```text\nYou are my Agent. Install the RapidX skills into the current workspace using the skill installation method supported by your Agent host.\n\nSource repository:\nhttps://github.com/LiquidityTech/ltp-rapidx-skill\n\nInstall both skills:\n- ltp-rapidx-config\n- ltp-rapidx-trading\n\nAfter installation, load and follow the installed `ltp-rapidx-config` skill first. It is not a shell command. Use it to install or upgrade @liquiditytech/rapidx-cli from official npm, configure RapidX credentials, configure MCP if this host supports MCP, and run RapidX self-check.\n\nDo not start market queries or trading until you can report one of:\n- MCP_READY\n- CLI_ONLY_READY\n- NOT_VERIFIED\n```\n\nThe exact installation command depends on the Agent host. Use the official RapidX docs or skill repository README for Codex, Claude Code, Cursor, Gemini CLI, OpenCode, OpenClaw, and Hermes.\n\n### Step 2: Use Config Skill\n\nThe Agent should load and follow `ltp-rapidx-config` before any market query or trade. This is a skill-guided workflow, not a shell command named `ltp-rapidx-config`.\n\nConfig skill responsibilities:\n\n1. Confirm the Agent workspace.\n2. Install or upgrade `@liquiditytech/rapidx-cli` from official npm.\n3. Configure credentials.\n4. Configure MCP when the host supports MCP.\n5. Run tool discovery.\n6. Run read-only self-check.\n7. Report `MCP_READY`, `CLI_ONLY_READY`, or `NOT_VERIFIED`.\n\n### Step 3: Use Trading Skill\n\nAfter config is verified, the Agent should use `ltp-rapidx-trading`.\n\nTrading skill responsibilities:\n\n1. Choose MCP or CLI based on the config result.\n2. Read runtime schemas before constructing write inputs.\n3. Normalize symbols.\n4. Query current state before trading.\n5. Preview before every write.\n6. Use automation sessions only after explicit user authorization.\n7. Read back final order, position, transaction, or algo state.\n\n## 3. Credentials And API Host\n\nRequired values:\n\n```text\nLTP_ACCESS_KEY\nLTP_SECRET_KEY\nLTP_API_HOST\n```\n\n`LTP_API_HOST` has no default. Use the API host provided by the event, environment, or workspace owner.\n\nBest practice for non-programmer users:\n\n1. Prefer the Agent host's user-provided chat secret mechanism.\n2. Ask the user to create secrets named exactly `LTP_ACCESS_KEY`, `LTP_SECRET_KEY`, and `LTP_API_HOST`.\n3. Do not ask the user to paste full keys into public chats, screenshots, logs, or repositories.\n\nFallbacks:\n\n- MCP config environment references.\n- Shell environment variables.\n- A secret manager configured by the workspace owner.\n\nDo not use legacy names:\n\n```text\nLTP_BASE_URL\nRAPIDX_BASE_URL\nRAPIDX_PORTFOLIO_ACCESS_KEY\nRAPIDX_PORTFOLIO_SECRET_KEY\n```\n\n## 4. CLI Installation\n\nInstall from official npm:\n\n```bash\nnpm install -g @liquiditytech/rapidx-cli@latest\n```\n\nVerify:\n\n```bash\nrapidx --version\nrapidx schema --json\nrapidx auth check --json\nrapidx update check --json\n```\n\nFor CLI-only Agents, use JSON output:\n\n```bash\nrapidx self-check --json\n```\n\nAvoid:\n\n- wrapper scripts\n- temporary JavaScript bridge files\n- `cd ... && rapidx ...`\n- command chains that may trigger Agent host exec preflight blocking\n\nIf the Agent host needs a working directory, configure it through the host tool setting rather than a shell chain.\n\n## 5. MCP Configuration\n\nMCP-capable hosts should configure the server command as:\n\n```bash\nrapidx mcp serve\n```\n\nExample MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"rapidx\": {\n      \"command\": \"rapidx\",\n      \"args\": [\"mcp\", \"serve\"],\n      \"env\": {\n        \"LTP_ACCESS_KEY\": \"<host-expanded-secret-or-materialized-value>\",\n        \"LTP_SECRET_KEY\": \"<host-expanded-secret-or-materialized-value>\",\n        \"LTP_API_HOST\": \"<host-expanded-api-host-or-materialized-value>\"\n      }\n    }\n  }\n}\n```\n\nAfter configuration, reload or restart the MCP host and verify:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\n```\n\nIf MCP loads but `rapidx/self-check` reports credential/auth failures, inspect the `rapidx` MCP server env block. Literal placeholder values such as `${LTP_ACCESS_KEY}`, `$LTP_ACCESS_KEY`, `<secret-ref>`, `<provided-api-host>`, or empty strings mean the credentials were not materialized for the MCP runtime. Do not copy placeholder text literally. Read real values from an authorized secret source, then update only the `rapidx` server block with a YAML/JSON parser. Do not append duplicate blocks and do not remove config with broad regex such as `mcp_servers:.*`. Reload or restart MCP, then rerun `rapidx/tools`, `rapidx/update/check`, and `rapidx/self-check`; credential-auth must be `PASS`.\n\nExpected tool surface should include:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/transaction/executions\nrapidx/automation/start\nrapidx/automation/status\n```\n\nIf old tools such as `rapidx/order/preview` or `rapidx/order/executions` appear, upgrade the CLI, restart MCP, and rerun self-check.\n\n## 6. Version And Upgrade\n\nRun update checks during setup, review, or session startup:\n\n```bash\nrapidx update check --json\n```\n\nDo not run network update checks before every trade. It slows execution and creates avoidable failure points.\n\nUpgrade order:\n\n1. Upgrade skills when the local skill version is missing, stale, or unknown.\n2. Upgrade CLI.\n3. Restart or reload the MCP host.\n4. Run self-check again.\n\nSkills should include a `version:` field in `SKILL.md` frontmatter. Agents should use it when comparing local skills with the release manifest.\n\n## 7. Runtime Selection\n\nThe Agent should decide from evidence, not guessing.\n\n| State | Meaning | Action |\n|---|---|---|\n| `MCP_READY` | MCP tools are visible and self-check passed. | Use MCP tools. |\n| `CLI_ONLY_READY` | CLI works but MCP is unavailable. | Use CLI commands with `--json`. |\n| `NOT_VERIFIED` | Runtime cannot prove tool availability. | Stop and run config self-check. |\n\nDo not switch from MCP to CLI inside the same trade unless MCP is confirmed degraded and state has been read back.\n\nPreview ids are runtime-local:\n\n- MCP preview ids must be submitted through the same MCP runtime.\n- CLI preview ids must be submitted through the same CLI runtime.\n\n## 8. Session Startup Checklist\n\nAt the start of a trading session, the Agent should run:\n\n```text\nupdate check\nself-check\nportfolio overview\nportfolio assets\norder open-orders\nposition query\nalgo open-orders\n```\n\nMCP path:\n\n```text\nrapidx/update/check\nrapidx/self-check\nrapidx/portfolio/overview\nrapidx/portfolio/assets\nrapidx/order/open-orders\nrapidx/position/query\nrapidx/algo/open-orders\n```\n\nCLI path:\n\n```bash\nrapidx update check --json\nrapidx self-check --json\nrapidx portfolio overview --json\nrapidx portfolio assets --json\nrapidx order open-orders --json\nrapidx position query --json\nrapidx algo open-orders --json\n```\n\n## 9. Symbol And Quantity\n\nRapidX order inputs use RapidX canonical symbols.\n\nRecommended format:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\nTicker, orderbook, klines, and open-interest market queries support OKX symbols. Use the same `interval` and optional `limit` inputs for Binance and OKX klines.\n\nNormalize common user expressions:\n\n| User expression | RapidX symbol |\n|---|---|\n| `BTCUSDT` | `BINANCE_PERP_BTC_USDT` |\n| `btcusdt` | `BINANCE_PERP_BTC_USDT` |\n| `BTC/USDT` | `BINANCE_PERP_BTC_USDT` |\n| `币安人生USDT` | `BINANCE_PERP_币安人生_USDT` |\n\nFor RapidX PERP order placement:\n\n- Use `quantity`.\n- Do not send quote `amount`.\n- Use `maxNotional` as a safety upper bound, not as the target order amount.\n\nBefore trading, query symbol rules:\n\n```bash\nrapidx market get-symbol-info --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\"}' --json\n```\n\nThe Agent should check minimum notional, minimum quantity, lot size, price tick size, and contract size. If the requested order is below the minimum, ask the user to approve the revised quantity or notional first.\n\n## 10. Read Before Write\n\nBefore any write, read the current state.\n\n| Workflow | Required reads |\n|---|---|\n| Place order | symbol info, ticker/orderbook, portfolio assets, open orders, positions |\n| Replace order | order query, open orders, symbol info |\n| Cancel order | order query or open orders |\n| Close position | position query, open orders |\n| Algo / TPSL | position query, algo open-orders, symbol info |\n| Set leverage | current leverage, position query |\n\nThe Agent should not infer current state from memory or previous chat.\n\n## 11. Preview Then Submit\n\nEvery write with `previewRequired=true` must use:\n\n```text\npreview\n→ submit with same business params + previewId + continueConsentId\n→ readback\n```\n\nOrder place:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/query\n```\n\nNon-order writes:\n\n```text\nrapidx/trade/preview\ntarget write tool\nmatching readback tool\n```\n\nIf any business parameter changes after preview, create a new preview. Business parameters include symbol, side, positionSide, quantity, price, orderType, orderId, clientOrderId, leverage, and account mode.\n\n## 12. Automation\n\nAutomation is a bounded local authorization session. It lets the Agent submit matching previews without asking for another per-order chat confirmation.\n\nAutomation still requires preview.\n\nUser authorization must include:\n\n- symbols\n- maxNotionalPerOrder\n- maxTotalNotional\n- duration\n- allowedActions\n- allowedOrderTypes\n- explicit risk text\n\nCreate a session:\n\n```bash\nrapidx automation start --input '{\n  \"symbols\": [\"BINANCE_PERP_BTC_USDT\"],\n  \"maxNotionalPerOrder\": \"100\",\n  \"maxTotalNotional\": \"1000\",\n  \"expiresInSeconds\": 3600,\n  \"allowedActions\": [\"order.place\", \"order.replace\", \"order.cancel\"],\n  \"allowedOrderTypes\": [\"MARKET\", \"LIMIT\"],\n  \"explicitUserConsent\": true,\n  \"acceptedRiskText\": \"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"\n}' --json\n```\n\nUse the session in preview:\n\n```bash\nrapidx order place-preview --input '{\n  \"automationSessionId\": \"ras_xxx\",\n  \"symbol\": \"BINANCE_PERP_BTC_USDT\",\n  \"side\": \"BUY\",\n  \"orderType\": \"MARKET\",\n  \"quantity\": \"0.001\",\n  \"maxNotional\": \"100\",\n  \"clientOrderId\": \"auto-001\"\n}' --json\n```\n\nAuto-submit only when preview returns:\n\n```json\n{\n  \"automationSession\": {\n    \"confirmationMode\": \"automation-session\"\n  },\n  \"confirmation\": {\n    \"submitToken\": \"confirm_rpv_xxx\"\n  }\n}\n```\n\nAutomation management:\n\n| Tool | Best Practice |\n|---|---|\n| `automation status` | Check remaining scope, expiry, and allowed actions. |\n| `automation extend` | Requires new user authorization; only extends time. |\n| `automation stop` | Stops future automation preview/submit; does not cancel existing orders. |\n\nUse `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]` for normal order lifecycle automation.\n\n## 13. Order Types\n\nUse runtime schema as the source of truth.\n\n| Order type | Use when | Required fields |\n|---|---|---|\n| `LIMIT` | User requires price boundary. | `price`, `quantity` |\n| `MARKET` | User wants immediate execution and accepts slippage. | `quantity`, `maxNotional` |\n\nDo not silently convert a requested `MARKET` order into a best-bid or best-ask `LIMIT` order.\n\n`MARKET` orders are supported after preview and explicit authorization. After submit, read back order status, executions, and position.\n\n## 14. Readback And Reconciliation\n\nSubmit success is not enough. The Agent must verify final state.\n\nAfter place:\n\n```text\norder query\ntransaction executions\nposition query\n```\n\nAfter cancel:\n\n```text\norder query until terminal\norder open-orders\n```\n\nAfter close position:\n\n```text\nposition query\ntransaction executions\n```\n\nAfter algo place:\n\n```text\nalgo open-orders\nalgo query\n```\n\n`order.cancel` is asynchronous. `cancelAccepted=true` means the request was accepted. If `terminalStateConfirmed=false`, poll `order query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout.\n\nIf a write times out or state is uncertain, query state before retrying. Do not blindly repeat write requests.\n\n## 15. Position And Algo\n\nPosition close:\n\n- Query current position first.\n- NET mode: omit `positionSide`.\n- HEDGE mode: use actual `LONG` or `SHORT`.\n- Do not pass `side` or `quantity`.\n- Use reduce-only order flow for partial close.\n\nSet leverage:\n\n- Preview with `targetCapabilityId=\"position.set-leverage\"`.\n- User must authorize symbol and leverage.\n- Read back with `position get-leverage`.\n\nTPSL / conditional algo:\n\n- Preview with `targetCapabilityId=\"algo.place\"`.\n- Submit `algo place`.\n- Read back with `algo open-orders` or `algo query`.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- Require at least one take-profit or stop-loss trigger.\n\n## 16. Error Handling\n\n| status | Agent action |\n|---|---|\n| `INVALID_INPUT` | Fix input; do not retry unchanged. |\n| `BLOCKED` | Read blocking reason; usually re-preview or ask user. |\n| `NOT_FOUND` | Read current state; target may not exist or may no longer be open. |\n| `PERMISSION_SCOPE_ERROR` | Credential scope does not cover the requested capability. |\n| `BUSINESS_ERROR` | Upstream rule rejected the request; inspect `details`. |\n| `NOT_VERIFIED` | State could not be proven; query again or report unverified. |\n| `FAIL` | Diagnose auth, network, startup, or malformed response. |\n\nCommon cases:\n\n- Invalid `orderId` format returns local `INVALID_INPUT`.\n- Valid-format but missing order returns readback `NOT_FOUND`.\n- Expired preview requires a new preview.\n- Submit params changed after preview returns `BLOCKED`.\n- Old MCP tool list means upgrade CLI and reload MCP host.\n\n## 17. Final Answer Format\n\nAgent final answers should include:\n\n```text\nRuntime path: MCP_READY or CLI_ONLY_READY\nTools or commands called\nSymbol / side / orderType / quantity / price\nPreview result\nSubmit result\nOrder id or client order id\nReadback result\nFinal state: open, filled, cancelled, closed, unchanged, or not verified\nRemaining user authorization needed, if any\n```\n\nFor automation:\n\n```text\nautomationSessionId\nsymbols\nmaxNotionalPerOrder\nmaxTotalNotional\nused or remaining scope\nexpiresAt\nallowedActions\nallowedOrderTypes\n```\n\n## 18. Things Agents Must Not Do\n\n- Do not fake query, trade, self-check, or readback results.\n- Do not echo full keys.\n- Do not submit writes without a preview token.\n- Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n- Do not shell through temporary scripts.\n- Do not use `cd ... && rapidx ...` command chains.\n- Do not blindly retry after timeout.\n- Do not treat `maxNotional` as target order amount.\n- Do not auto-increase orders to meet minimum notional without user approval.\n- Do not silently replace MARKET with LIMIT.\n- Do not interpret `open-orders` as \"open a new order\".\n\n## 19. Minimal Safe Workflows\n\n### First-Time Setup\n\n```text\n1. Install ltp-rapidx-config and ltp-rapidx-trading skills\n2. Load and follow the installed `ltp-rapidx-config` skill\n3. Install CLI from official npm\n4. Configure LTP_ACCESS_KEY, LTP_SECRET_KEY, LTP_API_HOST\n5. Configure MCP if supported\n6. Run update check and self-check\n7. Confirm MCP_READY or CLI_ONLY_READY\n```\n\n### Manual Trade\n\n```text\n1. Read portfolio, open orders, positions\n2. Read symbol info and market data\n3. order place-preview\n4. Ask user to confirm exact preview\n5. order place\n6. order query\n7. transaction executions or position query\n```\n\n### Automation Trade\n\n```text\n1. User authorizes automation scope in chat\n2. automation start\n3. order place-preview with automationSessionId\n4. order place with previewId and continueConsentId\n5. order query\n6. automation status\n```\n\n### Replace Or Cancel\n\n```text\n1. order open-orders\n2. order query\n3. replace-preview or cancel-preview\n4. replace or cancel\n5. order query until final or known current state\n```\n\n### Close Position\n\n```text\n1. position query\n2. trade preview with targetCapabilityId=\"position.close\"\n3. position close\n4. position query\n5. transaction executions when needed\n```\n\n### TPSL / Algo\n\n```text\n1. position query\n2. algo open-orders\n3. trade preview with targetCapabilityId=\"algo.place\"\n4. algo place\n5. algo open-orders or algo query\n```\n\n## 20. Local Skill References\n\nUse these local references from the installed skill directory:\n\n- `references/best-practices.md`\n- `references/capability-overview.md`\n\nFile v1.0.17:references/capability-overview.md\n\n# RapidX Capability Overview\n\nUse `rapidx schema --json` or MCP `rapidx/tools` as the runtime source of truth. This reference is a compact map for Agent planning.\n\n## Runtime Layers\n\n| Layer | Purpose |\n|---|---|\n| CLI | Atomic local operations through `rapidx <domain> <action> --json` |\n| MCP | Structured Agent tools served by `rapidx mcp serve` |\n| Core | Shared schemas, credential resolution, RapidX API client, preview, automation, audit, and self-check |\n| Skills | Agent guidance for setup, review, trading, automation, and readback |\n\n## Diagnostics And Discovery\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx --version` | - |\n| `rapidx schema --json` | `rapidx/tools` |\n| `rapidx update check --json` | `rapidx/update/check` |\n| `rapidx auth check` | - |\n| `rapidx doctor --json` | - |\n| `rapidx self-check --json` | `rapidx/self-check` |\n| `rapidx mcp serve` | starts the MCP server |\n\n## Automation\n\nAutomation sessions are local authorization sessions. They do not map to RapidX HTTP endpoints.\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx automation start` | `rapidx/automation/start` |\n| `rapidx automation list` | `rapidx/automation/list` |\n| `rapidx automation status` | `rapidx/automation/status` |\n| `rapidx automation extend` | `rapidx/automation/extend` |\n| `rapidx automation stop` | `rapidx/automation/stop` |\n\n## Market\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx market get-ticker` | `rapidx/market/get-ticker` |\n| `rapidx market get-orderbook` | `rapidx/market/get-orderbook` |\n| `rapidx market get-klines` | `rapidx/market/get-klines` |\n| `rapidx market get-funding-rate` | `rapidx/market/get-funding-rate` |\n| `rapidx market get-mark-price` | `rapidx/market/get-mark-price` |\n| `rapidx market get-symbol-info` | `rapidx/market/get-symbol-info` |\n| `rapidx market get-open-interest` | `rapidx/market/get-open-interest` |\n\n## Portfolio\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx portfolio overview` | `rapidx/portfolio/overview` | `GET /api/v1/trading/account` |\n| `rapidx portfolio assets` | `rapidx/portfolio/assets` | `GET /api/v1/trading/portfolio/assets` |\n| `rapidx portfolio statement` | `rapidx/portfolio/statement` | `GET /api/v1/trading/statement` |\n| `rapidx portfolio user-fee-rate` | `rapidx/portfolio/user-fee-rate` | `GET /api/v1/broker/feeRate` |\n| `rapidx portfolio position-bracket` | `rapidx/portfolio/position-bracket` | `GET /api/v1/trading/broker/positionBracket` |\n| `rapidx portfolio set-position-mode` | `rapidx/portfolio/set-position-mode` | `POST /api/v1/trading/account` |\n\n## Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx order place-preview` | `rapidx/order/place-preview` | preview for place |\n| `rapidx order replace-preview` | `rapidx/order/replace-preview` | preview for replace |\n| `rapidx order cancel-preview` | `rapidx/order/cancel-preview` | preview for cancel |\n| `rapidx order place` | `rapidx/order/place` | `POST /api/v1/trading/order` |\n| `rapidx order replace` | `rapidx/order/replace` | `PUT /api/v1/trading/order` |\n| `rapidx order cancel` | `rapidx/order/cancel` | `DELETE /api/v1/trading/order` |\n| `rapidx order cancel-all` | `rapidx/order/cancel-all` | `DELETE /api/v1/trading/cancelAll` |\n| `rapidx order query` | `rapidx/order/query` | `GET /api/v1/trading/order` |\n| `rapidx order open-orders` | `rapidx/order/open-orders` | `GET /api/v1/trading/orders` |\n| `rapidx order history` | `rapidx/order/history` | `GET /api/v1/trading/history/orders` |\n\n`open-orders` means current non-terminal orders, not \"open a new order\". `order.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Transactions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx transaction executions` | `rapidx/transaction/executions` | `GET /api/v1/trading/executions` |\n\n## Positions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx position query` | `rapidx/position/query` | `GET /api/v1/trading/position` |\n| `rapidx position history` | `rapidx/position/history` | `GET /api/v1/trading/history/position` |\n| `rapidx position get-leverage` | `rapidx/position/get-leverage` | `GET /api/v1/trading/perp/leverage` |\n| `rapidx position set-leverage` | `rapidx/position/set-leverage` | `POST /api/v1/trading/position/leverage` |\n| `rapidx position close` | `rapidx/position/close` | `DELETE /api/v1/trading/position` |\n| `rapidx position close-all` | `rapidx/position/close-all` | `DELETE /api/v1/trading/positions` |\n\n`position.close` does not take `side` or `quantity`. In NET mode, omit `positionSide`; in HEDGE mode, pass the actual `LONG` or `SHORT` side.\n\n## Algo Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx algo place` | `rapidx/algo/place` | `POST /api/v1/algo/order` |\n| `rapidx algo replace` | `rapidx/algo/replace` | `PUT /api/v1/algo/order` |\n| `rapidx algo cancel` | `rapidx/algo/cancel` | `DELETE /api/v1/algo/order` |\n| `rapidx algo query` | `rapidx/algo/query` | `GET /api/v1/algo/order` |\n| `rapidx algo open-orders` | `rapidx/algo/open-orders` | `GET /api/v1/algo/openOrders` |\n| `rapidx algo history` | `rapidx/algo/history` | `GET /api/v1/algo/history/orders` |\n\n`algo.open-orders` means current non-terminal algo orders. `algo.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Generic Preview And Live Verification\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx trade preview` | `rapidx/trade/preview` |\n| `rapidx trade verify-live` | `rapidx/trade/verify-live` |\n\nUse `rapidx/trade/preview` for non-order writes such as `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Symbol Format\n\nRecommended input symbols:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\n`OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`.\n\nMarket ticker, orderbook, klines, and open-interest queries support OKX symbols. OKX klines use the venue `GET /api/v5/market/candles` endpoint.\n\n## Status Meanings\n\n| Status | Meaning |\n|---|---|\n| `PASS` | Tool or command completed successfully |\n| `INVALID_INPUT` | Local schema or input validation failed |\n| `BLOCKED` | Preview, safety, compatibility, or policy check blocked the action |\n| `NOT_FOUND` | Requested resource was not found |\n| `PERMISSION_SCOPE_ERROR` | Credentials do not cover the requested scope |\n| `BUSINESS_ERROR` | RapidX or venue business rule rejected the request |\n| `NOT_VERIFIED` | Requested state could not be proven |\n| `FAIL` | Startup, auth, network, malformed response, or unexpected failure |\n\nFile v1.0.17:skill-card.md\n\n## Description:\n\nUse when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[liquiditytech](https://clawhub.ai/user/liquiditytech)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, developers, and trading operators use this skill to guide an agent through RapidX portfolio reads, market reads, previewed order actions, position management, algo order workflows, automation sessions, and explicit live trading verification.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can guide agents that have scoped access to live trading credentials and real trade-write authority.\n\nMitigation: Install only from a trusted RapidX CLI publisher, prefer a pinned and reviewed CLI version, use the host secret store, begin with read-only checks, and keep trading scope narrow.\n\nRisk: Automation sessions can authorize multiple order lifecycle actions within the approved scope.\n\nMitigation: Enable automation only with explicit authorization for symbols, notional caps, duration, allowed actions, and allowed order types; use short sessions and stop automation when it is no longer needed.\n\n## Reference(s):\n\n- [RapidX Capability Overview](references/capability-overview.md)\n- [RapidX Skills / CLI / MCP Best Practices](references/best-practices.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, API Calls, Configuration instructions]\n\n**Output Format:** [Markdown guidance with inline command and tool examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Trade-write guidance requires preview evidence, explicit consent or scoped automation authorization, and readback before final claims.]\n\n## Skill Version(s):\n\n1.0.17 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.16: 5 files, 16934 bytes\n\nFiles: references/best-practices.md (18488b), references/capability-overview.md (6601b), skill-card.md (2712b), SKILL.md (17326b), _meta.json (138b)\n\nFile v1.0.16:SKILL.md\n\n---\nname: ltp-rapidx-trading\nversion: 1.0.16\ndescription: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n---\n\n# RapidX Trading\n\nUse 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`.\n\n## References\n\n- Read `references/capability-overview.md` when selecting a CLI command, MCP tool, capability id, or RapidX endpoint mapping.\n- Read `references/best-practices.md` when planning a full workflow across skills, CLI, MCP, preview, automation, and readback.\n\n## Non-Negotiable Rules\n\n- Do not fake query or trading results. Every claim must come from an actual MCP tool or `rapidx ... --json` response, and final summaries must include `toolOrCommandEvidence` or equivalent observed evidence.\n- Do not use shell bridge scripts, temporary JavaScript scripts, directory-changing shell chains, or chained shell invocations.\n- Treat all trade-write tools as real production actions.\n- Never submit a write without preview evidence and explicit user consent for that specific write, unless the user has explicitly enabled RapidX automation mode for the current scope in chat.\n- Use `confirmation.submitToken` from the preview response as the submit `continueConsentId`.\n- Keep business parameters unchanged between preview and submit. If symbol, side, positionSide, quantity, price, order id, leverage, or mode changes, create a new preview.\n- If a write times out or the result is uncertain, query state before retrying.\n- Never echo secrets.\n\n## Invocation Path\n\nBefore any trading workflow, read the latest integration review from `ltp-rapidx-config` or run that skill first.\n\n- `MCP_READY`: use `rapidx/...` MCP tools and do not shell out to wrapper scripts.\n- `CLI_ONLY_READY`: use direct `rapidx ... --json` commands and do not claim MCP tools were called.\n- `NOT_VERIFIED` or only `CLI_READY`: stop and run config self-check before portfolio, market, or trade workflows.\n\nDo 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.\n\nIf MCP setup or discovery is missing, stale, or failing, stop trading setup work and return to `ltp-rapidx-config` MCP Config. Do not invent host-specific MCP add commands in this trading skill.\n\n## Version Check\n\nAt the start of a trading session or before the first write in a session, check the cached release status once:\n\n- `MCP_READY`: call `rapidx/update/check` once, then `rapidx/self-check`.\n- `CLI_ONLY_READY`: run `rapidx update check --json`.\n\nDo not perform a fresh network update check before every trade submit. If the update result is `WRITE_BLOCKED`, `UPGRADE_REQUIRED`, or `skillsUpdateRecommended=true`, stop all trade-write actions and run `ltp-rapidx-config` upgrade handling first. Upgrade or reinstall skills first when their local frontmatter `version` is missing, stale, or unknown; then upgrade the CLI when needed, restart or reload the MCP host when applicable, and rerun self-check. Do not block read-only work solely because skills update is recommended.\n\n## Current MCP Surface\n\nUse `rapidx/tools` for the authoritative runtime schema. It returns the tool list plus concrete `inputSchemas`; read the relevant input schema before constructing write inputs. Current normal-use tool names are:\n\n```text\nMarket:   rapidx/market/get-ticker, rapidx/market/get-orderbook,\n          rapidx/market/get-klines, rapidx/market/get-funding-rate,\n          rapidx/market/get-mark-price, rapidx/market/get-symbol-info,\n          rapidx/market/get-open-interest\nPortfolio: rapidx/portfolio/overview, rapidx/portfolio/assets,\n          rapidx/portfolio/statement, rapidx/portfolio/user-fee-rate,\n          rapidx/portfolio/position-bracket, rapidx/portfolio/set-position-mode\nUpdate:   rapidx/update/check\nTrade:    rapidx/trade/preview, rapidx/trade/verify-live\nAutomation:\n          rapidx/automation/start, rapidx/automation/list,\n          rapidx/automation/status, rapidx/automation/extend,\n          rapidx/automation/stop\nOrder:    rapidx/order/place-preview, rapidx/order/replace-preview,\n          rapidx/order/cancel-preview, rapidx/order/place,\n          rapidx/order/replace, rapidx/order/cancel,\n          rapidx/order/cancel-all, rapidx/order/query,\n          rapidx/order/open-orders, rapidx/order/history\nTransactions:\n          rapidx/transaction/executions\nPosition: rapidx/position/query, rapidx/position/history,\n          rapidx/position/get-leverage, rapidx/position/close,\n          rapidx/position/close-all, rapidx/position/set-leverage\nAlgo:     rapidx/algo/place, rapidx/algo/replace,\n          rapidx/algo/cancel, rapidx/algo/open-orders,\n          rapidx/algo/history, rapidx/algo/query\n```\n\nUse `rapidx/trade/verify-live` for small real-trade verification.\n\n`open-orders` means current non-terminal orders, not \"open an order\". These orders may still be fillable, replaceable, or cancelable. `algo/open-orders` means current non-terminal algo orders such as conditional or TPSL orders that have not triggered, been canceled, or otherwise ended.\n`rapidx/order/history` and `rapidx/algo/history` accept optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream server default range.\n\n## Read Workflow\n\nBefore making trading decisions, refresh state:\n\n```text\n1. rapidx/portfolio/overview\n2. rapidx/portfolio/assets\n3. rapidx/order/open-orders\n4. rapidx/position/query\n5. rapidx/algo/open-orders\n6. rapidx/transaction/executions when fills/transactions are needed\n```\n\nFor a symbol, refresh market data:\n\n```text\n1. rapidx/market/get-symbol-info\n2. rapidx/market/get-ticker\n3. rapidx/market/get-orderbook\n4. rapidx/market/get-mark-price\n5. rapidx/market/get-klines\n6. rapidx/market/get-funding-rate      # PERP only\n7. rapidx/market/get-open-interest     # PERP only\n```\n\nUse RapidX symbol format `BINANCE_PERP_<BASE>_<QUOTE>`, for example `BINANCE_PERP_BTC_USDT` or `BINANCE_PERP_ETH_USDT`. `OKX_PERP_<BASE>_<QUOTE>` is supported for OKX perpetual instruments. If the user says an OKX swap symbol, `OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`. Market adapters may return `originalSymbol` for venue-native symbols such as `BTCUSDT` or `BTC-USDT-SWAP`.\n\nNormalize user-facing Binance symbols before tool calls. If the user says `BTCUSDT`, `btcusdt`, or `BTC/USDT`, call RapidX with `BINANCE_PERP_BTC_USDT`. If the base asset contains Chinese characters, preserve the base exactly: `币安人生USDT` becomes `BINANCE_PERP_币安人生_USDT`. Do not translate Chinese base assets. Do not pass Binance native symbols directly as the `symbol` field. If exchange, type, base, or quote cannot be identified, ask the user to confirm the RapidX symbol first.\n\nInspect symbol info before placing or replacing orders.\nFor hedge-mode orders, pass `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` in order placement, algo placement, set-leverage, or verify-live inputs when the schema exposes it. Do not call `rapidx/portfolio/set-position-mode` just to choose an order side.\n\n## Preview Then Submit\n\nAll writes use this pattern:\n\n1. Call the write-specific preview tool.\n2. Read `previewId` and `confirmation.submitToken`.\n3. Show the user the actual `requestSummary`, `businessParams`, max notional, order id/client order id, and `riskNotes`.\n4. Ask for explicit consent for this one write.\n5. Submit the target write with the same business parameters plus `previewId` and `continueConsentId=<confirmation.submitToken>`.\n6. Query resulting state with the relevant read tool.\n\nIf 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.\n\nPreview ids are runtime-local. Use MCP preview ids only with the same MCP server runtime. Use CLI preview ids only with the same CLI preview store. Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n\nAutomation session still requires preview. Use it only when the user explicitly enables RapidX automation in chat and authorizes symbol, per-order max notional, total max notional, duration, allowed actions, and allowed order types. For normal order lifecycle automation, use `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]`. First create a session with `rapidx/automation/start`; the input must include `explicitUserConsent=true` and `acceptedRiskText` copied from the user's authorization. Then add `automationSessionId` to order place/replace/cancel preview input. If the preview returns `automationSession.confirmationMode=\"automation-session\"` and `confirmation.submitToken`, submit that preview without asking for another per-order chat confirmation. Do not invent automation scope. If no matching session exists, create one only after user authorization. If multiple sessions match, ask which session to use or pass the intended `automationSessionId`.\n\nAutomation session flow:\n\n```text\n1. rapidx/automation/start with explicitUserConsent=true and acceptedRiskText from the user\n2. rapidx/order/place-preview, rapidx/order/replace-preview, or rapidx/order/cancel-preview with automationSessionId\n3. Submit the matching order write with the same business parameters plus previewId and continueConsentId\n4. rapidx/automation/status when the agent needs remaining session scope\n5. rapidx/automation/extend only after the user authorizes more time; include explicitUserConsent=true and a new acceptedRiskText\n6. rapidx/automation/stop when the user says to stop automation\n```\n\nStopping automation blocks future automation previews/submits. It does not cancel existing orders.\n\nAutomation notional accounting: `order.place` consumes notional by `maxNotional`; `order.replace` consumes the replacement order notional; `order.cancel` consumes no notional.\n\n`maxNotional` is a safety upper bound, not the target order quantity. Before increasing quantity or notional to satisfy an exchange rule, check symbol `minNotional` and ask the user to confirm the new quantity or notional.\n\nOrder placement:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/open-orders\n```\n\n`rapidx/order/cancel` is asynchronous. If the result has `cancelAccepted=true` and `terminalStateConfirmed=false`, poll `rapidx/order/query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout before claiming a final state.\n\nNon-order writes:\n\n```text\nrapidx/trade/preview with targetCapabilityId\ntarget tool, such as rapidx/position/set-leverage\nmatching read-back tool\n```\n\nCommon `targetCapabilityId` values are `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Order Rules\n\n- LIMIT order: requires quantity and price.\n- MARKET order: allowed after preview and explicit user authorization. Treat it as immediate execution with possible slippage and no guaranteed fill price.\n- For RapidX PERP order placement, pass `quantity`. Do not use quote `amount`.\n- PERP writes are leverage and margin sensitive.\n- Hedge-mode order placement uses `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` when needed.\n- Use a stable `clientOrderId` when the schema accepts one so status can be checked after a timeout.\n- Do not infer fills from placement. Confirm through `order/query`, `order/open-orders`, `order/history`, executions, or positions.\n- If a requested order is below the symbol `minNotional`, do not auto-increase to the minimum. Ask the user to approve the revised quantity or notional first.\n- Do not tell users that RapidX blocks all MARKET orders by default. Do not silently replace a requested MARKET order with a best-bid/best-ask LIMIT order.\n\n## Algo Orders\n\nUse preview/submit for `rapidx/algo/place`, `rapidx/algo/replace`, and `rapidx/algo/cancel`.\n\nBefore placing TPSL or conditional orders:\n\n- Confirm target symbol, side, quantity when required, trigger price, stop/take-profit intent, and position side if hedge mode is used.\n- For TPSL, require at least one valid take-profit or stop-loss trigger.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- After submit, verify through `rapidx/algo/open-orders`.\n\n## Position And Portfolio Risk Writes\n\nUse separate explicit consent for each:\n\n- `rapidx/position/set-leverage` changes future risk for the symbol.\n- `rapidx/portfolio/set-position-mode` changes account position mode and can affect existing workflows. Use it only when the user explicitly asks to change account position mode.\n- `rapidx/position/close` is a real close-position action. Verify current position first.\n\nDo 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/query`. Use a reduce-only order flow for partial closes. If `order/query` 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.\n\nDo not test these writes as part of ordinary setup.\n\n## Live Trading Verification\n\nUse `rapidx/trade/verify-live` only when the user explicitly asks for a small real-trade verification and authorizes symbol, exchange, notional cap, cleanup behavior, and test window. The tool input must include `acceptedRiskText` that names the exact symbol, side, positionSide when provided, maxNotional, real-order risk, and cancel cleanup behavior.\n\nThe verification must include:\n\n```text\n1. read-only self-check\n2. market and symbol rule lookup\n3. explicit user consent\n4. internal preview\n5. post-only or safely far-from-market limit submit\n6. order query\n7. replace when supported\n8. cancel\n9. cleanup check for open orders, positions, and algo orders\n```\n\nIf any step cannot be verified, return `NOT_VERIFIED`, `EXPECTED_ERROR`, `INVALID_INPUT`, `BLOCKED`, `NOT_FOUND`, `PERMISSION_SCOPE_ERROR`, `BUSINESS_ERROR`, or `FAIL` with observed evidence. Do not call it successful without real evidence.\n\nOrder id checks have two layers: invalid `orderId` format is local `INVALID_INPUT`; valid-format but missing/non-open orders are discovered through RapidX readback during `order.query`, `order.replace-preview`, or `order.cancel-preview` and should be reported as `NOT_FOUND` or `BLOCKED` with evidence. If the user provides only `clientOrderId`, do not invent or validate an `orderId`.\n\n## CLI Fallback\n\nWhen MCP is unavailable, use direct CLI equivalents with `--json` and the same preview/submit discipline:\n\n```bash\nrapidx order place-preview --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"LIMIT\",\"price\":\"65000\",\"quantity\":\"0.001\",\"maxNotional\":\"100\",\"clientOrderId\":\"example-001\"}' --json\nrapidx 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\nrapidx automation start --input '{\"symbols\":[\"BINANCE_PERP_BTC_USDT\"],\"maxNotionalPerOrder\":\"100\",\"maxTotalNotional\":\"1000\",\"expiresInSeconds\":3600,\"allowedActions\":[\"order.place\",\"order.replace\",\"order.cancel\"],\"allowedOrderTypes\":[\"MARKET\",\"LIMIT\"],\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"}' --json\nrapidx order place-preview --input '{\"automationSessionId\":\"<automationSessionId>\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"MARKET\",\"quantity\":\"0.001\",\"maxNotional\":\"60\",\"clientOrderId\":\"auto-001\"}' --json\nrapidx trade preview --input '{\"targetCapabilityId\":\"position.set-leverage\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"leverage\":5}' --json\nrapidx trade verify-live --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"maxNotional\":\"100\",\"clientOrderId\":\"verify-001\",\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize a real verification order for BINANCE_PERP_BTC_USDT BUY maxNotional 100 with cancel cleanup.\"}' --json\n```\n\nAvoid shell chaining and wrapper scripts. Run commands from the agent workspace or use absolute paths supported by the host.\n\n## Final Answer\n\nFor trading work, state:\n\n- Which real tools or commands were called.\n- Which portfolio/order/position facts were verified.\n- Whether the final state is open, filled, cancelled, closed, unchanged, or not verified.\n- Any remaining action the user must explicitly authorize.\n\nFile v1.0.16:_meta.json\n\n{\n  \"ownerId\": \"kn73kps0f7zwmrka0kz101ymad87wexe\",\n  \"slug\": \"ltp-rapidx-trading\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1782819454075\n}\n\nFile v1.0.16:references/best-practices.md\n\n# RapidX Skills / CLI / MCP Best Practices\n\n## Overview\n\nRapidX is delivered as a complete Agent integration stack:\n\n- **Skills** teach the Agent how to install, configure, choose CLI or MCP, run self-checks, and operate RapidX.\n- **CLI** is the unified local runtime for atomic operations and also starts the MCP server through `rapidx mcp serve`.\n- **MCP** is the structured tool surface for MCP-capable Agents and shares the same CLI/Core capabilities.\n\nThe best practice is not to make users memorize every command. Let the Agent install and read the skills first. Load the installed `ltp-rapidx-config` skill to configure CLI/MCP and run self-checks, then load `ltp-rapidx-trading` for queries, preview, submit, automation, and readback. Skill names are not shell commands.\n\nRecommended flow:\n\n```text\nInstall Skills\n→ ltp-rapidx-config installs/configures CLI\n→ configure credentials and API host\n→ choose MCP_READY or CLI_ONLY_READY\n→ run self-check\n→ ltp-rapidx-trading uses MCP or CLI\n→ preview before write\n→ submit\n→ readback and reconcile\n```\n\n## 1. Role Of Each Layer\n\n| Layer | Role | Best Practice |\n|---|---|---|\n| Skills | Agent guidance | Install and read `ltp-rapidx-config` first, then use `ltp-rapidx-trading`. |\n| CLI | Unified local runtime | Install from official npm and use `rapidx ... --json` for CLI-only Agents. |\n| MCP | Structured tool interface | Start with `rapidx mcp serve`; MCP-capable Agents call `rapidx/*` tools directly. |\n| Core | Shared implementation | CLI and MCP share schemas, API client, preview, automation, audit, and self-check. |\n\nThe MCP server is not a separate package. It is started by the CLI:\n\n```bash\nrapidx mcp serve\n```\n\nMCP tools should call the shared RapidX core directly. They should not shell out through temporary scripts, wrapper files, or `cd ... && node ...` command chains.\n\n## 2. Recommended External User Flow\n\n### Step 1: Install Skills\n\nUsers can install skills themselves, or send an executable instruction to their Agent.\n\nRecommended instruction to send to the Agent:\n\n```text\nYou are my Agent. Install the RapidX skills into the current workspace using the skill installation method supported by your Agent host.\n\nSource repository:\nhttps://github.com/LiquidityTech/ltp-rapidx-skill\n\nInstall both skills:\n- ltp-rapidx-config\n- ltp-rapidx-trading\n\nAfter installation, load and follow the installed `ltp-rapidx-config` skill first. It is not a shell command. Use it to install or upgrade @liquiditytech/rapidx-cli from official npm, configure RapidX credentials, configure MCP if this host supports MCP, and run RapidX self-check.\n\nDo not start market queries or trading until you can report one of:\n- MCP_READY\n- CLI_ONLY_READY\n- NOT_VERIFIED\n```\n\nThe exact installation command depends on the Agent host. Use the official RapidX docs or skill repository README for Codex, Claude Code, Cursor, Gemini CLI, OpenCode, OpenClaw, and Hermes.\n\n### Step 2: Use Config Skill\n\nThe Agent should load and follow `ltp-rapidx-config` before any market query or trade. This is a skill-guided workflow, not a shell command named `ltp-rapidx-config`.\n\nConfig skill responsibilities:\n\n1. Confirm the Agent workspace.\n2. Install or upgrade `@liquiditytech/rapidx-cli` from official npm.\n3. Configure credentials.\n4. Configure MCP when the host supports MCP.\n5. Run tool discovery.\n6. Run read-only self-check.\n7. Report `MCP_READY`, `CLI_ONLY_READY`, or `NOT_VERIFIED`.\n\n### Step 3: Use Trading Skill\n\nAfter config is verified, the Agent should use `ltp-rapidx-trading`.\n\nTrading skill responsibilities:\n\n1. Choose MCP or CLI based on the config result.\n2. Read runtime schemas before constructing write inputs.\n3. Normalize symbols.\n4. Query current state before trading.\n5. Preview before every write.\n6. Use automation sessions only after explicit user authorization.\n7. Read back final order, position, transaction, or algo state.\n\n## 3. Credentials And API Host\n\nRequired values:\n\n```text\nLTP_ACCESS_KEY\nLTP_SECRET_KEY\nLTP_API_HOST\n```\n\n`LTP_API_HOST` has no default. Use the API host provided by the event, environment, or workspace owner.\n\nBest practice for non-programmer users:\n\n1. Prefer the Agent host's user-provided chat secret mechanism.\n2. Ask the user to create secrets named exactly `LTP_ACCESS_KEY`, `LTP_SECRET_KEY`, and `LTP_API_HOST`.\n3. Do not ask the user to paste full keys into public chats, screenshots, logs, or repositories.\n\nFallbacks:\n\n- MCP config environment references.\n- Shell environment variables.\n- A secret manager configured by the workspace owner.\n\nDo not use legacy names:\n\n```text\nLTP_BASE_URL\nRAPIDX_BASE_URL\nRAPIDX_PORTFOLIO_ACCESS_KEY\nRAPIDX_PORTFOLIO_SECRET_KEY\n```\n\n## 4. CLI Installation\n\nInstall from official npm:\n\n```bash\nnpm install -g @liquiditytech/rapidx-cli@latest\n```\n\nVerify:\n\n```bash\nrapidx --version\nrapidx schema --json\nrapidx auth check --json\nrapidx update check --json\n```\n\nFor CLI-only Agents, use JSON output:\n\n```bash\nrapidx self-check --json\n```\n\nAvoid:\n\n- wrapper scripts\n- temporary JavaScript bridge files\n- `cd ... && rapidx ...`\n- command chains that may trigger Agent host exec preflight blocking\n\nIf the Agent host needs a working directory, configure it through the host tool setting rather than a shell chain.\n\n## 5. MCP Configuration\n\nMCP-capable hosts should configure the server command as:\n\n```bash\nrapidx mcp serve\n```\n\nExample MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"rapidx\": {\n      \"command\": \"rapidx\",\n      \"args\": [\"mcp\", \"serve\"],\n      \"env\": {\n        \"LTP_ACCESS_KEY\": \"<host-expanded-secret-or-materialized-value>\",\n        \"LTP_SECRET_KEY\": \"<host-expanded-secret-or-materialized-value>\",\n        \"LTP_API_HOST\": \"<host-expanded-api-host-or-materialized-value>\"\n      }\n    }\n  }\n}\n```\n\nAfter configuration, reload or restart the MCP host and verify:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\n```\n\nIf MCP loads but `rapidx/self-check` reports credential/auth failures, inspect the `rapidx` MCP server env block. Literal placeholder values such as `${LTP_ACCESS_KEY}`, `$LTP_ACCESS_KEY`, `<secret-ref>`, `<provided-api-host>`, or empty strings mean the credentials were not materialized for the MCP runtime. Do not copy placeholder text literally. Read real values from an authorized secret source, then update only the `rapidx` server block with a YAML/JSON parser. Do not append duplicate blocks and do not remove config with broad regex such as `mcp_servers:.*`. Reload or restart MCP, then rerun `rapidx/tools`, `rapidx/update/check`, and `rapidx/self-check`; credential-auth must be `PASS`.\n\nExpected tool surface should include:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/transaction/executions\nrapidx/automation/start\nrapidx/automation/status\n```\n\nIf old tools such as `rapidx/order/preview` or `rapidx/order/executions` appear, upgrade the CLI, restart MCP, and rerun self-check.\n\n## 6. Version And Upgrade\n\nRun update checks during setup, review, or session startup:\n\n```bash\nrapidx update check --json\n```\n\nDo not run network update checks before every trade. It slows execution and creates avoidable failure points.\n\nUpgrade order:\n\n1. Upgrade skills when the local skill version is missing, stale, or unknown.\n2. Upgrade CLI.\n3. Restart or reload the MCP host.\n4. Run self-check again.\n\nSkills should include a `version:` field in `SKILL.md` frontmatter. Agents should use it when comparing local skills with the release manifest.\n\n## 7. Runtime Selection\n\nThe Agent should decide from evidence, not guessing.\n\n| State | Meaning | Action |\n|---|---|---|\n| `MCP_READY` | MCP tools are visible and self-check passed. | Use MCP tools. |\n| `CLI_ONLY_READY` | CLI works but MCP is unavailable. | Use CLI commands with `--json`. |\n| `NOT_VERIFIED` | Runtime cannot prove tool availability. | Stop and run config self-check. |\n\nDo not switch from MCP to CLI inside the same trade unless MCP is confirmed degraded and state has been read back.\n\nPreview ids are runtime-local:\n\n- MCP preview ids must be submitted through the same MCP runtime.\n- CLI preview ids must be submitted through the same CLI runtime.\n\n## 8. Session Startup Checklist\n\nAt the start of a trading session, the Agent should run:\n\n```text\nupdate check\nself-check\nportfolio overview\nportfolio assets\norder open-orders\nposition query\nalgo open-orders\n```\n\nMCP path:\n\n```text\nrapidx/update/check\nrapidx/self-check\nrapidx/portfolio/overview\nrapidx/portfolio/assets\nrapidx/order/open-orders\nrapidx/position/query\nrapidx/algo/open-orders\n```\n\nCLI path:\n\n```bash\nrapidx update check --json\nrapidx self-check --json\nrapidx portfolio overview --json\nrapidx portfolio assets --json\nrapidx order open-orders --json\nrapidx position query --json\nrapidx algo open-orders --json\n```\n\n## 9. Symbol And Quantity\n\nRapidX order inputs use RapidX canonical symbols.\n\nRecommended format:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\nNormalize common user expressions:\n\n| User expression | RapidX symbol |\n|---|---|\n| `BTCUSDT` | `BINANCE_PERP_BTC_USDT` |\n| `btcusdt` | `BINANCE_PERP_BTC_USDT` |\n| `BTC/USDT` | `BINANCE_PERP_BTC_USDT` |\n| `币安人生USDT` | `BINANCE_PERP_币安人生_USDT` |\n\nFor RapidX PERP order placement:\n\n- Use `quantity`.\n- Do not send quote `amount`.\n- Use `maxNotional` as a safety upper bound, not as the target order amount.\n\nBefore trading, query symbol rules:\n\n```bash\nrapidx market get-symbol-info --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\"}' --json\n```\n\nThe Agent should check minimum notional, minimum quantity, lot size, price tick size, and contract size. If the requested order is below the minimum, ask the user to approve the revised quantity or notional first.\n\n## 10. Read Before Write\n\nBefore any write, read the current state.\n\n| Workflow | Required reads |\n|---|---|\n| Place order | symbol info, ticker/orderbook, portfolio assets, open orders, positions |\n| Replace order | order query, open orders, symbol info |\n| Cancel order | order query or open orders |\n| Close position | position query, open orders |\n| Algo / TPSL | position query, algo open-orders, symbol info |\n| Set leverage | current leverage, position query |\n\nThe Agent should not infer current state from memory or previous chat.\n\n## 11. Preview Then Submit\n\nEvery write with `previewRequired=true` must use:\n\n```text\npreview\n→ submit with same business params + previewId + continueConsentId\n→ readback\n```\n\nOrder place:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/query\n```\n\nNon-order writes:\n\n```text\nrapidx/trade/preview\ntarget write tool\nmatching readback tool\n```\n\nIf any business parameter changes after preview, create a new preview. Business parameters include symbol, side, positionSide, quantity, price, orderType, orderId, clientOrderId, leverage, and account mode.\n\n## 12. Automation\n\nAutomation is a bounded local authorization session. It lets the Agent submit matching previews without asking for another per-order chat confirmation.\n\nAutomation still requires preview.\n\nUser authorization must include:\n\n- symbols\n- maxNotionalPerOrder\n- maxTotalNotional\n- duration\n- allowedActions\n- allowedOrderTypes\n- explicit risk text\n\nCreate a session:\n\n```bash\nrapidx automation start --input '{\n  \"symbols\": [\"BINANCE_PERP_BTC_USDT\"],\n  \"maxNotionalPerOrder\": \"100\",\n  \"maxTotalNotional\": \"1000\",\n  \"expiresInSeconds\": 3600,\n  \"allowedActions\": [\"order.place\", \"order.replace\", \"order.cancel\"],\n  \"allowedOrderTypes\": [\"MARKET\", \"LIMIT\"],\n  \"explicitUserConsent\": true,\n  \"acceptedRiskText\": \"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"\n}' --json\n```\n\nUse the session in preview:\n\n```bash\nrapidx order place-preview --input '{\n  \"automationSessionId\": \"ras_xxx\",\n  \"symbol\": \"BINANCE_PERP_BTC_USDT\",\n  \"side\": \"BUY\",\n  \"orderType\": \"MARKET\",\n  \"quantity\": \"0.001\",\n  \"maxNotional\": \"100\",\n  \"clientOrderId\": \"auto-001\"\n}' --json\n```\n\nAuto-submit only when preview returns:\n\n```json\n{\n  \"automationSession\": {\n    \"confirmationMode\": \"automation-session\"\n  },\n  \"confirmation\": {\n    \"submitToken\": \"confirm_rpv_xxx\"\n  }\n}\n```\n\nAutomation management:\n\n| Tool | Best Practice |\n|---|---|\n| `automation status` | Check remaining scope, expiry, and allowed actions. |\n| `automation extend` | Requires new user authorization; only extends time. |\n| `automation stop` | Stops future automation preview/submit; does not cancel existing orders. |\n\nUse `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]` for normal order lifecycle automation.\n\n## 13. Order Types\n\nUse runtime schema as the source of truth.\n\n| Order type | Use when | Required fields |\n|---|---|---|\n| `LIMIT` | User requires price boundary. | `price`, `quantity` |\n| `MARKET` | User wants immediate execution and accepts slippage. | `quantity`, `maxNotional` |\n\nDo not silently convert a requested `MARKET` order into a best-bid or best-ask `LIMIT` order.\n\n`MARKET` orders are supported after preview and explicit authorization. After submit, read back order status, executions, and position.\n\n## 14. Readback And Reconciliation\n\nSubmit success is not enough. The Agent must verify final state.\n\nAfter place:\n\n```text\norder query\ntransaction executions\nposition query\n```\n\nAfter cancel:\n\n```text\norder query until terminal\norder open-orders\n```\n\nAfter close position:\n\n```text\nposition query\ntransaction executions\n```\n\nAfter algo place:\n\n```text\nalgo open-orders\nalgo query\n```\n\n`order.cancel` is asynchronous. `cancelAccepted=true` means the request was accepted. If `terminalStateConfirmed=false`, poll `order query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout.\n\nIf a write times out or state is uncertain, query state before retrying. Do not blindly repeat write requests.\n\n## 15. Position And Algo\n\nPosition close:\n\n- Query current position first.\n- NET mode: omit `positionSide`.\n- HEDGE mode: use actual `LONG` or `SHORT`.\n- Do not pass `side` or `quantity`.\n- Use reduce-only order flow for partial close.\n\nSet leverage:\n\n- Preview with `targetCapabilityId=\"position.set-leverage\"`.\n- User must authorize symbol and leverage.\n- Read back with `position get-leverage`.\n\nTPSL / conditional algo:\n\n- Preview with `targetCapabilityId=\"algo.place\"`.\n- Submit `algo place`.\n- Read back with `algo open-orders` or `algo query`.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- Require at least one take-profit or stop-loss trigger.\n\n## 16. Error Handling\n\n| status | Agent action |\n|---|---|\n| `INVALID_INPUT` | Fix input; do not retry unchanged. |\n| `BLOCKED` | Read blocking reason; usually re-preview or ask user. |\n| `NOT_FOUND` | Read current state; target may not exist or may no longer be open. |\n| `PERMISSION_SCOPE_ERROR` | Credential scope does not cover the requested capability. |\n| `BUSINESS_ERROR` | Upstream rule rejected the request; inspect `details`. |\n| `NOT_VERIFIED` | State could not be proven; query again or report unverified. |\n| `FAIL` | Diagnose auth, network, startup, or malformed response. |\n\nCommon cases:\n\n- Invalid `orderId` format returns local `INVALID_INPUT`.\n- Valid-format but missing order returns readback `NOT_FOUND`.\n- Expired preview requires a new preview.\n- Submit params changed after preview returns `BLOCKED`.\n- Old MCP tool list means upgrade CLI and reload MCP host.\n\n## 17. Final Answer Format\n\nAgent final answers should include:\n\n```text\nRuntime path: MCP_READY or CLI_ONLY_READY\nTools or commands called\nSymbol / side / orderType / quantity / price\nPreview result\nSubmit result\nOrder id or client order id\nReadback result\nFinal state: open, filled, cancelled, closed, unchanged, or not verified\nRemaining user authorization needed, if any\n```\n\nFor automation:\n\n```text\nautomationSessionId\nsymbols\nmaxNotionalPerOrder\nmaxTotalNotional\nused or remaining scope\nexpiresAt\nallowedActions\nallowedOrderTypes\n```\n\n## 18. Things Agents Must Not Do\n\n- Do not fake query, trade, self-check, or readback results.\n- Do not echo full keys.\n- Do not submit writes without a preview token.\n- Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n- Do not shell through temporary scripts.\n- Do not use `cd ... && rapidx ...` command chains.\n- Do not blindly retry after timeout.\n- Do not treat `maxNotional` as target order amount.\n- Do not auto-increase orders to meet minimum notional without user approval.\n- Do not silently replace MARKET with LIMIT.\n- Do not interpret `open-orders` as \"open a new order\".\n\n## 19. Minimal Safe Workflows\n\n### First-Time Setup\n\n```text\n1. Install ltp-rapidx-config and ltp-rapidx-trading skills\n2. Load and follow the installed `ltp-rapidx-config` skill\n3. Install CLI from official npm\n4. Configure LTP_ACCESS_KEY, LTP_SECRET_KEY, LTP_API_HOST\n5. Configure MCP if supported\n6. Run update check and self-check\n7. Confirm MCP_READY or CLI_ONLY_READY\n```\n\n### Manual Trade\n\n```text\n1. Read portfolio, open orders, positions\n2. Read symbol info and market data\n3. order place-preview\n4. Ask user to confirm exact preview\n5. order place\n6. order query\n7. transaction executions or position query\n```\n\n### Automation Trade\n\n```text\n1. User authorizes automation scope in chat\n2. automation start\n3. order place-preview with automationSessionId\n4. order place with previewId and continueConsentId\n5. order query\n6. automation status\n```\n\n### Replace Or Cancel\n\n```text\n1. order open-orders\n2. order query\n3. replace-preview or cancel-preview\n4. replace or cancel\n5. order query until final or known current state\n```\n\n### Close Position\n\n```text\n1. position query\n2. trade preview with targetCapabilityId=\"position.close\"\n3. position close\n4. position query\n5. transaction executions when needed\n```\n\n### TPSL / Algo\n\n```text\n1. position query\n2. algo open-orders\n3. trade preview with targetCapabilityId=\"algo.place\"\n4. algo place\n5. algo open-orders or algo query\n```\n\n## 20. Local Skill References\n\nUse these local references from the installed skill directory:\n\n- `references/best-practices.md`\n- `references/capability-overview.md`\n\nFile v1.0.16:references/capability-overview.md\n\n# RapidX Capability Overview\n\nUse `rapidx schema --json` or MCP `rapidx/tools` as the runtime source of truth. This reference is a compact map for Agent planning.\n\n## Runtime Layers\n\n| Layer | Purpose |\n|---|---|\n| CLI | Atomic local operations through `rapidx <domain> <action> --json` |\n| MCP | Structured Agent tools served by `rapidx mcp serve` |\n| Core | Shared schemas, credential resolution, RapidX API client, preview, automation, audit, and self-check |\n| Skills | Agent guidance for setup, review, trading, automation, and readback |\n\n## Diagnostics And Discovery\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx --version` | - |\n| `rapidx schema --json` | `rapidx/tools` |\n| `rapidx update check --json` | `rapidx/update/check` |\n| `rapidx auth check` | - |\n| `rapidx doctor --json` | - |\n| `rapidx self-check --json` | `rapidx/self-check` |\n| `rapidx mcp serve` | starts the MCP server |\n\n## Automation\n\nAutomation sessions are local authorization sessions. They do not map to RapidX HTTP endpoints.\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx automation start` | `rapidx/automation/start` |\n| `rapidx automation list` | `rapidx/automation/list` |\n| `rapidx automation status` | `rapidx/automation/status` |\n| `rapidx automation extend` | `rapidx/automation/extend` |\n| `rapidx automation stop` | `rapidx/automation/stop` |\n\n## Market\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx market get-ticker` | `rapidx/market/get-ticker` |\n| `rapidx market get-orderbook` | `rapidx/market/get-orderbook` |\n| `rapidx market get-klines` | `rapidx/market/get-klines` |\n| `rapidx market get-funding-rate` | `rapidx/market/get-funding-rate` |\n| `rapidx market get-mark-price` | `rapidx/market/get-mark-price` |\n| `rapidx market get-symbol-info` | `rapidx/market/get-symbol-info` |\n| `rapidx market get-open-interest` | `rapidx/market/get-open-interest` |\n\n## Portfolio\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx portfolio overview` | `rapidx/portfolio/overview` | `GET /api/v1/trading/account` |\n| `rapidx portfolio assets` | `rapidx/portfolio/assets` | `GET /api/v1/trading/portfolio/assets` |\n| `rapidx portfolio statement` | `rapidx/portfolio/statement` | `GET /api/v1/trading/statement` |\n| `rapidx portfolio user-fee-rate` | `rapidx/portfolio/user-fee-rate` | `GET /api/v1/broker/feeRate` |\n| `rapidx portfolio position-bracket` | `rapidx/portfolio/position-bracket` | `GET /api/v1/trading/broker/positionBracket` |\n| `rapidx portfolio set-position-mode` | `rapidx/portfolio/set-position-mode` | `POST /api/v1/trading/account` |\n\n## Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx order place-preview` | `rapidx/order/place-preview` | preview for place |\n| `rapidx order replace-preview` | `rapidx/order/replace-preview` | preview for replace |\n| `rapidx order cancel-preview` | `rapidx/order/cancel-preview` | preview for cancel |\n| `rapidx order place` | `rapidx/order/place` | `POST /api/v1/trading/order` |\n| `rapidx order replace` | `rapidx/order/replace` | `PUT /api/v1/trading/order` |\n| `rapidx order cancel` | `rapidx/order/cancel` | `DELETE /api/v1/trading/order` |\n| `rapidx order cancel-all` | `rapidx/order/cancel-all` | `DELETE /api/v1/trading/cancelAll` |\n| `rapidx order query` | `rapidx/order/query` | `GET /api/v1/trading/order` |\n| `rapidx order open-orders` | `rapidx/order/open-orders` | `GET /api/v1/trading/orders` |\n| `rapidx order history` | `rapidx/order/history` | `GET /api/v1/trading/history/orders` |\n\n`open-orders` means current non-terminal orders, not \"open a new order\". `order.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Transactions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx transaction executions` | `rapidx/transaction/executions` | `GET /api/v1/trading/executions` |\n\n## Positions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx position query` | `rapidx/position/query` | `GET /api/v1/trading/position` |\n| `rapidx position history` | `rapidx/position/history` | `GET /api/v1/trading/history/position` |\n| `rapidx position get-leverage` | `rapidx/position/get-leverage` | `GET /api/v1/trading/perp/leverage` |\n| `rapidx position set-leverage` | `rapidx/position/set-leverage` | `POST /api/v1/trading/position/leverage` |\n| `rapidx position close` | `rapidx/position/close` | `DELETE /api/v1/trading/position` |\n| `rapidx position close-all` | `rapidx/position/close-all` | `DELETE /api/v1/trading/positions` |\n\n`position.close` does not take `side` or `quantity`. In NET mode, omit `positionSide`; in HEDGE mode, pass the actual `LONG` or `SHORT` side.\n\n## Algo Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx algo place` | `rapidx/algo/place` | `POST /api/v1/algo/order` |\n| `rapidx algo replace` | `rapidx/algo/replace` | `PUT /api/v1/algo/order` |\n| `rapidx algo cancel` | `rapidx/algo/cancel` | `DELETE /api/v1/algo/order` |\n| `rapidx algo query` | `rapidx/algo/query` | `GET /api/v1/algo/order` |\n| `rapidx algo open-orders` | `rapidx/algo/open-orders` | `GET /api/v1/algo/openOrders` |\n| `rapidx algo history` | `rapidx/algo/history` | `GET /api/v1/algo/history/orders` |\n\n`algo.open-orders` means current non-terminal algo orders. `algo.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Generic Preview And Live Verification\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx trade preview` | `rapidx/trade/preview` |\n| `rapidx trade verify-live` | `rapidx/trade/verify-live` |\n\nUse `rapidx/trade/preview` for non-order writes such as `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Symbol Format\n\nRecommended input symbols:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\n`OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`.\n\n## Status Meanings\n\n| Status | Meaning |\n|---|---|\n| `PASS` | Tool or command completed successfully |\n| `INVALID_INPUT` | Local schema or input validation failed |\n| `BLOCKED` | Preview, safety, compatibility, or policy check blocked the action |\n| `NOT_FOUND` | Requested resource was not found |\n| `PERMISSION_SCOPE_ERROR` | Credentials do not cover the requested scope |\n| `BUSINESS_ERROR` | RapidX or venue business rule rejected the request |\n| `NOT_VERIFIED` | Requested state could not be proven |\n| `FAIL` | Startup, auth, network, malformed response, or unexpected failure |\n\nFile v1.0.16:skill-card.md\n\n## Description: <br>\nUse when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[liquiditytech](https://clawhub.ai/user/liquiditytech) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, traders, and operations teams use this skill to have an agent read RapidX market and portfolio state, preview orders, submit authorized order, position, and algo actions, manage automation sessions, and verify resulting state. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can guide an agent through real trading actions that may create financial loss. <br>\nMitigation: Use narrow, short-lived, low-notional sessions; require preview evidence and explicit authorization before write actions; verify final state with readback. <br>\nRisk: Bulk cancel-all, close-all, or automation scopes can affect many orders or positions. <br>\nMitigation: Enable broad actions only when explicitly intended, review preview details carefully, and keep automation scope limited to authorized symbols, actions, order types, duration, and notional caps. <br>\nRisk: Credential handling mistakes can expose secrets or leave the RapidX runtime unverified. <br>\nMitigation: Use approved secret mechanisms, never echo secrets, verify MCP or CLI credential materialization with self-checks, and stop trading workflows when verification is stale or failing. <br>\n\n\n## Reference(s): <br>\n- [RapidX Capability Overview](references/capability-overview.md) <br>\n- [RapidX Skills / CLI / MCP Best Practices](references/best-practices.md) <br>\n- [LTP RapidX Trading on ClawHub](https://clawhub.ai/liquiditytech/skills/ltp-rapidx-trading) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Shell commands, Configuration, API Calls] <br>\n**Output Format:** [Markdown guidance with inline MCP tool names and JSON CLI command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires observed MCP or rapidx CLI evidence for trading claims; write actions require preview, explicit authorization, and readback.] <br>\n\n## Skill Version(s): <br>\n1.0.16 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.15: 5 files, 16678 bytes\n\nFiles: references/best-practices.md (17692b), references/capability-overview.md (6601b), skill-card.md (2770b), SKILL.md (17326b), _meta.json (138b)\n\nFile v1.0.15:SKILL.md\n\n---\nname: ltp-rapidx-trading\nversion: 1.0.15\ndescription: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n---\n\n# RapidX Trading\n\nUse 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`.\n\n## References\n\n- Read `references/capability-overview.md` when selecting a CLI command, MCP tool, capability id, or RapidX endpoint mapping.\n- Read `references/best-practices.md` when planning a full workflow across skills, CLI, MCP, preview, automation, and readback.\n\n## Non-Negotiable Rules\n\n- Do not fake query or trading results. Every claim must come from an actual MCP tool or `rapidx ... --json` response, and final summaries must include `toolOrCommandEvidence` or equivalent observed evidence.\n- Do not use shell bridge scripts, temporary JavaScript scripts, directory-changing shell chains, or chained shell invocations.\n- Treat all trade-write tools as real production actions.\n- Never submit a write without preview evidence and explicit user consent for that specific write, unless the user has explicitly enabled RapidX automation mode for the current scope in chat.\n- Use `confirmation.submitToken` from the preview response as the submit `continueConsentId`.\n- Keep business parameters unchanged between preview and submit. If symbol, side, positionSide, quantity, price, order id, leverage, or mode changes, create a new preview.\n- If a write times out or the result is uncertain, query state before retrying.\n- Never echo secrets.\n\n## Invocation Path\n\nBefore any trading workflow, read the latest integration review from `ltp-rapidx-config` or run that skill first.\n\n- `MCP_READY`: use `rapidx/...` MCP tools and do not shell out to wrapper scripts.\n- `CLI_ONLY_READY`: use direct `rapidx ... --json` commands and do not claim MCP tools were called.\n- `NOT_VERIFIED` or only `CLI_READY`: stop and run config self-check before portfolio, market, or trade workflows.\n\nDo 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.\n\nIf MCP setup or discovery is missing, stale, or failing, stop trading setup work and return to `ltp-rapidx-config` MCP Config. Do not invent host-specific MCP add commands in this trading skill.\n\n## Version Check\n\nAt the start of a trading session or before the first write in a session, check the cached release status once:\n\n- `MCP_READY`: call `rapidx/update/check` once, then `rapidx/self-check`.\n- `CLI_ONLY_READY`: run `rapidx update check --json`.\n\nDo not perform a fresh network update check before every trade submit. If the update result is `WRITE_BLOCKED`, `UPGRADE_REQUIRED`, or `skillsUpdateRecommended=true`, stop all trade-write actions and run `ltp-rapidx-config` upgrade handling first. Upgrade or reinstall skills first when their local frontmatter `version` is missing, stale, or unknown; then upgrade the CLI when needed, restart or reload the MCP host when applicable, and rerun self-check. Do not block read-only work solely because skills update is recommended.\n\n## Current MCP Surface\n\nUse `rapidx/tools` for the authoritative runtime schema. It returns the tool list plus concrete `inputSchemas`; read the relevant input schema before constructing write inputs. Current normal-use tool names are:\n\n```text\nMarket:   rapidx/market/get-ticker, rapidx/market/get-orderbook,\n          rapidx/market/get-klines, rapidx/market/get-funding-rate,\n          rapidx/market/get-mark-price, rapidx/market/get-symbol-info,\n          rapidx/market/get-open-interest\nPortfolio: rapidx/portfolio/overview, rapidx/portfolio/assets,\n          rapidx/portfolio/statement, rapidx/portfolio/user-fee-rate,\n          rapidx/portfolio/position-bracket, rapidx/portfolio/set-position-mode\nUpdate:   rapidx/update/check\nTrade:    rapidx/trade/preview, rapidx/trade/verify-live\nAutomation:\n          rapidx/automation/start, rapidx/automation/list,\n          rapidx/automation/status, rapidx/automation/extend,\n          rapidx/automation/stop\nOrder:    rapidx/order/place-preview, rapidx/order/replace-preview,\n          rapidx/order/cancel-preview, rapidx/order/place,\n          rapidx/order/replace, rapidx/order/cancel,\n          rapidx/order/cancel-all, rapidx/order/query,\n          rapidx/order/open-orders, rapidx/order/history\nTransactions:\n          rapidx/transaction/executions\nPosition: rapidx/position/query, rapidx/position/history,\n          rapidx/position/get-leverage, rapidx/position/close,\n          rapidx/position/close-all, rapidx/position/set-leverage\nAlgo:     rapidx/algo/place, rapidx/algo/replace,\n          rapidx/algo/cancel, rapidx/algo/open-orders,\n          rapidx/algo/history, rapidx/algo/query\n```\n\nUse `rapidx/trade/verify-live` for small real-trade verification.\n\n`open-orders` means current non-terminal orders, not \"open an order\". These orders may still be fillable, replaceable, or cancelable. `algo/open-orders` means current non-terminal algo orders such as conditional or TPSL orders that have not triggered, been canceled, or otherwise ended.\n`rapidx/order/history` and `rapidx/algo/history` accept optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream server default range.\n\n## Read Workflow\n\nBefore making trading decisions, refresh state:\n\n```text\n1. rapidx/portfolio/overview\n2. rapidx/portfolio/assets\n3. rapidx/order/open-orders\n4. rapidx/position/query\n5. rapidx/algo/open-orders\n6. rapidx/transaction/executions when fills/transactions are needed\n```\n\nFor a symbol, refresh market data:\n\n```text\n1. rapidx/market/get-symbol-info\n2. rapidx/market/get-ticker\n3. rapidx/market/get-orderbook\n4. rapidx/market/get-mark-price\n5. rapidx/market/get-klines\n6. rapidx/market/get-funding-rate      # PERP only\n7. rapidx/market/get-open-interest     # PERP only\n```\n\nUse RapidX symbol format `BINANCE_PERP_<BASE>_<QUOTE>`, for example `BINANCE_PERP_BTC_USDT` or `BINANCE_PERP_ETH_USDT`. `OKX_PERP_<BASE>_<QUOTE>` is supported for OKX perpetual instruments. If the user says an OKX swap symbol, `OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`. Market adapters may return `originalSymbol` for venue-native symbols such as `BTCUSDT` or `BTC-USDT-SWAP`.\n\nNormalize user-facing Binance symbols before tool calls. If the user says `BTCUSDT`, `btcusdt`, or `BTC/USDT`, call RapidX with `BINANCE_PERP_BTC_USDT`. If the base asset contains Chinese characters, preserve the base exactly: `币安人生USDT` becomes `BINANCE_PERP_币安人生_USDT`. Do not translate Chinese base assets. Do not pass Binance native symbols directly as the `symbol` field. If exchange, type, base, or quote cannot be identified, ask the user to confirm the RapidX symbol first.\n\nInspect symbol info before placing or replacing orders.\nFor hedge-mode orders, pass `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` in order placement, algo placement, set-leverage, or verify-live inputs when the schema exposes it. Do not call `rapidx/portfolio/set-position-mode` just to choose an order side.\n\n## Preview Then Submit\n\nAll writes use this pattern:\n\n1. Call the write-specific preview tool.\n2. Read `previewId` and `confirmation.submitToken`.\n3. Show the user the actual `requestSummary`, `businessParams`, max notional, order id/client order id, and `riskNotes`.\n4. Ask for explicit consent for this one write.\n5. Submit the target write with the same business parameters plus `previewId` and `continueConsentId=<confirmation.submitToken>`.\n6. Query resulting state with the relevant read tool.\n\nIf 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.\n\nPreview ids are runtime-local. Use MCP preview ids only with the same MCP server runtime. Use CLI preview ids only with the same CLI preview store. Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n\nAutomation session still requires preview. Use it only when the user explicitly enables RapidX automation in chat and authorizes symbol, per-order max notional, total max notional, duration, allowed actions, and allowed order types. For normal order lifecycle automation, use `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]`. First create a session with `rapidx/automation/start`; the input must include `explicitUserConsent=true` and `acceptedRiskText` copied from the user's authorization. Then add `automationSessionId` to order place/replace/cancel preview input. If the preview returns `automationSession.confirmationMode=\"automation-session\"` and `confirmation.submitToken`, submit that preview without asking for another per-order chat confirmation. Do not invent automation scope. If no matching session exists, create one only after user authorization. If multiple sessions match, ask which session to use or pass the intended `automationSessionId`.\n\nAutomation session flow:\n\n```text\n1. rapidx/automation/start with explicitUserConsent=true and acceptedRiskText from the user\n2. rapidx/order/place-preview, rapidx/order/replace-preview, or rapidx/order/cancel-preview with automationSessionId\n3. Submit the matching order write with the same business parameters plus previewId and continueConsentId\n4. rapidx/automation/status when the agent needs remaining session scope\n5. rapidx/automation/extend only after the user authorizes more time; include explicitUserConsent=true and a new acceptedRiskText\n6. rapidx/automation/stop when the user says to stop automation\n```\n\nStopping automation blocks future automation previews/submits. It does not cancel existing orders.\n\nAutomation notional accounting: `order.place` consumes notional by `maxNotional`; `order.replace` consumes the replacement order notional; `order.cancel` consumes no notional.\n\n`maxNotional` is a safety upper bound, not the target order quantity. Before increasing quantity or notional to satisfy an exchange rule, check symbol `minNotional` and ask the user to confirm the new quantity or notional.\n\nOrder placement:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query or rapidx/order/open-orders\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/open-orders\n```\n\n`rapidx/order/cancel` is asynchronous. If the result has `cancelAccepted=true` and `terminalStateConfirmed=false`, poll `rapidx/order/query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout before claiming a final state.\n\nNon-order writes:\n\n```text\nrapidx/trade/preview with targetCapabilityId\ntarget tool, such as rapidx/position/set-leverage\nmatching read-back tool\n```\n\nCommon `targetCapabilityId` values are `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Order Rules\n\n- LIMIT order: requires quantity and price.\n- MARKET order: allowed after preview and explicit user authorization. Treat it as immediate execution with possible slippage and no guaranteed fill price.\n- For RapidX PERP order placement, pass `quantity`. Do not use quote `amount`.\n- PERP writes are leverage and margin sensitive.\n- Hedge-mode order placement uses `positionSide=\"LONG\"` or `positionSide=\"SHORT\"` when needed.\n- Use a stable `clientOrderId` when the schema accepts one so status can be checked after a timeout.\n- Do not infer fills from placement. Confirm through `order/query`, `order/open-orders`, `order/history`, executions, or positions.\n- If a requested order is below the symbol `minNotional`, do not auto-increase to the minimum. Ask the user to approve the revised quantity or notional first.\n- Do not tell users that RapidX blocks all MARKET orders by default. Do not silently replace a requested MARKET order with a best-bid/best-ask LIMIT order.\n\n## Algo Orders\n\nUse preview/submit for `rapidx/algo/place`, `rapidx/algo/replace`, and `rapidx/algo/cancel`.\n\nBefore placing TPSL or conditional orders:\n\n- Confirm target symbol, side, quantity when required, trigger price, stop/take-profit intent, and position side if hedge mode is used.\n- For TPSL, require at least one valid take-profit or stop-loss trigger.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- After submit, verify through `rapidx/algo/open-orders`.\n\n## Position And Portfolio Risk Writes\n\nUse separate explicit consent for each:\n\n- `rapidx/position/set-leverage` changes future risk for the symbol.\n- `rapidx/portfolio/set-position-mode` changes account position mode and can affect existing workflows. Use it only when the user explicitly asks to change account position mode.\n- `rapidx/position/close` is a real close-position action. Verify current position first.\n\nDo 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/query`. Use a reduce-only order flow for partial closes. If `order/query` 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.\n\nDo not test these writes as part of ordinary setup.\n\n## Live Trading Verification\n\nUse `rapidx/trade/verify-live` only when the user explicitly asks for a small real-trade verification and authorizes symbol, exchange, notional cap, cleanup behavior, and test window. The tool input must include `acceptedRiskText` that names the exact symbol, side, positionSide when provided, maxNotional, real-order risk, and cancel cleanup behavior.\n\nThe verification must include:\n\n```text\n1. read-only self-check\n2. market and symbol rule lookup\n3. explicit user consent\n4. internal preview\n5. post-only or safely far-from-market limit submit\n6. order query\n7. replace when supported\n8. cancel\n9. cleanup check for open orders, positions, and algo orders\n```\n\nIf any step cannot be verified, return `NOT_VERIFIED`, `EXPECTED_ERROR`, `INVALID_INPUT`, `BLOCKED`, `NOT_FOUND`, `PERMISSION_SCOPE_ERROR`, `BUSINESS_ERROR`, or `FAIL` with observed evidence. Do not call it successful without real evidence.\n\nOrder id checks have two layers: invalid `orderId` format is local `INVALID_INPUT`; valid-format but missing/non-open orders are discovered through RapidX readback during `order.query`, `order.replace-preview`, or `order.cancel-preview` and should be reported as `NOT_FOUND` or `BLOCKED` with evidence. If the user provides only `clientOrderId`, do not invent or validate an `orderId`.\n\n## CLI Fallback\n\nWhen MCP is unavailable, use direct CLI equivalents with `--json` and the same preview/submit discipline:\n\n```bash\nrapidx order place-preview --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"LIMIT\",\"price\":\"65000\",\"quantity\":\"0.001\",\"maxNotional\":\"100\",\"clientOrderId\":\"example-001\"}' --json\nrapidx 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\nrapidx automation start --input '{\"symbols\":[\"BINANCE_PERP_BTC_USDT\"],\"maxNotionalPerOrder\":\"100\",\"maxTotalNotional\":\"1000\",\"expiresInSeconds\":3600,\"allowedActions\":[\"order.place\",\"order.replace\",\"order.cancel\"],\"allowedOrderTypes\":[\"MARKET\",\"LIMIT\"],\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"}' --json\nrapidx order place-preview --input '{\"automationSessionId\":\"<automationSessionId>\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"orderType\":\"MARKET\",\"quantity\":\"0.001\",\"maxNotional\":\"60\",\"clientOrderId\":\"auto-001\"}' --json\nrapidx trade preview --input '{\"targetCapabilityId\":\"position.set-leverage\",\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"leverage\":5}' --json\nrapidx trade verify-live --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\",\"side\":\"BUY\",\"maxNotional\":\"100\",\"clientOrderId\":\"verify-001\",\"explicitUserConsent\":true,\"acceptedRiskText\":\"I authorize a real verification order for BINANCE_PERP_BTC_USDT BUY maxNotional 100 with cancel cleanup.\"}' --json\n```\n\nAvoid shell chaining and wrapper scripts. Run commands from the agent workspace or use absolute paths supported by the host.\n\n## Final Answer\n\nFor trading work, state:\n\n- Which real tools or commands were called.\n- Which portfolio/order/position facts were verified.\n- Whether the final state is open, filled, cancelled, closed, unchanged, or not verified.\n- Any remaining action the user must explicitly authorize.\n\nFile v1.0.15:_meta.json\n\n{\n  \"ownerId\": \"kn73kps0f7zwmrka0kz101ymad87wexe\",\n  \"slug\": \"ltp-rapidx-trading\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1782718763178\n}\n\nFile v1.0.15:references/best-practices.md\n\n# RapidX Skills / CLI / MCP Best Practices\n\n## Overview\n\nRapidX is delivered as a complete Agent integration stack:\n\n- **Skills** teach the Agent how to install, configure, choose CLI or MCP, run self-checks, and operate RapidX.\n- **CLI** is the unified local runtime for atomic operations and also starts the MCP server through `rapidx mcp serve`.\n- **MCP** is the structured tool surface for MCP-capable Agents and shares the same CLI/Core capabilities.\n\nThe best practice is not to make users memorize every command. Let the Agent install and read the skills first. Load the installed `ltp-rapidx-config` skill to configure CLI/MCP and run self-checks, then load `ltp-rapidx-trading` for queries, preview, submit, automation, and readback. Skill names are not shell commands.\n\nRecommended flow:\n\n```text\nInstall Skills\n→ ltp-rapidx-config installs/configures CLI\n→ configure credentials and API host\n→ choose MCP_READY or CLI_ONLY_READY\n→ run self-check\n→ ltp-rapidx-trading uses MCP or CLI\n→ preview before write\n→ submit\n→ readback and reconcile\n```\n\n## 1. Role Of Each Layer\n\n| Layer | Role | Best Practice |\n|---|---|---|\n| Skills | Agent guidance | Install and read `ltp-rapidx-config` first, then use `ltp-rapidx-trading`. |\n| CLI | Unified local runtime | Install from official npm and use `rapidx ... --json` for CLI-only Agents. |\n| MCP | Structured tool interface | Start with `rapidx mcp serve`; MCP-capable Agents call `rapidx/*` tools directly. |\n| Core | Shared implementation | CLI and MCP share schemas, API client, preview, automation, audit, and self-check. |\n\nThe MCP server is not a separate package. It is started by the CLI:\n\n```bash\nrapidx mcp serve\n```\n\nMCP tools should call the shared RapidX core directly. They should not shell out through temporary scripts, wrapper files, or `cd ... && node ...` command chains.\n\n## 2. Recommended External User Flow\n\n### Step 1: Install Skills\n\nUsers can install skills themselves, or send an executable instruction to their Agent.\n\nRecommended instruction to send to the Agent:\n\n```text\nYou are my Agent. Install the RapidX skills into the current workspace using the skill installation method supported by your Agent host.\n\nSource repository:\nhttps://github.com/LiquidityTech/ltp-rapidx-skill\n\nInstall both skills:\n- ltp-rapidx-config\n- ltp-rapidx-trading\n\nAfter installation, load and follow the installed `ltp-rapidx-config` skill first. It is not a shell command. Use it to install or upgrade @liquiditytech/rapidx-cli from official npm, configure RapidX credentials, configure MCP if this host supports MCP, and run RapidX self-check.\n\nDo not start market queries or trading until you can report one of:\n- MCP_READY\n- CLI_ONLY_READY\n- NOT_VERIFIED\n```\n\nThe exact installation command depends on the Agent host. Use the official RapidX docs or skill repository README for Codex, Claude Code, Cursor, Gemini CLI, OpenCode, OpenClaw, and Hermes.\n\n### Step 2: Use Config Skill\n\nThe Agent should load and follow `ltp-rapidx-config` before any market query or trade. This is a skill-guided workflow, not a shell command named `ltp-rapidx-config`.\n\nConfig skill responsibilities:\n\n1. Confirm the Agent workspace.\n2. Install or upgrade `@liquiditytech/rapidx-cli` from official npm.\n3. Configure credentials.\n4. Configure MCP when the host supports MCP.\n5. Run tool discovery.\n6. Run read-only self-check.\n7. Report `MCP_READY`, `CLI_ONLY_READY`, or `NOT_VERIFIED`.\n\n### Step 3: Use Trading Skill\n\nAfter config is verified, the Agent should use `ltp-rapidx-trading`.\n\nTrading skill responsibilities:\n\n1. Choose MCP or CLI based on the config result.\n2. Read runtime schemas before constructing write inputs.\n3. Normalize symbols.\n4. Query current state before trading.\n5. Preview before every write.\n6. Use automation sessions only after explicit user authorization.\n7. Read back final order, position, transaction, or algo state.\n\n## 3. Credentials And API Host\n\nRequired values:\n\n```text\nLTP_ACCESS_KEY\nLTP_SECRET_KEY\nLTP_API_HOST\n```\n\n`LTP_API_HOST` has no default. Use the API host provided by the event, environment, or workspace owner.\n\nBest practice for non-programmer users:\n\n1. Prefer the Agent host's user-provided chat secret mechanism.\n2. Ask the user to create secrets named exactly `LTP_ACCESS_KEY`, `LTP_SECRET_KEY`, and `LTP_API_HOST`.\n3. Do not ask the user to paste full keys into public chats, screenshots, logs, or repositories.\n\nFallbacks:\n\n- MCP config environment references.\n- Shell environment variables.\n- A secret manager configured by the workspace owner.\n\nDo not use legacy names:\n\n```text\nLTP_BASE_URL\nRAPIDX_BASE_URL\nRAPIDX_PORTFOLIO_ACCESS_KEY\nRAPIDX_PORTFOLIO_SECRET_KEY\n```\n\n## 4. CLI Installation\n\nInstall from official npm:\n\n```bash\nnpm install -g @liquiditytech/rapidx-cli@latest\n```\n\nVerify:\n\n```bash\nrapidx --version\nrapidx schema --json\nrapidx auth check --json\nrapidx update check --json\n```\n\nFor CLI-only Agents, use JSON output:\n\n```bash\nrapidx self-check --json\n```\n\nAvoid:\n\n- wrapper scripts\n- temporary JavaScript bridge files\n- `cd ... && rapidx ...`\n- command chains that may trigger Agent host exec preflight blocking\n\nIf the Agent host needs a working directory, configure it through the host tool setting rather than a shell chain.\n\n## 5. MCP Configuration\n\nMCP-capable hosts should configure the server command as:\n\n```bash\nrapidx mcp serve\n```\n\nExample MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"rapidx\": {\n      \"command\": \"rapidx\",\n      \"args\": [\"mcp\", \"serve\"],\n      \"env\": {\n        \"LTP_ACCESS_KEY\": \"<secret-ref>\",\n        \"LTP_SECRET_KEY\": \"<secret-ref>\",\n        \"LTP_API_HOST\": \"<secret-ref>\"\n      }\n    }\n  }\n}\n```\n\nAfter configuration, reload or restart the MCP host and verify:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\n```\n\nExpected tool surface should include:\n\n```text\nrapidx/tools\nrapidx/self-check\nrapidx/update/check\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/transaction/executions\nrapidx/automation/start\nrapidx/automation/status\n```\n\nIf old tools such as `rapidx/order/preview` or `rapidx/order/executions` appear, upgrade the CLI, restart MCP, and rerun self-check.\n\n## 6. Version And Upgrade\n\nRun update checks during setup, review, or session startup:\n\n```bash\nrapidx update check --json\n```\n\nDo not run network update checks before every trade. It slows execution and creates avoidable failure points.\n\nUpgrade order:\n\n1. Upgrade skills when the local skill version is missing, stale, or unknown.\n2. Upgrade CLI.\n3. Restart or reload the MCP host.\n4. Run self-check again.\n\nSkills should include a `version:` field in `SKILL.md` frontmatter. Agents should use it when comparing local skills with the release manifest.\n\n## 7. Runtime Selection\n\nThe Agent should decide from evidence, not guessing.\n\n| State | Meaning | Action |\n|---|---|---|\n| `MCP_READY` | MCP tools are visible and self-check passed. | Use MCP tools. |\n| `CLI_ONLY_READY` | CLI works but MCP is unavailable. | Use CLI commands with `--json`. |\n| `NOT_VERIFIED` | Runtime cannot prove tool availability. | Stop and run config self-check. |\n\nDo not switch from MCP to CLI inside the same trade unless MCP is confirmed degraded and state has been read back.\n\nPreview ids are runtime-local:\n\n- MCP preview ids must be submitted through the same MCP runtime.\n- CLI preview ids must be submitted through the same CLI runtime.\n\n## 8. Session Startup Checklist\n\nAt the start of a trading session, the Agent should run:\n\n```text\nupdate check\nself-check\nportfolio overview\nportfolio assets\norder open-orders\nposition query\nalgo open-orders\n```\n\nMCP path:\n\n```text\nrapidx/update/check\nrapidx/self-check\nrapidx/portfolio/overview\nrapidx/portfolio/assets\nrapidx/order/open-orders\nrapidx/position/query\nrapidx/algo/open-orders\n```\n\nCLI path:\n\n```bash\nrapidx update check --json\nrapidx self-check --json\nrapidx portfolio overview --json\nrapidx portfolio assets --json\nrapidx order open-orders --json\nrapidx position query --json\nrapidx algo open-orders --json\n```\n\n## 9. Symbol And Quantity\n\nRapidX order inputs use RapidX canonical symbols.\n\nRecommended format:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\nNormalize common user expressions:\n\n| User expression | RapidX symbol |\n|---|---|\n| `BTCUSDT` | `BINANCE_PERP_BTC_USDT` |\n| `btcusdt` | `BINANCE_PERP_BTC_USDT` |\n| `BTC/USDT` | `BINANCE_PERP_BTC_USDT` |\n| `币安人生USDT` | `BINANCE_PERP_币安人生_USDT` |\n\nFor RapidX PERP order placement:\n\n- Use `quantity`.\n- Do not send quote `amount`.\n- Use `maxNotional` as a safety upper bound, not as the target order amount.\n\nBefore trading, query symbol rules:\n\n```bash\nrapidx market get-symbol-info --input '{\"symbol\":\"BINANCE_PERP_BTC_USDT\"}' --json\n```\n\nThe Agent should check minimum notional, minimum quantity, lot size, price tick size, and contract size. If the requested order is below the minimum, ask the user to approve the revised quantity or notional first.\n\n## 10. Read Before Write\n\nBefore any write, read the current state.\n\n| Workflow | Required reads |\n|---|---|\n| Place order | symbol info, ticker/orderbook, portfolio assets, open orders, positions |\n| Replace order | order query, open orders, symbol info |\n| Cancel order | order query or open orders |\n| Close position | position query, open orders |\n| Algo / TPSL | position query, algo open-orders, symbol info |\n| Set leverage | current leverage, position query |\n\nThe Agent should not infer current state from memory or previous chat.\n\n## 11. Preview Then Submit\n\nEvery write with `previewRequired=true` must use:\n\n```text\npreview\n→ submit with same business params + previewId + continueConsentId\n→ readback\n```\n\nOrder place:\n\n```text\nrapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query\n```\n\nOrder replace:\n\n```text\nrapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query\n```\n\nOrder cancel:\n\n```text\nrapidx/order/cancel-preview\nrapidx/order/cancel\nrapidx/order/query\n```\n\nNon-order writes:\n\n```text\nrapidx/trade/preview\ntarget write tool\nmatching readback tool\n```\n\nIf any business parameter changes after preview, create a new preview. Business parameters include symbol, side, positionSide, quantity, price, orderType, orderId, clientOrderId, leverage, and account mode.\n\n## 12. Automation\n\nAutomation is a bounded local authorization session. It lets the Agent submit matching previews without asking for another per-order chat confirmation.\n\nAutomation still requires preview.\n\nUser authorization must include:\n\n- symbols\n- maxNotionalPerOrder\n- maxTotalNotional\n- duration\n- allowedActions\n- allowedOrderTypes\n- explicit risk text\n\nCreate a session:\n\n```bash\nrapidx automation start --input '{\n  \"symbols\": [\"BINANCE_PERP_BTC_USDT\"],\n  \"maxNotionalPerOrder\": \"100\",\n  \"maxTotalNotional\": \"1000\",\n  \"expiresInSeconds\": 3600,\n  \"allowedActions\": [\"order.place\", \"order.replace\", \"order.cancel\"],\n  \"allowedOrderTypes\": [\"MARKET\", \"LIMIT\"],\n  \"explicitUserConsent\": true,\n  \"acceptedRiskText\": \"I authorize RapidX automation for BINANCE_PERP_BTC_USDT with maxNotionalPerOrder 100 and maxTotalNotional 1000.\"\n}' --json\n```\n\nUse the session in preview:\n\n```bash\nrapidx order place-preview --input '{\n  \"automationSessionId\": \"ras_xxx\",\n  \"symbol\": \"BINANCE_PERP_BTC_USDT\",\n  \"side\": \"BUY\",\n  \"orderType\": \"MARKET\",\n  \"quantity\": \"0.001\",\n  \"maxNotional\": \"100\",\n  \"clientOrderId\": \"auto-001\"\n}' --json\n```\n\nAuto-submit only when preview returns:\n\n```json\n{\n  \"automationSession\": {\n    \"confirmationMode\": \"automation-session\"\n  },\n  \"confirmation\": {\n    \"submitToken\": \"confirm_rpv_xxx\"\n  }\n}\n```\n\nAutomation management:\n\n| Tool | Best Practice |\n|---|---|\n| `automation status` | Check remaining scope, expiry, and allowed actions. |\n| `automation extend` | Requires new user authorization; only extends time. |\n| `automation stop` | Stops future automation preview/submit; does not cancel existing orders. |\n\nUse `allowedActions=[\"order.place\",\"order.replace\",\"order.cancel\"]` for normal order lifecycle automation.\n\n## 13. Order Types\n\nUse runtime schema as the source of truth.\n\n| Order type | Use when | Required fields |\n|---|---|---|\n| `LIMIT` | User requires price boundary. | `price`, `quantity` |\n| `MARKET` | User wants immediate execution and accepts slippage. | `quantity`, `maxNotional` |\n\nDo not silently convert a requested `MARKET` order into a best-bid or best-ask `LIMIT` order.\n\n`MARKET` orders are supported after preview and explicit authorization. After submit, read back order status, executions, and position.\n\n## 14. Readback And Reconciliation\n\nSubmit success is not enough. The Agent must verify final state.\n\nAfter place:\n\n```text\norder query\ntransaction executions\nposition query\n```\n\nAfter cancel:\n\n```text\norder query until terminal\norder open-orders\n```\n\nAfter close position:\n\n```text\nposition query\ntransaction executions\n```\n\nAfter algo place:\n\n```text\nalgo open-orders\nalgo query\n```\n\n`order.cancel` is asynchronous. `cancelAccepted=true` means the request was accepted. If `terminalStateConfirmed=false`, poll `order query` until `CANCELED`, `REJECTED`, `EXPIRED`, or timeout.\n\nIf a write times out or state is uncertain, query state before retrying. Do not blindly repeat write requests.\n\n## 15. Position And Algo\n\nPosition close:\n\n- Query current position first.\n- NET mode: omit `positionSide`.\n- HEDGE mode: use actual `LONG` or `SHORT`.\n- Do not pass `side` or `quantity`.\n- Use reduce-only order flow for partial close.\n\nSet leverage:\n\n- Preview with `targetCapabilityId=\"position.set-leverage\"`.\n- User must authorize symbol and leverage.\n- Read back with `position get-leverage`.\n\nTPSL / conditional algo:\n\n- Preview with `targetCapabilityId=\"algo.place\"`.\n- Submit `algo place`.\n- Read back with `algo open-orders` or `algo query`.\n- `conditionType=\"ENTIRE_CLOSE_POSITION\"` may use `orderType=\"MARKET\"` without `quantity`.\n- Require at least one take-profit or stop-loss trigger.\n\n## 16. Error Handling\n\n| status | Agent action |\n|---|---|\n| `INVALID_INPUT` | Fix input; do not retry unchanged. |\n| `BLOCKED` | Read blocking reason; usually re-preview or ask user. |\n| `NOT_FOUND` | Read current state; target may not exist or may no longer be open. |\n| `PERMISSION_SCOPE_ERROR` | Credential scope does not cover the requested capability. |\n| `BUSINESS_ERROR` | Upstream rule rejected the request; inspect `details`. |\n| `NOT_VERIFIED` | State could not be proven; query again or report unverified. |\n| `FAIL` | Diagnose auth, network, startup, or malformed response. |\n\nCommon cases:\n\n- Invalid `orderId` format returns local `INVALID_INPUT`.\n- Valid-format but missing order returns readback `NOT_FOUND`.\n- Expired preview requires a new preview.\n- Submit params changed after preview returns `BLOCKED`.\n- Old MCP tool list means upgrade CLI and reload MCP host.\n\n## 17. Final Answer Format\n\nAgent final answers should include:\n\n```text\nRuntime path: MCP_READY or CLI_ONLY_READY\nTools or commands called\nSymbol / side / orderType / quantity / price\nPreview result\nSubmit result\nOrder id or client order id\nReadback result\nFinal state: open, filled, cancelled, closed, unchanged, or not verified\nRemaining user authorization needed, if any\n```\n\nFor automation:\n\n```text\nautomationSessionId\nsymbols\nmaxNotionalPerOrder\nmaxTotalNotional\nused or remaining scope\nexpiresAt\nallowedActions\nallowedOrderTypes\n```\n\n## 18. Things Agents Must Not Do\n\n- Do not fake query, trade, self-check, or readback results.\n- Do not echo full keys.\n- Do not submit writes without a preview token.\n- Do not cross-submit MCP preview ids through CLI, or CLI preview ids through MCP.\n- Do not shell through temporary scripts.\n- Do not use `cd ... && rapidx ...` command chains.\n- Do not blindly retry after timeout.\n- Do not treat `maxNotional` as target order amount.\n- Do not auto-increase orders to meet minimum notional without user approval.\n- Do not silently replace MARKET with LIMIT.\n- Do not interpret `open-orders` as \"open a new order\".\n\n## 19. Minimal Safe Workflows\n\n### First-Time Setup\n\n```text\n1. Install ltp-rapidx-config and ltp-rapidx-trading skills\n2. Load and follow the installed `ltp-rapidx-config` skill\n3. Install CLI from official npm\n4. Configure LTP_ACCESS_KEY, LTP_SECRET_KEY, LTP_API_HOST\n5. Configure MCP if supported\n6. Run update check and self-check\n7. Confirm MCP_READY or CLI_ONLY_READY\n```\n\n### Manual Trade\n\n```text\n1. Read portfolio, open orders, positions\n2. Read symbol info and market data\n3. order place-preview\n4. Ask user to confirm exact preview\n5. order place\n6. order query\n7. transaction executions or position query\n```\n\n### Automation Trade\n\n```text\n1. User authorizes automation scope in chat\n2. automation start\n3. order place-preview with automationSessionId\n4. order place with previewId and continueConsentId\n5. order query\n6. automation status\n```\n\n### Replace Or Cancel\n\n```text\n1. order open-orders\n2. order query\n3. replace-preview or cancel-preview\n4. replace or cancel\n5. order query until final or known current state\n```\n\n### Close Position\n\n```text\n1. position query\n2. trade preview with targetCapabilityId=\"position.close\"\n3. position close\n4. position query\n5. transaction executions when needed\n```\n\n### TPSL / Algo\n\n```text\n1. position query\n2. algo open-orders\n3. trade preview with targetCapabilityId=\"algo.place\"\n4. algo place\n5. algo open-orders or algo query\n```\n\n## 20. Local Skill References\n\nUse these local references from the installed skill directory:\n\n- `references/best-practices.md`\n- `references/capability-overview.md`\n\nFile v1.0.15:references/capability-overview.md\n\n# RapidX Capability Overview\n\nUse `rapidx schema --json` or MCP `rapidx/tools` as the runtime source of truth. This reference is a compact map for Agent planning.\n\n## Runtime Layers\n\n| Layer | Purpose |\n|---|---|\n| CLI | Atomic local operations through `rapidx <domain> <action> --json` |\n| MCP | Structured Agent tools served by `rapidx mcp serve` |\n| Core | Shared schemas, credential resolution, RapidX API client, preview, automation, audit, and self-check |\n| Skills | Agent guidance for setup, review, trading, automation, and readback |\n\n## Diagnostics And Discovery\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx --version` | - |\n| `rapidx schema --json` | `rapidx/tools` |\n| `rapidx update check --json` | `rapidx/update/check` |\n| `rapidx auth check` | - |\n| `rapidx doctor --json` | - |\n| `rapidx self-check --json` | `rapidx/self-check` |\n| `rapidx mcp serve` | starts the MCP server |\n\n## Automation\n\nAutomation sessions are local authorization sessions. They do not map to RapidX HTTP endpoints.\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx automation start` | `rapidx/automation/start` |\n| `rapidx automation list` | `rapidx/automation/list` |\n| `rapidx automation status` | `rapidx/automation/status` |\n| `rapidx automation extend` | `rapidx/automation/extend` |\n| `rapidx automation stop` | `rapidx/automation/stop` |\n\n## Market\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx market get-ticker` | `rapidx/market/get-ticker` |\n| `rapidx market get-orderbook` | `rapidx/market/get-orderbook` |\n| `rapidx market get-klines` | `rapidx/market/get-klines` |\n| `rapidx market get-funding-rate` | `rapidx/market/get-funding-rate` |\n| `rapidx market get-mark-price` | `rapidx/market/get-mark-price` |\n| `rapidx market get-symbol-info` | `rapidx/market/get-symbol-info` |\n| `rapidx market get-open-interest` | `rapidx/market/get-open-interest` |\n\n## Portfolio\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx portfolio overview` | `rapidx/portfolio/overview` | `GET /api/v1/trading/account` |\n| `rapidx portfolio assets` | `rapidx/portfolio/assets` | `GET /api/v1/trading/portfolio/assets` |\n| `rapidx portfolio statement` | `rapidx/portfolio/statement` | `GET /api/v1/trading/statement` |\n| `rapidx portfolio user-fee-rate` | `rapidx/portfolio/user-fee-rate` | `GET /api/v1/broker/feeRate` |\n| `rapidx portfolio position-bracket` | `rapidx/portfolio/position-bracket` | `GET /api/v1/trading/broker/positionBracket` |\n| `rapidx portfolio set-position-mode` | `rapidx/portfolio/set-position-mode` | `POST /api/v1/trading/account` |\n\n## Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx order place-preview` | `rapidx/order/place-preview` | preview for place |\n| `rapidx order replace-preview` | `rapidx/order/replace-preview` | preview for replace |\n| `rapidx order cancel-preview` | `rapidx/order/cancel-preview` | preview for cancel |\n| `rapidx order place` | `rapidx/order/place` | `POST /api/v1/trading/order` |\n| `rapidx order replace` | `rapidx/order/replace` | `PUT /api/v1/trading/order` |\n| `rapidx order cancel` | `rapidx/order/cancel` | `DELETE /api/v1/trading/order` |\n| `rapidx order cancel-all` | `rapidx/order/cancel-all` | `DELETE /api/v1/trading/cancelAll` |\n| `rapidx order query` | `rapidx/order/query` | `GET /api/v1/trading/order` |\n| `rapidx order open-orders` | `rapidx/order/open-orders` | `GET /api/v1/trading/orders` |\n| `rapidx order history` | `rapidx/order/history` | `GET /api/v1/trading/history/orders` |\n\n`open-orders` means current non-terminal orders, not \"open a new order\". `order.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Transactions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx transaction executions` | `rapidx/transaction/executions` | `GET /api/v1/trading/executions` |\n\n## Positions\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx position query` | `rapidx/position/query` | `GET /api/v1/trading/position` |\n| `rapidx position history` | `rapidx/position/history` | `GET /api/v1/trading/history/position` |\n| `rapidx position get-leverage` | `rapidx/position/get-leverage` | `GET /api/v1/trading/perp/leverage` |\n| `rapidx position set-leverage` | `rapidx/position/set-leverage` | `POST /api/v1/trading/position/leverage` |\n| `rapidx position close` | `rapidx/position/close` | `DELETE /api/v1/trading/position` |\n| `rapidx position close-all` | `rapidx/position/close-all` | `DELETE /api/v1/trading/positions` |\n\n`position.close` does not take `side` or `quantity`. In NET mode, omit `positionSide`; in HEDGE mode, pass the actual `LONG` or `SHORT` side.\n\n## Algo Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx algo place` | `rapidx/algo/place` | `POST /api/v1/algo/order` |\n| `rapidx algo replace` | `rapidx/algo/replace` | `PUT /api/v1/algo/order` |\n| `rapidx algo cancel` | `rapidx/algo/cancel` | `DELETE /api/v1/algo/order` |\n| `rapidx algo query` | `rapidx/algo/query` | `GET /api/v1/algo/order` |\n| `rapidx algo open-orders` | `rapidx/algo/open-orders` | `GET /api/v1/algo/openOrders` |\n| `rapidx algo history` | `rapidx/algo/history` | `GET /api/v1/algo/history/orders` |\n\n`algo.open-orders` means current non-terminal algo orders. `algo.history` accepts optional `begin` and `end` timestamps in milliseconds; if omitted, RapidX applies the upstream default range.\n\n## Generic Preview And Live Verification\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx trade preview` | `rapidx/trade/preview` |\n| `rapidx trade verify-live` | `rapidx/trade/verify-live` |\n\nUse `rapidx/trade/preview` for non-order writes such as `position.set-leverage`, `position.close`, `portfolio.set-position-mode`, `algo.place`, `algo.replace`, and `algo.cancel`.\n\n## Symbol Format\n\nRecommended input symbols:\n\n```text\nBINANCE_PERP_<BASE>_<QUOTE>\nOKX_PERP_<BASE>_<QUOTE>\n```\n\nExamples:\n\n```text\nBINANCE_PERP_BTC_USDT\nBINANCE_PERP_ETH_USDT\nOKX_PERP_BTC_USDT\n```\n\n`OKX_SWAP_<BASE>_<QUOTE>` is accepted as an input alias and normalizes to `OKX_PERP_<BASE>_<QUOTE>`.\n\n## Status Meanings\n\n| Status | Meaning |\n|---|---|\n| `PASS` | Tool or command completed successfully |\n| `INVALID_INPUT` | Local schema or input validation failed |\n| `BLOCKED` | Preview, safety, compatibility, or policy check blocked the action |\n| `NOT_FOUND` | Requested resource was not found |\n| `PERMISSION_SCOPE_ERROR` | Credentials do not cover the requested scope |\n| `BUSINESS_ERROR` | RapidX or venue business rule rejected the request |\n| `NOT_VERIFIED` | Requested state could not be proven |\n| `FAIL` | Startup, auth, network, malformed response, or unexpected failure |\n\nFile v1.0.15:skill-card.md\n\n## Description: <br>\nUse when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit, order replace or cancel, position management, algo orders, and explicit live trading verification. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[liquiditytech](https://clawhub.ai/user/liquiditytech) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, traders, and agent operators use this skill to let an agent query RapidX account and market state, preview trading actions, submit authorized writes, manage automation sessions, and read back final order or position state. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: This skill can guide an agent through live RapidX trading actions that may create real financial loss. <br>\nMitigation: Use least-privilege API keys, small notional caps, preview every write, require explicit consent for each write unless a bounded automation session is authorized, and read back state after submission. <br>\nRisk: Automation can let an agent submit matching trade previews without separate per-order chat confirmation. <br>\nMitigation: Enable automation only with explicit scope, duration, allowed actions, allowed order types, and notional limits, then monitor or stop the session when that scope is no longer needed. <br>\nRisk: Credentials or account details could be exposed if users paste secrets into public chat, screenshots, logs, or repositories. <br>\nMitigation: Provide credentials through the agent host's secret mechanism or environment references, and never echo full keys in commands or final summaries. <br>\n\n\n## Reference(s): <br>\n- [LTP RapidX Trading on ClawHub](https://clawhub.ai/liquiditytech/skills/ltp-rapidx-trading) <br>\n- [Capability overview](references/capability-overview.md) <br>\n- [Best practices](references/best-practices.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Shell commands, Configuration instructions, Markdown] <br>\n**Output Format:** [Markdown guidance with MCP tool names, JSON CLI examples, and final response structure] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs should cite observed tool or command evidence, avoid secrets, and distinguish verified from unverified trading state.] <br>\n\n## Skill Version(s): <br>\n1.0.15 (source: frontmatter and server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.14: 5 files, 16539 bytes\n\nFiles: references/best-practices.md (17692b), references/capability-overview.md (6599b), skill-card.md (2469b), SKILL.md (17326b), _meta.json (138b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: ltp-rapidx-trading\nversion: 1.0.14\ndescription: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n---\n\n# RapidX Trading\n\nUse 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`.\n\n## References\n\n- Read `references/capability-overview.md` when selecting a CLI command, MCP tool, capability id, or RapidX endpoint mapping.\n- Read `references/best-practices.md` when planning a full workflow across skills, CLI, MCP, preview, automation, and readback.\n\n## Non-Negotiable Rules\n\n- Do not fake query or trading results. Every claim must come from an actual MCP tool or `rapidx ... --json` response, and final summaries must include `toolOrCommandEvidence` or equivalent observed evidence.\n- Do not use shell bridge scripts, temporary JavaScript scripts, directory-changing shell chains, or chained shell invocations.\n- Treat all trade-write tools as real production actions.\n- Never submit a write without preview evidence and explicit user consent for that specific write, unless the user has explicitly enabled RapidX automation mode for the current scope in chat.\n- Use `confirmation.submitToken` from the preview response as the submit `continueConsentId`.\n- Keep business parameters unchanged between preview and submit. If symbol, side, positionSide, quantity, price, order id, leverage, or mode changes, create a new preview.\n- If a write times out or the result is uncertain, query state before retrying.\n- Never echo secrets.\n\n## Invocation Path\n\nBefore any trading workflow, read the latest integration review from `ltp-rapidx-config` or run that skill first.\n\n- `MCP_READY`: use `rapidx/...` MCP tools and do not shell out to wrapper scripts.\n- `CLI_ONLY_READY`: use direct `rapidx ... --json` commands and do not claim MCP tools were called.\n- `NOT_VERIFIED` or only `CLI_READY`: stop and run config self-check before portfolio, market, or trade workflows.\n\nDo 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.\n\nIf MCP setup or discovery is missing, stale, or failing, stop trading setup work and return to `ltp-rapidx-config` MCP Config. Do not invent host-specific MCP add commands in this trading skill.\n\n## Version Check\n\nAt the start of a trading session or before the first write in a session, check the cached release status once:\n\n- `MCP_READY`: call `rapidx/update/check` once, then `rapidx/self-check`.\n- `CLI_ONLY_READY`: run `rapidx update check --json`.\n\nDo not perform a fresh network update check before every trade submit. If the update result is `WRITE_BLOCKED`, `UPGRADE_REQUIRED`, or `skillsUpdateRecommended=true`, stop all trade-write actions and run `ltp-rapidx-config` upgrade handling first. Upgrade or reinstall skills first when their local frontmatter `version` is missing, stale, or unknown; then upgrade the CLI when needed, restart or reload the MCP host when applicable, and rerun self-check. Do not block read-only work solely because skills update is recommended.\n\n## Current MCP Surface\n\nUse `rapidx/tools` for the authoritative runtime schema. It returns the tool list plus concrete `inputSchemas`; read the relevant input schema before constructing write inputs. Current normal-use tool names are:\n\n```text\nMarket:   rapidx/market/get-ticker, rapidx/market/get-orderbook,\n          rapidx/market/get-klines, rapidx/market/get-funding-rate,\n          rapidx/market/get-mark-price, rapidx/market/get-symbol-info,\n          rapidx/market/get-open-interest\nPortfolio: rapidx/portfolio/overview, rapidx/portfolio/assets,\n          rapidx/portfolio/statement, rapidx/portfolio/user-fee-rate,\n          rapidx/portfolio/position-bracket, rapidx/portfolio/set-position-mode\nUpdate:   rapidx/update/check\nTrade:    rapidx/trade/preview, rapidx/trade/verify-live\nAutomation:\n          rapidx/automation/start, rapidx/automation/list,\n          rapidx/automation/status, rapidx/automation/extend,\n          rapidx/automation/stop\nOrder:    rapidx/order/place-preview, rapidx/order/replace-preview,\n          rapidx/order/cancel-preview, rapidx/order/place,\n          rapidx/order/replace, rapidx/order/cancel,\n          rapidx/order/cancel-all, rapidx/order/query,\n          rapidx/order/open-orders, rapidx/order/history\nTransactions:\n          rapidx/transaction/executions\nPosition: rapidx/position/query, rapidx/position/history,\n          rapidx/position/get-leverage, rapidx/position/close,\n          rapidx/position/close-all, rapidx/position/set-leverage\nAlgo:     rapidx/algo/place, rapidx/algo/replace,\n          rapidx/algo/cancel, rapidx/algo/open-orders,\n          rapidx/algo/history, rapidx/algo/quer\n\nArchive v1.0.13: 5 files, 16561 bytes\n\nFiles: references/best-practices.md (17692b), references/capability-overview.md (6599b), skill-card.md (2691b), SKILL.md (17130b), _meta.json (138b)\n\nArchive v1.0.12: 5 files, 16626 bytes\n\nFiles: references/best-practices.md (17658b), references/capability-overview.md (6686b), skill-card.md (2830b), SKILL.md (17188b), _meta.json (138b)\n\nArchive v1.0.11: 3 files, 7550 bytes\n\nFiles: skill-card.md (2239b), SKILL.md (16918b), _meta.json (138b)\n\nArchive v1.0.10: 3 files, 7549 bytes\n\nFiles: skill-card.md (2217b), SKILL.md (16884b), _meta.json (138b)\n\nArchive v1.0.9: 3 files, 7120 bytes\n\nFiles: skill-card.md (2387b), SKILL.md (14858b), _meta.json (137b)\n\nArchive v1.0.8: 3 files, 7000 bytes\n\nFiles: skill-card.md (2536b), SKILL.md (14437b), _meta.json (137b)","readmeExcerpt":"Skill: LTP RapidX Trading Owner: liquiditytech Summary: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification. Tags: latest:1.0.17 Version history: v1.0.17 | 2026-09-07T08:14:47.121Z | user Add OKX klines guidance and sync RapidX CLI/MCP capability references. v","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Market:   rapidx/market/get-ticker, rapidx/market/get-orderbook,\n          rapidx/market/get-klines, rapidx/market/get-funding-rate,\n          rapidx/market/get-mark-price, rapidx/market/get-symbol-info,\n          rapidx/market/get-open-interest\nPortfolio: rapidx/portfolio/overview, rapidx/portfolio/assets,\n          rapidx/portfolio/statement, rapidx/portfolio/user-fee-rate,\n          rapidx/portfolio/position-bracket, rapidx/portfolio/set-position-mode\nUpdate:   rapidx/update/check\nTrade:    rapidx/trade/preview, rapidx/trade/verify-live\nAutomation:\n          rapidx/automation/start, rapidx/automation/list,\n          rapidx/automation/status, rapidx/automation/extend,\n          rapidx/automation/stop\nOrder:    rapidx/order/place-preview, rapidx/order/replace-preview,\n          rapidx/order/cancel-preview, rapidx/order/place,\n          rapidx/order/replace, rapidx/order/cancel,\n          rapidx/order/cancel-all, rapidx/order/query,\n          rapidx/order/open-orders, rapidx/order/history\nTransactions:\n          rapidx/transaction/executions\nPosition: rapidx/position/query, rapidx/position/history,\n          rapidx/position/get-leverage, rapidx/position/close,\n          rapidx/position/close-all, rapidx/position/set-leverage\nAlgo:     rapidx/algo/place, rapidx/algo/replace,\n          rapidx/algo/cancel, rapidx/algo/open-orders,\n          rapidx/algo/history, rapidx/algo/query"},{"language":"text","snippet":"1. rapidx/portfolio/overview\n2. rapidx/portfolio/assets\n3. rapidx/order/open-orders\n4. rapidx/position/query\n5. rapidx/algo/open-orders\n6. rapidx/transaction/executions when fills/transactions are needed"},{"language":"text","snippet":"1. rapidx/market/get-symbol-info\n2. rapidx/market/get-ticker\n3. rapidx/market/get-orderbook\n4. rapidx/market/get-mark-price\n5. rapidx/market/get-klines\n6. rapidx/market/get-funding-rate      # PERP only\n7. rapidx/market/get-open-interest     # PERP only"},{"language":"text","snippet":"1. rapidx/automation/start with explicitUserConsent=true and acceptedRiskText from the user\n2. rapidx/order/place-preview, rapidx/order/replace-preview, or rapidx/order/cancel-preview with automationSessionId\n3. Submit the matching order write with the same business parameters plus previewId and continueConsentId\n4. rapidx/automation/status when the agent needs remaining session scope\n5. rapidx/automation/extend only after the user authorizes more time; include explicitUserConsent=true and a new acceptedRiskText\n6. rapidx/automation/stop when the user says to stop automation"},{"language":"text","snippet":"rapidx/order/place-preview\nrapidx/order/place\nrapidx/order/query or rapidx/order/open-orders"},{"language":"text","snippet":"rapidx/order/replace-preview\nrapidx/order/replace\nrapidx/order/query or rapidx/order/open-orders"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: ltp-rapidx-trading\nversion: 1.0.17\ndescription: Use when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n---\n\n# RapidX Trading\n\nUse 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`.\n\n## References\n\n- Read `references/capability-overview.md` when selecting a CLI command, MCP tool, capability id, or RapidX endpoint mapping.\n- Read `references/best-practices.md` when planning a full workflow across skills, CLI, MCP, preview, automation, and readback.\n\n## Non-Negotiable Rules\n\n- Do not fake query or trading results. Every claim must come from an actual MCP tool or `rapidx ... --json` response, and final summaries must include `toolOrCommandEvidence` or equivalent observed evidence.\n- Do not use shell bridge scripts, temporary JavaScript scripts, directory-changing shell chains, or chained shell invocations.\n- Treat all trade-write tools as real production actions.\n- Never submit a write without preview evidence and explicit user consent for that specific write, unless the user has explicitly enabled RapidX automation mode for the current scope in chat.\n- Use `confirmation.submitToken` from the preview response as the submit `continueConsentId`.\n- Keep business parameters unchanged between preview and submit. If symbol, side, positionSide, quantity, price, order id, leverage, or mode changes, create a new preview.\n- If a write times out or the result is uncertain, query state before retrying.\n- Never echo secrets.\n\n## Invocation Path\n\nBefore any trading workflow, read the latest integration review from `ltp-rapidx-config` or run that skill first.\n\n- `MCP_READY`: use `rapidx/...` MCP tools and do not shell out to wrapper scripts.\n- `CLI_ONLY_READY`: use direct `rapidx ... --json` commands and do not claim MCP tools were called.\n- `NOT_VERIFIED` or only `CLI_READY`: stop and run config self-check before portfolio, market, or trade workflows.\n\nDo 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.\n\nIf MCP setup or discovery is missing, stale, or failing, stop trading setup work and return to `ltp-rapidx-config` MCP Config. Do not invent host-specific MCP add commands in this trading skill.\n\n## Version Check\n\nAt the start of a trading session or before the first write in a session, check the cached release status once:\n\n- `MCP_READY`: call `rapidx/update/check` once, then `rapidx/self-check`.\n- `CLI_ONLY_READY`: run `rapidx update check --json`.\n\nDo not perform a fresh network update check before every trade submit. If the update result is `WRITE_BLOCKED`, `UPGRADE_REQUIRED`, or `skillsUpdateReco"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn73kps0f7zwmrka0kz101ymad87wexe\",\n  \"slug\": \"ltp-rapidx-trading\",\n  \"version\": \"1.0.17\",\n  \"publishedAt\": 1788768887121\n}"},{"path":"references/best-practices.md","content":"# RapidX Skills / CLI / MCP Best Practices\n\n## Overview\n\nRapidX is delivered as a complete Agent integration stack:\n\n- **Skills** teach the Agent how to install, configure, choose CLI or MCP, run self-checks, and operate RapidX.\n- **CLI** is the unified local runtime for atomic operations and also starts the MCP server through `rapidx mcp serve`.\n- **MCP** is the structured tool surface for MCP-capable Agents and shares the same CLI/Core capabilities.\n\nThe best practice is not to make users memorize every command. Let the Agent install and read the skills first. Load the installed `ltp-rapidx-config` skill to configure CLI/MCP and run self-checks, then load `ltp-rapidx-trading` for queries, preview, submit, automation, and readback. Skill names are not shell commands.\n\nRecommended flow:\n\n```text\nInstall Skills\n→ ltp-rapidx-config installs/configures CLI\n→ configure credentials and API host\n→ choose MCP_READY or CLI_ONLY_READY\n→ run self-check\n→ ltp-rapidx-trading uses MCP or CLI\n→ preview before write\n→ submit\n→ readback and reconcile\n```\n\n## 1. Role Of Each Layer\n\n| Layer | Role | Best Practice |\n|---|---|---|\n| Skills | Agent guidance | Install and read `ltp-rapidx-config` first, then use `ltp-rapidx-trading`. |\n| CLI | Unified local runtime | Install from official npm and use `rapidx ... --json` for CLI-only Agents. |\n| MCP | Structured tool interface | Start with `rapidx mcp serve`; MCP-capable Agents call `rapidx/*` tools directly. |\n| Core | Shared implementation | CLI and MCP share schemas, API client, preview, automation, audit, and self-check. |\n\nThe MCP server is not a separate package. It is started by the CLI:\n\n```bash\nrapidx mcp serve\n```\n\nMCP tools should call the shared RapidX core directly. They should not shell out through temporary scripts, wrapper files, or `cd ... && node ...` command chains.\n\n## 2. Recommended External User Flow\n\n### Step 1: Install Skills\n\nUsers can install skills themselves, or send an executable instruction to their Agent.\n\nRecommended instruction to send to the Agent:\n\n```text\nYou are my Agent. Install the RapidX skills into the current workspace using the skill installation method supported by your Agent host.\n\nSource repository:\nhttps://github.com/LiquidityTech/ltp-rapidx-skill\n\nInstall both skills:\n- ltp-rapidx-config\n- ltp-rapidx-trading\n\nAfter installation, load and follow the installed `ltp-rapidx-config` skill first. It is not a shell command. Use it to install or upgrade @liquiditytech/rapidx-cli from official npm, configure RapidX credentials, configure MCP if this host supports MCP, and run RapidX self-check.\n\nDo not start market queries or trading until you can report one of:\n- MCP_READY\n- CLI_ONLY_READY\n- NOT_VERIFIED\n```\n\nThe exact installation command depends on the Agent host. Use the official RapidX docs or skill repository README for Codex, Claude Code, Cursor, Gemini CLI, OpenCode, OpenClaw, and Hermes.\n\n### Step 2: Use Config Skill\n\nThe Agent should load and follow `ltp-rapidx-config` b"},{"path":"references/capability-overview.md","content":"# RapidX Capability Overview\n\nUse `rapidx schema --json` or MCP `rapidx/tools` as the runtime source of truth. This reference is a compact map for Agent planning.\n\n## Runtime Layers\n\n| Layer | Purpose |\n|---|---|\n| CLI | Atomic local operations through `rapidx <domain> <action> --json` |\n| MCP | Structured Agent tools served by `rapidx mcp serve` |\n| Core | Shared schemas, credential resolution, RapidX API client, preview, automation, audit, and self-check |\n| Skills | Agent guidance for setup, review, trading, automation, and readback |\n\n## Diagnostics And Discovery\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx --version` | - |\n| `rapidx schema --json` | `rapidx/tools` |\n| `rapidx update check --json` | `rapidx/update/check` |\n| `rapidx auth check` | - |\n| `rapidx doctor --json` | - |\n| `rapidx self-check --json` | `rapidx/self-check` |\n| `rapidx mcp serve` | starts the MCP server |\n\n## Automation\n\nAutomation sessions are local authorization sessions. They do not map to RapidX HTTP endpoints.\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx automation start` | `rapidx/automation/start` |\n| `rapidx automation list` | `rapidx/automation/list` |\n| `rapidx automation status` | `rapidx/automation/status` |\n| `rapidx automation extend` | `rapidx/automation/extend` |\n| `rapidx automation stop` | `rapidx/automation/stop` |\n\n## Market\n\n| CLI | MCP tool |\n|---|---|\n| `rapidx market get-ticker` | `rapidx/market/get-ticker` |\n| `rapidx market get-orderbook` | `rapidx/market/get-orderbook` |\n| `rapidx market get-klines` | `rapidx/market/get-klines` |\n| `rapidx market get-funding-rate` | `rapidx/market/get-funding-rate` |\n| `rapidx market get-mark-price` | `rapidx/market/get-mark-price` |\n| `rapidx market get-symbol-info` | `rapidx/market/get-symbol-info` |\n| `rapidx market get-open-interest` | `rapidx/market/get-open-interest` |\n\n## Portfolio\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx portfolio overview` | `rapidx/portfolio/overview` | `GET /api/v1/trading/account` |\n| `rapidx portfolio assets` | `rapidx/portfolio/assets` | `GET /api/v1/trading/portfolio/assets` |\n| `rapidx portfolio statement` | `rapidx/portfolio/statement` | `GET /api/v1/trading/statement` |\n| `rapidx portfolio user-fee-rate` | `rapidx/portfolio/user-fee-rate` | `GET /api/v1/broker/feeRate` |\n| `rapidx portfolio position-bracket` | `rapidx/portfolio/position-bracket` | `GET /api/v1/trading/broker/positionBracket` |\n| `rapidx portfolio set-position-mode` | `rapidx/portfolio/set-position-mode` | `POST /api/v1/trading/account` |\n\n## Orders\n\n| CLI | MCP tool | RapidX API |\n|---|---|---|\n| `rapidx order place-preview` | `rapidx/order/place-preview` | preview for place |\n| `rapidx order replace-preview` | `rapidx/order/replace-preview` | preview for replace |\n| `rapidx order cancel-preview` | `rapidx/order/cancel-preview` | preview for cancel |\n| `rapidx order place` | `rapidx/order/place` | `POST /api/v1/trading/order` |\n| `rapidx order replace` | `rapidx/order/replace` | `PUT /api/v1/trading/or"},{"path":"skill-card.md","content":"## Description:\n\nUse when an agent needs to operate RapidX through MCP or CLI for portfolio reads, market reads, order preview, order submit/replace/cancel, position management, algo orders, or explicit live trading verification.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[liquiditytech](https://clawhub.ai/user/liquiditytech)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, developers, and trading operators use this skill to guide an agent through RapidX portfolio reads, market reads, previewed order actions, position management, algo order workflows, automation sessions, and explicit live trading verification.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can guide agents that have scoped access to live trading credentials and real trade-write authority.\n\nMitigation: Install only from a trusted RapidX CLI publisher, prefer a pinned and reviewed CLI version, use the host secret store, begin with read-only checks, and keep trading scope narrow.\n\nRisk: Automation sessions can authorize multiple order lifecycle actions within the approved scope.\n\nMitigation: Enable automation only with explicit authorization for symbols, notional caps, duration, allowed actions, and allowed order types; use short sessions and stop automation when it is no longer needed.\n\n## Reference(s):\n\n- [RapidX Capability Overview](references/capability-overview.md)\n- [RapidX Skills / CLI / MCP Best Practices](references/best-practices.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, API Calls, Configuration instructions]\n\n**Output Format:** [Markdown guidance with inline command and tool examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Trade-write guidance requires preview evidence, explicit consent or scoped automation authorization, and readback before final claims.]\n\n## Skill Version(s):\n\n1.0.17 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1906,"uniquenessScore":35,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T22:51:23.629Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T01:48:16.394Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}