L2: Get order book

API: bitmex.com:bitmex
Endpoint: /orderBook/L2
Response format: text/plain
Auth: none
Method: GET
Last Status: 200
Latency: 474ms

Description

Get the current order book (Level 2) for a symbol.

Parameters (2)

depth (integer, query, optional, default: 25)

Order book depth (25 or 100)

Constraints: {'enum': [25, 100]}

symbol (string, query, required)

Instrument symbol (e.g., XBTUSD)

Examples (2)

Get order book for XBTUSD (Bitcoin) probe-gate
curl 'https://www.bitmex.com/api/v1/orderBook/L2?symbol=XBTUSD&depth=5'
import requests

resp = requests.get(
    "https://www.bitmex.com/api/v1/orderBook/L2",
    params={
        'symbol': 'XBTUSD',
        'depth': '5',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("bitmex")
result = api.fetch("orderBook/L2", symbol="XBTUSD", depth=5)

for item in result:
    print(item)
const resp = await fetch("https://www.bitmex.com/api/v1/orderBook/L2?symbol=XBTUSD&depth=5");
const data = await resp.json();
Get order book for ETHUSD (Ethereum) probe-gate
curl 'https://www.bitmex.com/api/v1/orderBook/L2?symbol=ETHUSD&depth=3'
import requests

resp = requests.get(
    "https://www.bitmex.com/api/v1/orderBook/L2",
    params={
        'symbol': 'ETHUSD',
        'depth': '3',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("bitmex")
result = api.fetch("orderBook/L2", symbol="ETHUSD", depth=3)

for item in result:
    print(item)
const resp = await fetch("https://www.bitmex.com/api/v1/orderBook/L2?symbol=ETHUSD&depth=3");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 02:57:35.532063 200 474ms
2026-04-16 00:02:19.069281 200 454ms
2026-04-15 04:08:57.717237 200 571ms
2026-04-15 02:17:36.947882 200 452ms
2026-04-14 04:00:09.239294 200 607ms
2026-04-14 02:37:23.785244 200 540ms
2026-04-12 16:56:32.959014 200 472ms
2026-04-12 13:16:24.889235 200 404ms
2026-04-10 01:44:58.009733 200 312ms
2026-04-10 00:29:16.049534 200 310ms
2026-04-09 01:34:32.274507 200 466ms
2026-04-09 01:12:55.191695 200 429ms
2026-04-08 00:21:30.678962 200 477ms
2026-04-08 00:05:38.837189 200 446ms
2026-04-07 01:13:22.082616 200 872ms
2026-04-07 01:06:50.885291 200 535ms
2026-04-06 06:46:53.695262 200 438ms
2026-04-06 04:21:21.570514 200 430ms
2026-04-05 03:02:58.225017 200 424ms
2026-04-05 02:32:43.662226 200 389ms
2026-04-04 02:29:51.942754 200 358ms
2026-04-04 02:26:53.619758 200 360ms
2026-04-03 12:57:29.864913 200 458ms
2026-04-03 12:39:35.550606 200 457ms
2026-03-30 02:33:17.720331 200 366ms
2026-03-30 02:31:14.215962 200 462ms
2026-03-29 13:00:34.641017 200 432ms
2026-03-29 12:44:26.374139 200 433ms