Place spot order
place_spot_orderPlace paper spot orders (market, limit, stop) with idempotency keys to prevent duplicate executions. Uses virtual funds for risk-free trading.
Instructions
Place a paper spot order. coinId is a coin UCID, NOT a ticker. orderType market/limit/stop. limitPrice required for limit & stop; stopPrice required for stop. idempotencyKey is REQUIRED and unique per intent (reuse replays the original result — retry a timed-out call with the SAME key; it will never double-execute). Requires the trade:spot scope. CONFIRM with the user before calling. Paper trading only — virtual funds (50,000 mUSD). Not financial advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coinId | Yes | Coin UCID (e.g. "1" = BTC). | |
| side | Yes | Spot side: buy spends USDT; sell spends the base coin. | |
| orderType | Yes | Order execution type: market, limit, or stop. | |
| quantity | Yes | Base-coin amount (> 0). | |
| limitPrice | No | USD/coin — required for limit & stop. | |
| stopPrice | No | USD trigger — required for stop. | |
| idempotencyKey | Yes | Unique per intent; reuse replays the original result. | |
| agentTrace | No | Optional private trace metadata stored in the caller's ledger. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| httpStatus | Yes | HTTP status returned by CoinRithm, or 0 for network errors. | |
| ok | Yes | True when CoinRithm returned a successful 2xx response. | |
| ledgerEventId | No | Private AgentActionEvent id returned by /api/agent/*, when present. | |
| ledgerStatus | No | Ledger write status header returned by CoinRithm, when present. | |
| body | No | Parsed CoinRithm response body, or raw text when the response is not JSON. |