Spot trading

Place Spot order

Changed on

Place a fully funded Spot limit or market order. Use base-denominated size; quoteSize is unsupported. Acknowledgement is not a fill guarantee. Reconcile an uncertain submission by clientOrderId before replacing it. Client IDs are not idempotency keys: accepted-ID reuse fails with clientOrderID_collision. Price protection uses the underlying oracle; see /mark-price-protection. Some flows require /v1/spot/orders/delayed; re-sign the new path when instructed.

See the Spot API guide. Requires authentication; API-key scope: trade.

post/v1/spot/orders

Request

  • Base URL
    https://api.ondoperps.xyz
  • URL
    https://api.ondoperps.xyz/v1/spot/orders
  • Auth
    • HTTP bearer
    • or API key in header ONDO-KEY-ID

Request body

side'buy' | 'sell' required

buy or sell

pricestring

Limit price. Must be aligned with quoteIncrement from /v1/markets. Omit for market orders.

sizestring required

Order quantity in base currency. Used for both limit and market orders. Must be aligned with baseIncrement from /v1/markets.

marketstring required

Trading market pair

clientOrderIdstring

Optional client-provided order ID. Must be alphanumeric including underscores and dashes, and at most 64 characters.

type'limit' | 'market'

Order type. Defaults to "limit".

timeInForce'GTC' | 'IOC'

"GTC" (Good until cancelled) or "IOC" (Immediate or cancel). Cannot be set for market orders. Defaults to "GTC".

postOnlyboolean

Use only with a GTC limit order. Rejects an order that would immediately match; cannot be combined with IOC.

Example request

{
  "side": "buy",
  "price": "1.55",
  "size": "20.30",
  "market": "SPY-USDC",
  "clientOrderId": "order123",
  "type": "limit",
  "timeInForce": "GTC"
}

Response

Success. Inspect item-level outcomes for batch operations.

successboolean required

Example response

{
  "result": {
    "orderId": "70a37d8f972f2494837f9dba8364cbb4",
    "clientOrderId": "order123",
    "side": "buy",
    "price": "1.55",
    "size": "20.30",
    "market": "SPY-USDC",
    "filledSize": "5.403",
    "lastFillSize": "5.403",
    "filledCost": "8.37465",
    "fee": "0.0837",
    "status": "open",
    "createdAt": "2022-06-16T12:35:11.123456Z",
    "filledAt": "2022-06-16T12:35:11.123456Z",
    "canceledAt": "2022-06-16T12:35:11.123456Z",
    "cancelReason": "liquidation",
    "type": "limit",
    "timeInForce": "GTC"
  }
}

Changes