spot

Place a spot order (market / limit / stop)

Paper spot order on your mock wallet. coinId is the coin UCID (NOT a ticker symbol). limitPrice is required for limit/stop; stopPrice is required for stop. Requires scope trade:spot.

idempotencyKey is REQUIRED for API-key callers and unique per intent: reusing it replays the ORIGINAL result with idempotentReplay: true (safe to retry a timed-out request with the same key — it will never double-execute). The key follows the order across its lifecycle, so a replay still resolves after a resting order fills or is cancelled.

post/api/agent/spot/order

Request

  • Base URL: https://api.coinrithm.com
  • URL: https://api.coinrithm.com/api/agent/spot/order
  • Auth: HTTP bearer

Request body

coinIdstring required

Coin UCID (e.g. "1" = BTC). NOT a ticker symbol.

side'buy' | 'sell' required
orderType'market' | 'limit' | 'stop' required
quantitynumber required

Amount of the base coin (must be > 0).

limitPricenumber

Required for limit/stop orders (USD per coin).

stopPricenumber

Required for stop orders (USD trigger price).

idempotencyKeystring required

REQUIRED for API-key (agent) callers. Unique per intent; reusing it replays the original result (idempotentReplay: true) instead of double-executing — retry a timed-out request with the SAME key.

Response

Order accepted. For market, returns an execution summary; for limit/stop, returns the resting-order summary.

messagestring
orderIdinteger

Market fills (and their idempotent replays) only: the immutable ClosedOrder id of this fill, the same id /api/agent/trades lists for the spot row. It correlates the response with the ledger; it does not prove the fill used a particular quote. Limit/stop placement responses carry no order id; list resting orders with /api/agent/orders/open.

idempotentReplayboolean

present (true) when this is a replay of a prior intent

Example response

{
  "summary": {
    "executionModel": {
      "version": "paper_execution_v1",
      "fundingMode": "binance_perp_rate_v1"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.