Orders

Get Orders

Returns a paginated list of orders matching the given parameters.

get/v1/perps/orders

Request

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

Query parameters

limitinteger
Example:1000

Maximum number of results to return

cursorstring
Example:NQ5WWO3THN3Q====

Pagination cursor

marketstring
Example:AAPL-USD.P

Filter by trading market

status'open' | 'canceled' | 'fullyfilled'
Example:open

Filter by order status

startTimeinteger
Example:1684814400000

Filter orders placed at or after this time (UTC milliseconds)

endTimeinteger
Example:1672549200000

Filter orders placed at or before this time (UTC milliseconds)

Response

Paginated list of orders, reverse chronological

successboolean required

Whether the request was successful

errorstring

Error message, present only on failure

error_codestring

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecatedstring

Deprecation notice, if applicable

Example response

{
  "success": true,
  "result": [
    {
      "orderId": "70a37d8f972f2494837f9dba8364cbb4",
      "clientOrderId": "order123",
      "parentOrderId": "twap_70a37d8f972f2494837f9dba8364cbb4",
      "side": "buy",
      "price": "1.55",
      "size": "20.30",
      "market": "AAPL-USD.P",
      "filledSize": "5.403",
      "lastFillSize": "5.403",
      "filledCost": "8.37465",
      "realizedPnl": "1.2345",
      "fee": "0.0837",
      "feeRebate": "0.0042",
      "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",
      "liquidationId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
      "triggerPrice": "125.50"
    }
  ],
  "pageInfo": {
    "prevCursor": "O4ZTGM3RGM2DG===",
    "nextCursor": "NQ5WWO3THN3Q===="
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.