一键导入
cdcx-paper-strategy
Local paper trading — test strategies against live market prices without risking real funds. CLI-only, no auth, no MCP tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Local paper trading — test strategies against live market prices without risking real funds. CLI-only, no auth, no MCP tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Progressive agent autonomy — from read-only to fully autonomous. Pick the lowest level that gets the job done.
Advanced contingency orders — OCO, OTO, OTOCO. Triggered orders with linked cancellation logic.
Credential and profile management — configure API keys via the setup wizard, environment variables, or config file. Resolution order and troubleshooting.
Verify credentials and inspect account balance — the first action an agent takes before trading.
Order placement and management — place, amend, cancel, close-position. Safety-first with dry-run and preflight checks.
Trade instruments that require isolated margin (e.g. RWA/equity perpetuals like SPYUSD-PERP). Covers the create-order flag, funding transfers, leverage adjustment, and the TUI M toggle.
| name | cdcx-paper-strategy |
| description | Local paper trading — test strategies against live market prices without risking real funds. CLI-only, no auth, no MCP tools. |
CLI-only. Paper trading has no MCP tools — agents that need to paper trade must shell out to cdcx paper directly.
The paper engine is local (no API calls for order state — only for market prices). State lives in ~/.local/share/cdcx/paper/paper_account.json.
Fills use live mark prices fetched from the REST API at the moment the order is evaluated:
| Command | Purpose |
|---|---|
cdcx paper init --balance <n> | Create a new paper account (default 10000 USDT) |
cdcx paper buy <INSTRUMENT> --quantity <q> [--price <p>] | Buy (market if no price) |
cdcx paper sell <INSTRUMENT> --quantity <q> [--price <p>] | Sell |
cdcx paper positions | Open positions with unrealized P&L |
cdcx paper balance | Cash balance + realized P&L |
cdcx paper history | Fills log |
cdcx paper reset --balance <n> | Wipe state and start fresh |
All commands support -o json, -o table, -o ndjson.
cdcx paper init --balance 50000
cdcx paper balance -o json
# 1. Check current price
cdcx market ticker BTC_USDT -o json
# 2. Paper buy
cdcx paper buy BTC_USDT --quantity 0.01 -o json
# 3. Inspect open position
cdcx paper positions -o json
# 4. Close
cdcx paper sell BTC_USDT --quantity 0.01 -o json
# 5. Realized P&L shows up in balance
cdcx paper balance -o json
cdcx paper buy BTC_USDT --quantity 0.1 --price 49000 -o json
The limit sits in the paper engine until the market ticker crosses 49000. Check back with cdcx paper positions — until filled, the cash is reserved.
# Bootstrap
cdcx paper init --balance 100000
# Loop (external script / agent):
# 1. Read signal from cdcx market ticker / candlestick
# 2. Issue cdcx paper buy or cdcx paper sell accordingly
# 3. Call cdcx paper positions -o json to track running P&L
# Review
cdcx paper history -o json
cdcx paper balance -o json
cdcx paper reset --balance 100000
Wipes all positions, trades, and P&L; starts fresh with the specified balance.
cdcx invocations — use reset to start freshcdcx paper invocations using the then-current REST tickercdcx tui and press p to toggle LIVE/PAPER mode