use-ritmex-bot
Original:🇺🇸 English
Translated
Use when the task requires operating exchanges with the ritmex-bot CLI, including capability checks, market/account/position queries, order operations, strategy run, dry-run simulation, and JSON output parsing.
3installs
Sourcediscountry/ritmex-bot
Added on
NPX Install
npx skill4agent add discountry/ritmex-bot use-ritmex-botTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Use ritmex-bot CLI
This skill is for running in an agent-safe, exchange-compatible way.
ritmex-botUse This Skill When
- The user asks to use commands directly.
ritmex-bot - The user wants market data, account/position, or order operations from supported exchanges.
- The user wants AI-agent-friendly CLI execution with output.
--json - The user wants simulation with before real writes.
--dry-run
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 ; pass it through exactly.
--symbol - If a feature is not supported by an exchange, return it as unsupported (), do not fake behavior.
UNSUPPORTED - For write actions (,
order create,order cancel), preferorder cancel-allfirst unless the user explicitly asks to skip simulation.--dry-run - Use whenever output must be consumed by another agent/tool.
--json
Command Entry Options
Use one of these:
bash
ritmex-bot <command>
npx ritmex-bot <command>
bunx ritmex-bot <command>
bun run index.ts <command>If is unavailable, use from repo root.
ritmex-botbun run index.ts <command>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, orposition listas needed.account snapshot
Global Flags
| Flag | Short | Meaning |
|---|---|---|
| | Exchange override |
| - | Trading symbol (pass-through) |
| | JSON output |
| | Simulate write ops |
| | Timeout in ms (default 25000) |
| | Show help |
Root Commands
helpdoctorexchangemarketaccountpositionorderstrategy
Command Reference
doctor
doctorbash
ritmex-bot doctor
ritmex-bot doctor --exchange binance --symbol BTCUSDT --jsonReturns effective setup and runtime capabilities.
exchange
exchangebash
ritmex-bot exchange list
ritmex-bot exchange capabilities --exchange standxIf runtime adapter cannot initialize, capabilities may fallback to static metadata.
market
marketbash
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 100Rules:
- requires
kline.--interval - is optional.
depth --levels - is optional.
kline --limit
account
accountbash
ritmex-bot account snapshot --exchange <id>
ritmex-bot account summary --exchange <id>summarysnapshotposition
positionbash
ritmex-bot position list --exchange <id>
ritmex-bot position list --exchange <id> --symbol <symbol>order
orderQuery open orders
bash
ritmex-bot order open --exchange <id> --symbol <symbol>Create order
bash
ritmex-bot order create --exchange <id> --symbol <symbol> --side buy --type limit --quantity 0.01 --price 90000Required:
- =
--sidebuy|sell - =
--typelimit|market|stop|trailing-stop|close - or
--quantity--qty
Conditional required:
- :
limit--price - :
stop--stop-price - :
trailing-stopand--activation-price--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
bash
ritmex-bot order cancel --exchange <id> --symbol <symbol> --order-id <id>Cancel all
bash
ritmex-bot order cancel-all --exchange <id> --symbol <symbol>strategy
strategybash
ritmex-bot strategy run --strategy maker --exchange standx --silent
ritmex-bot strategy run --strategy offset --exchange binance --dry-runSupported strategy IDs:
trendswingguardianmakermaker-pointsoffset-makerliquidity-makerbasisgrid
Aliases:
- ->
offsetoffset-maker - /
makerpoints->maker_pointsmaker-points - /
liquidity/liquiditymaker->liquidity_makerliquidity-maker
Extra flags:
- (short alias
--silent)-q --dry-run
Dry-Run First Patterns
Create order safely
bash
# 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 --jsonCancel safely
bash
# 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> --jsonAgent Output Handling
Prefer and parse:
--json- (boolean)
success - (executed command kind)
command exchangesymboldryRun- (success payload)
data - ,
error.code,error.message(failure payload)error.retryable
Human-readable mode is fine for manual terminal use; is preferred for automation.
--jsonError Codes and Exit Codes
Map failures by code/exit code:
- -> exit
INVALID_ARGS2 - -> exit
MISSING_ENV3 - -> exit
UNSUPPORTED5 - -> exit
EXCHANGE_ERROR6 - -> exit
TIMEOUT7
Handling policy:
- : fix command arguments and retry once.
INVALID_ARGS - : report missing configuration; do not invent env keys.
MISSING_ENV - : return clearly as unsupported for that exchange.
UNSUPPORTED - : return details and retry only if user requests.
EXCHANGE_ERROR - : optionally retry with larger
TIMEOUTonce.--timeout
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 is provided, let existing exchange config resolve it.
--symbol - If no is provided, let existing env resolution decide it.
--exchange
Ready-to-Use Recipes
Preflight
bash
ritmex-bot exchange list --json
ritmex-bot exchange capabilities --exchange <id> --json
ritmex-bot doctor --exchange <id> --symbol <symbol> --jsonRead-only market/account state
bash
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> --jsonWrite flow (safe)
bash
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> --jsonStrategy flow
bash
ritmex-bot strategy run --strategy trend --exchange <id> --dry-run
ritmex-bot strategy run --strategy trend --exchange <id> --silentCompletion Checklist
Before returning results to user:
- Confirm command and parameters used.
- Confirm whether run was or live.
dryRun - 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.