/cdcx-cli:cdcx-advancedfrom cdcx-cli
Creates and manages advanced contingency orders (OCO, OTO, OTOCO) with linked cancellation logic for trading platforms.
Ships in cdcx-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Requires authentication. All placement commands are tier mutate.
| Type | Meaning | Shape |
|---|---|---|
| OCO | One-Cancels-the-Other | 2 protection legs; one fill cancels the other |
| OTO | One-Triggers-the-Other | 1 entry leg + 1 protection leg (fires only after entry fills) |
| OTOCO | Bracket | 1 entry leg + 2 protection legs (stop-loss + take-profit) |
| Tool | Purpose | Tier |
|---|---|---|
| cdcx_advanced_oco | Create OCO pair | mutate |
| cdcx_advanced_create_oto | Create OTO pair | mutate |
| cdcx_advanced_create_otoco | Create OTOCO bracket | mutate |
| cdcx_advanced_cancel_oco | Cancel an OCO by list ID | mutate |
| cdcx_advanced_cancel_oto | Cancel an OTO by list ID | mutate |
| cdcx_advanced_cancel_otoco | Cancel an OTOCO by list ID | mutate |
| cdcx_advanced_cancel | Cancel a single child order | mutate |
| cdcx_advanced_cancel_all | Cancel all advanced orders | dangerous |
| cdcx_advanced_open_orders | List open advanced orders | sensitive_read |
| cdcx_advanced_order_detail | Lookup by order_id / client_oid | sensitive_read |
| cdcx_advanced_order_history | Historical advanced orders | sensitive_read |
| cdcx_advanced_order_list_detail | Lookup by list IDs | sensitive_read |
Each create-* command takes a single positional <order_list> — a JSON array of order objects. The order list captures the entire contingency in one request.
cdcx advanced create-otoco '[
{"instrument_name":"BTC_USDT","side":"BUY","type":"LIMIT","price":"50000","quantity":"0.01"},
{"instrument_name":"BTC_USDT","side":"SELL","type":"STOP_LOSS","trigger_price":"48000","quantity":"0.01","ref_price_type":"MARK_PRICE"},
{"instrument_name":"BTC_USDT","side":"SELL","type":"TAKE_PROFIT","trigger_price":"55000","quantity":"0.01","ref_price_type":"MARK_PRICE"}
]' --dry-run -o json
Exactly 3 orders: one entry (LIMIT or MARKET), one stop leg (STOP_LOSS or STOP_LIMIT), one take-profit leg (TAKE_PROFIT or TAKE_PROFIT_LIMIT). ref_price_type supports MARK_PRICE (default), INDEX_PRICE, LAST_PRICE.
cdcx advanced create-oto '[
{"instrument_name":"BTC_USDT","side":"BUY","type":"LIMIT","price":"50000","quantity":"0.01"},
{"instrument_name":"BTC_USDT","side":"SELL","type":"STOP_LOSS","trigger_price":"48000","quantity":"0.01","ref_price_type":"MARK_PRICE"}
]' -o json
Exactly 2 orders: one entry, one protection leg.
cdcx advanced oco '[
{"instrument_name":"BTC_USDT","side":"SELL","type":"LIMIT","price":"55000","quantity":"0.01"},
{"instrument_name":"BTC_USDT","side":"SELL","type":"STOP_LOSS","trigger_price":"48000","quantity":"0.01","ref_price_type":"MARK_PRICE"}
]' -o json
Use after you already hold a position — exits at either the take-profit limit or stop-loss trigger.
cdcx advanced order BTCUSD-PERP \
--side SELL --type STOP_LOSS \
--quantity 0.01 \
--trigger-price 48000 \
--ref-price-type MARK_PRICE \
-o json
Use when you want an unattached stop or take-profit with no linked leg.
cdcx advanced cancel-otoco --list-id <list_id> -o json
cdcx advanced cancel-oco --list-id <list_id> -o json
cdcx advanced cancel-oto --list-id <list_id> -o json
List IDs are returned in the response body of the create-* call — capture and store them.
cdcx advanced open-orders BTC_USDT -o json
cdcx advanced order-detail --order-id <id> -o json
cdcx advanced order-list-detail --list-id <list_id>,<list_id2> -o json
cdcx advanced order-history --instrument-name BTC_USDT --limit 50 -o json
cdcx advanced cancel-all BTC_USDT -o json # Per-instrument
cdcx advanced cancel-all -o json # Account-wide — very rare
cdcx trade open-ordersref_price_type defaults to MARK_PRICE. For perpetuals stick to MARK_PRICE to avoid liquidation-edge scenarios--dry-run before a live OTOCO — the JSON payload is easy to get wrongWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
contingency-orders, oco, oto, otoco, bracket-orders, trading
npx claudepluginhub crypto-com/cdcx-cli --plugin cdcx-cli13 skills in this plugin
/cdcx-auth-setupCredential and profile management — configure API keys via the setup wizard, environment variables, or config file. Resolution order and troubleshooting./cdcx-autonomy-levelsProgressive agent autonomy — from read-only to fully autonomous. Pick the lowest level that gets the job done./cdcx-check-balanceVerify credentials and inspect account balance — the first action an agent takes before trading.Other plugins' skills for the same job