Get OrderBook
Get the current order book (bids/asks) for a pair. This is a public endpoint (no authentication required).
Returns a snapshot of the order book. For continuous updates, use the orderbook and obdiff WebSocket channels instead of polling. If the order book is temporarily unavailable, the endpoint returns 503; retry after a short delay.
pairSymbolis required.limitdefaults to100. A value above100is silently reduced to100rather than rejected, so an over-largelimitstill returns200. Values<= 0are rejected.
OrderBook
GET /api/v2/orderbook
Query Parameters
| Name | Type | Description |
|---|---|---|
| pairSymbol* | string | BTCUSDT, ETHUSDT etc. |
| limit | integer | Number of price levels per side (default 100). Values above 100 are clamped to 100. |
- 200
- 400: bad request
- 400: pair not found
- 503: feed unavailable
{
"success": true,
"message": null,
"code": 0,
"data": {
"timestamp": 1790169095704,
"bids": [
["85391", "0.00292756"],
["85367", "0.09831930"],
["85366", "0.01019407"]
],
"asks": [
["85412", "0.09831930"],
["85413", "0.02341563"],
["85421", "0.02341344"]
]
}
}
{ "data": null, "success": false, "message": "INVALID_REQUEST_ERROR", "code": 1038 }
{ "data": null, "success": false, "message": "PAIR_NOT_FOUND_ERROR", "code": 1027 }
{ "data": null, "success": false, "message": "INTERNAL_ERROR", "code": 500 }
Each entry in bids/asks is [price, amount], both as strings.
Code Example
- curl
- C#
curl -X GET "https://api.global.btcturk.com/api/v2/orderbook?pairSymbol=BTCUSDT&limit=25"
using var client = new HttpClient { BaseAddress = new Uri("https://api.global.btcturk.com") };
var response = await client.GetAsync("/api/v2/orderbook?pairSymbol=BTCUSDT&limit=25");
Console.WriteLine(await response.Content.ReadAsStringAsync());