Skip to main content

Order Book

Get order book data.

info

The response is in the snapshot format.

HTTP Request

GET /derivatives/v3/public/order-book/L2

Request Parameters

ParameterRequiredTypeComments
categoryfalsestringProduct type. linear,inverse,option. Default: linear, but in the response category shows ""
symboltruestringSymbol name. category is required when query an option symbol
limitfalseintegerLimit for data size per page. [1, 500]. Default: 25. option has 25 only

Response Parameters

ParameterTypeComments
sstringSymbol name
bstringBid. Order by price asc
astringAsk. Order by price asc
tsintegerThe timestamp(ms) that system generates the data
uintegerUpdate id, is always in sequence

Request Example

GET /derivatives/v3/public/order-book/L2?category=linear&symbol=BTCPERP&limit=2 HTTP/1.1
Host: api.bybit.com​

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"s": "BTCPERP",
"b": [
[
"16818", // price
"0.156" // qty
],
[
"16818.5",
"0.183"
]
],
"a": [
[
"16819",
"0.454"
],
[
"16819.5",
"0.054"
]
],
"ts": 1671969122791,
"u": 6404345
},
"retExtInfo": {},
"time": 1671969122869
}