Documentation Index
Fetch the complete documentation index at: https://docs.binibit.com/llms.txt
Use this file to discover all available pages before exploring further.
Description
Returns up to 40 bid levels and 40 ask levels for one trading pair, as a flat array of order-book levels.
Each level has an isBid flag indicating whether it is a bid (true) or ask (false).
Parameters
Pair code in {base}_{target} format, e.g. TRX_USDT.
Response
Array of order-book levels. Each level:
true for a bid, false for an ask.
Price level in target (quote) currency.
Available quantity at this level, denominated in base currency.
Equivalent value at this level in target (quote) currency. Equals price * amount.
Deprecated alias of amount. Will be removed in a future release.
Deprecated alias of quoteAmount. Will be removed in a future release.
Example request
curl "https://public-api.binibit.com/api/orderbook?currencyPairCode=TRX_USDT"
Example response
[
{
"isBid": true,
"price": 0.31964356,
"amount": 479.16033232,
"quoteAmount": 153.16051443,
"currencyTo": 479.16033232,
"currencyFrom": 153.16051443
},
{
"isBid": true,
"price": 0.31963366,
"amount": 211.93028363,
"quoteAmount": 67.74005222,
"currencyTo": 211.93028363,
"currencyFrom": 67.74005222
},
{
"isBid": false,
"price": 0.32621694,
"amount": 123.38,
"quoteAmount": 40.241386
}
]
Splitting bids and asks
const levels = await fetch(
`https://public-api.binibit.com/api/orderbook?currencyPairCode=TRX_USDT`
).then(r => r.json());
const bids = levels.filter(l => l.isBid).sort((a, b) => b.price - a.price);
const asks = levels.filter(l => !l.isBid).sort((a, b) => a.price - b.price);
const bestBid = bids[0]?.price;
const bestAsk = asks[0]?.price;
const spread = bestAsk - bestBid;
Notes
- Returns up to 40 levels per side. Less if the book is thin.
- For deeper books or aggregator-spec format, see Aggregator Compatibility / orderbook.
currencyTo and currencyFrom are deprecated — prefer amount and quoteAmount.