Skip to main content

List Orders

Returns either open orders or closed orders depending on the open parameter. One endpoint, one URL.

  • Open orders: open=true. Default count is 25.
  • Closed orders: open=false. Default count is 500.

HTTP

MethodGET
Endpoint/trade/api/v2/orders
Rate limit10000 requests per 10 seconds

Request Parameters

ParameterTypeMandatoryDescription
openboolYestrue for open orders, false for closed.
countintegerNoPage size. Default 25 for open, 500 for closed.
from_timeintegerNoFilter: orders created at/after this timestamp (Unix ms).
to_timeintegerNoFilter: orders created at/before this timestamp (Unix ms).
sidestringNobuy or sell (case-insensitive).
symbolsstringNoComma-separated list. Examples: BTC/INR, BTC/USDT, btc/inr,eth/inr.
exchangesstringNoComma-separated. See Exchange Identifiers.
typestringNoOrder type. Defaults to LIMIT.
statusstringNoFilter by exact status. Used primarily with open=false.
Closed-order pagination

Closed-orders responses contain the latest 500 entries. For older records, email api@coinswitch.co.

Example

import requests

# Open orders
headers, path = sign_request("GET", "/trade/api/v2/orders", params={
"open": "true",
"exchanges": "coinswitchx,c2c1",
"symbols": "btc/inr,eth/inr",
"side": "sell",
"type": "limit",
"count": 25,
})
print(requests.get(BASE_URL + path, headers=headers).json())

# Closed orders
headers, path = sign_request("GET", "/trade/api/v2/orders", params={
"open": "false",
"exchanges": "coinswitchx,c2c1",
"symbols": "btc/inr,eth/inr",
"status": "EXECUTED",
"count": 100,
})
print(requests.get(BASE_URL + path, headers=headers).json())

Response

{
"data": {
"orders": [
{
"order_id": "56013d06-7fe6-416f-9086-86902577ba99",
"symbol": "SHIB/INR",
"price": 0.000638,
"average_price": 0.000957,
"orig_qty": 187400,
"executed_qty": 0,
"status": "OPEN",
"side": "SELL",
"exchange": "coinswitchx",
"order_source": "API_TRADING",
"created_time": 1687173658000,
"updated_time": 1687173705000
}
]
}
}

If no orders match the filters, data.orders is an empty array.

Response Parameters

data.orders is an array of order objects. Each entry has the same shape as Create Order.