use-ritmex-bot
SKILL.md
Use ritmex-bot CLI
This skill is for running ritmex-bot in an agent-safe, exchange-compatible way.
Use This Skill When
- The user asks to use
ritmex-botcommands directly. - The user wants market data, account/position, or order operations from supported exchanges.
- The user wants AI-agent-friendly CLI execution with
--jsonoutput. - The user wants simulation with
--dry-runbefore real writes.
Hard Rules
- Do not change environment-variable names and do not invent new env keys.
- Read config from the current shell environment as-is.
- Do not normalize or rewrite
--symbol; pass it through exactly. - If a feature is not supported by an exchange, return it as unsupported (
UNSUPPORTED), do not fake behavior. - For write actions (
order create,order cancel,order cancel-all), prefer--dry-runfirst unless the user explicitly asks to skip simulation. - Use
--jsonwhenever output must be consumed by another agent/tool.
Command Entry Options
Use one of these:
ritmex-bot <command>
npx ritmex-bot <command>
bunx ritmex-bot <command>
bun run index.ts <command>
If ritmex-bot is unavailable, use bun run index.ts <command> from repo root.
Default Agent Workflow
- Determine exchange and symbol from user request.
- If missing, rely on existing env resolution; do not create fallback env variables.
- Run capability precheck:
exchange listexchange capabilities --exchange <id>
- For read operations, run command directly (prefer
--json). - For write operations:
- Run the exact command with
--dry-run --json. - Validate payload and dry-run actions.
- Run live command only when user confirmed or explicitly requested live execution.
- Run the exact command with
- Post-check with
order open,position list, oraccount snapshotas needed.
Global Flags
| Flag | Short | Meaning |
|---|---|---|
--exchange |
-e |
Exchange override |
--symbol |
- | Trading symbol (pass-through) |
--json |
-j |
JSON output |
--dry-run |
-d |
Simulate write ops |
--timeout |
-t |
Timeout in ms (default 25000) |
--help |
-h |
Show help |
Root Commands
helpdoctorexchangemarketaccountpositionorderstrategy
Command Reference
doctor
ritmex-bot doctor
ritmex-bot doctor --exchange binance --symbol BTCUSDT --json
Returns effective setup and runtime capabilities.
exchange
ritmex-bot exchange list
ritmex-bot exchange capabilities --exchange standx
If runtime adapter cannot initialize, capabilities may fallback to static metadata.
market
ritmex-bot market ticker --exchange <id> --symbol <symbol>
ritmex-bot market depth --exchange <id> --symbol <symbol> --levels 10
ritmex-bot market kline --exchange <id> --symbol <symbol> --interval 1m --limit 100
Rules:
klinerequires--interval.depth --levelsis optional.kline --limitis optional.
account
ritmex-bot account snapshot --exchange <id>
ritmex-bot account summary --exchange <id>
summary is an alias of snapshot.
position
ritmex-bot position list --exchange <id>
ritmex-bot position list --exchange <id> --symbol <symbol>
order
Query open orders
ritmex-bot order open --exchange <id> --symbol <symbol>
Create order
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type limit --quantity 0.01 --price 90000
Required:
--side=buy|sell--type=limit|market|stop|trailing-stop|close--quantityor--qty
Conditional required:
limit:--pricestop:--stop-pricetrailing-stop:--activation-priceand--callback-rate
Optional:
--time-in-force(GTC|IOC|FOK|GTX)--reduce-only(true|false)--close-position(true|false)--trigger-type(UNSPECIFIED|TAKE_PROFIT|STOP_LOSS)--sl-price--tp-price
Cancel one order
ritmex-bot order cancel --exchange <id> --symbol <symbol> --order-id <id>
Cancel all
ritmex-bot order cancel-all --exchange <id> --symbol <symbol>
strategy
ritmex-bot strategy run --strategy maker --exchange standx --silent
ritmex-bot strategy run --strategy offset --exchange binance --dry-run
Supported strategy IDs:
trendswingguardianmakermaker-pointsoffset-makerliquidity-makerbasisgrid
Aliases:
offset->offset-makermakerpoints/maker_points->maker-pointsliquidity/liquiditymaker/liquidity_maker->liquidity-maker
Extra flags:
--silent(short alias-q)--dry-run
Dry-Run First Patterns
Create order safely
# 1) Simulate
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type limit --quantity 0.01 --price 90000 --dry-run --json
# 2) Execute live only after confirmation
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type limit --quantity 0.01 --price 90000 --json
Cancel safely
# 1) Simulate
ritmex-bot order cancel --exchange <id> --symbol <symbol> --order-id <id> --dry-run --json
# 2) Execute live
ritmex-bot order cancel --exchange <id> --symbol <symbol> --order-id <id> --json
Agent Output Handling
Prefer --json and parse:
success(boolean)command(executed command kind)exchangesymboldryRundata(success payload)error.code,error.message,error.retryable(failure payload)
Human-readable mode is fine for manual terminal use; --json is preferred for automation.
Error Codes and Exit Codes
Map failures by code/exit code:
INVALID_ARGS-> exit2MISSING_ENV-> exit3UNSUPPORTED-> exit5EXCHANGE_ERROR-> exit6TIMEOUT-> exit7
Handling policy:
INVALID_ARGS: fix command arguments and retry once.MISSING_ENV: report missing configuration; do not invent env keys.UNSUPPORTED: return clearly as unsupported for that exchange.EXCHANGE_ERROR: return details and retry only if user requests.TIMEOUT: optionally retry with larger--timeoutonce.
Symbol and Exchange-Specific Behavior
- Never apply cross-exchange symbol mapping inside the skill.
- Respect user-provided symbols exactly (examples:
BTCUSDT,BTCUSDC,BTC_USD_PERP,BTC-PERP). - If no
--symbolis provided, let existing exchange config resolve it. - If no
--exchangeis provided, let existing env resolution decide it.
Ready-to-Use Recipes
Preflight
ritmex-bot exchange list --json
ritmex-bot exchange capabilities --exchange <id> --json
ritmex-bot doctor --exchange <id> --symbol <symbol> --json
Read-only market/account state
ritmex-bot market ticker --exchange <id> --symbol <symbol> --json
ritmex-bot market depth --exchange <id> --symbol <symbol> --levels 20 --json
ritmex-bot market kline --exchange <id> --symbol <symbol> --interval 1m --limit 120 --json
ritmex-bot account snapshot --exchange <id> --json
ritmex-bot position list --exchange <id> --symbol <symbol> --json
Write flow (safe)
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type market --qty 0.01 --dry-run --json
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type market --qty 0.01 --json
ritmex-bot order open --exchange <id> --symbol <symbol> --json
Strategy flow
ritmex-bot strategy run --strategy trend --exchange <id> --dry-run
ritmex-bot strategy run --strategy trend --exchange <id> --silent
Completion Checklist
Before returning results to user:
- Confirm command and parameters used.
- Confirm whether run was
dryRunor live. - For live writes, provide immediate post-check output (
order open/position list). - If unsupported, explicitly name exchange + unsupported method.
- If failed, return error code/message and next corrective action.
Weekly Installs
28
Repository
discountry/ritmex-botGitHub Stars
445
First Seen
Feb 27, 2026
Security Audits
Installed on
codex28
opencode28
kimi-cli27
gemini-cli27
amp27
cline27