Skip to main content

List Order Books

Get order books for multiple instruments.

Endpoint

GET /api/v3/market/orderBook/list

Description

Retrieves order books for multiple trading instruments in a single request.

Authentication

Requires Bearer token authentication.

Authorization: Bearer {access_token}

Request Parameters

ParameterTypeRequiredDescription
instrumentIdsarrayNo*Array of instrument IDs
venuestringNo*Filter by venue
symbolsstringNo*Comma-separated symbols
depthintegerNoOrder book depth (default: 10, max: 100)

*At least one filter parameter is required.

Response

Returns an array of order book objects.

FieldTypeDescription
instrumentIdstringInstrument identifier
venuestringVenue identifier
symbolstringTrading pair symbol
bidsarrayBuy orders (sorted by price descending)
asksarraySell orders (sorted by price ascending)
timestampintegerOrder book timestamp (milliseconds)

Usage

import requests

headers = {"Authorization": f"Bearer {access_token}"}

# Get order books for specific instruments
response = requests.get(
"https://cadenza-api-uat.algo724.com/api/v3/market/orderBook/list",
headers=headers,
params={
"instrumentIds": ["BINANCE:BTC/USDT", "BINANCE:ETH/USDT"],
"depth": 5
}
)

order_books = response.json()["data"]
for ob in order_books:
print(f"{ob['instrumentId']}: bid={ob['bids'][0][0]}, ask={ob['asks'][0][0]}")

# Get order books by venue and symbols
response = requests.get(
"https://cadenza-api-uat.algo724.com/api/v3/market/orderBook/list",
headers=headers,
params={
"venue": "BINANCE",
"symbols": "BTC/USDT,ETH/USDT",
"depth": 10
}
)
curl "https://cadenza-api-uat.algo724.com/api/v3/market/orderBook/list?venue=BINANCE&symbols=BTC/USDT,ETH/USDT&depth=5" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Example Response

{
"data": [
{
"instrumentId": "BINANCE:BTC/USDT",
"venue": "BINANCE",
"symbol": "BTC/USDT",
"bids": [
["50000.00", "1.5"],
["49999.50", "2.3"],
["49999.00", "0.8"]
],
"asks": [
["50000.50", "1.2"],
["50001.00", "2.0"],
["50001.50", "0.5"]
],
"timestamp": 1703052635110
},
{
"instrumentId": "BINANCE:ETH/USDT",
"venue": "BINANCE",
"symbol": "ETH/USDT",
"bids": [
["2500.00", "10.5"],
["2499.90", "20.3"],
["2499.80", "15.8"]
],
"asks": [
["2500.10", "12.2"],
["2500.20", "8.0"],
["2500.30", "5.5"]
],
"timestamp": 1703052635115
}
],
"success": true,
"errno": 0,
"error": null
}

Error Responses

HTTP CodeErrorDescription
400Invalid requestMissing or invalid parameters
401UnauthorizedInvalid or expired access token

Notes

  • More efficient than making multiple individual requests
  • Order books are fetched in parallel from the exchange
  • Not all requested instruments may be returned if some are unavailable
  • For real-time updates, use the WebSocket API with channel subscriptions