v1

latestOpenAPI 3.0.32026-07-2613529376.3 KB
Collateral Trading

Query unexecuted(active) OCO orders

The endpoint returns active (unexecuted) OCO orders for the authenticated account. Each OCO order contains a stop_loss and take_profit leg. When one leg executes, the system cancels the other automatically. Use the optional market parameter to filter results.

<Warning> Rate limit: 12000 requests/10 sec. </Warning> <Note> This endpoint supports pagination. Use `limit` (default: 50) and `offset` (default: 0) to page through results. The response does not include a `total` field — detect the last page when fewer than `limit` OCO orders are returned. An empty array means you have paged past the end; receiving exactly `limit` orders does not guarantee that another page exists. </Note> <Accordion title="Error Codes"> - `30` - default validation error code (invalid pagination — `limit` outside 1–100 or negative `offset`) - `31` - market validation failed (the `market` filter is unknown or not available for collateral trading) </Accordion>
post/api/v4/oco-orders

Request body

marketstring

Filter by specific market. Example: BTC_USDT

If not specified, returns OCO orders for all markets.

offsetinteger

Number of records to skip for pagination.

limitinteger

Maximum number of records to return per page.

requeststring
nonceinteger

Example request

{
  "market": "BTC_USDT",
  "limit": 100,
  "request": "{{request}}",
  "nonce": 1594297865000
}

Response

Successful response - returns array of active OCO orders

idinteger

OCO order identifier

Example response

[
  {
    "id": 117703764513,
    "stop_loss": {
      "orderId": 117703764514,
      "market": "BTC_USDT",
      "side": "buy",
      "type": "stop limit",
      "timestamp": 1594605801.49815,
      "dealMoney": "0",
      "dealStock": "0",
      "amount": "2.241379",
      "takerFee": "0.001",
      "makerFee": "0.001",
      "left": "2.241379",
      "dealFee": "0",
      "mtime": 1662478154.941582,
      "price": "19928.79",
      "activation_price": "29928.79",
      "activation_condition": "gte",
      "status": "FILLED",
      "stp": "no"
    },
    "take_profit": {
      "orderId": 117703764515,
      "market": "BTC_USDT",
      "side": "buy",
      "type": "limit",
      "timestamp": 1662478154.941582,
      "dealMoney": "0",
      "dealStock": "0",
      "amount": "0.635709",
      "takerFee": "0.001",
      "makerFee": "0.001",
      "left": "0.635709",
      "dealFee": "0",
      "mtime": 1662478154.941582,
      "price": "9928.79",
      "status": "FILLED",
      "stp": "no"
    }
  }
]