book: Get order book

API: coinbase.com:coinbase-pro-api
Endpoint: /products/{product_id}/book
Response format: application/json
Auth: none
Method: GET
Last Status: 200
Latency: 259ms

Description

Returns the current order book for a trading pair showing bid (buy) and ask (sell) orders. Use this to analyze market depth, determine spread, and understand current liquidity before trading.

From spec: Get the order book for a specific product. Level 1 returns only the best bid and ask. Level 2 returns aggregated bids and asks. Level 3 returns the full order book (non-aggregated).

Usage Tips

- Use 'level' parameter: 1 (best bid/ask only), 2 (top 50), 3 (full book) - 'bids' are buy orders, 'asks' are sell orders - Each order shows [price, size, num_orders] - Check 'sequence' number to track order book updates

Parameters (2)

level (integer, query, optional, default: 1)

Aggregation level: 1 (best bid/ask only), 2 (aggregated), 3 (full)

Constraints: {'enum': [1, 2, 3]}

product_id (string, path, required)

Product ID (e.g., BTC-USD)

Examples (1)

Get BTC-USD order book snapshot (level 1) probe-gate

Demonstrates fetching a minimal order book showing only the best bid and ask prices for quick spread analysis.

curl 'https://api.exchange.coinbase.com/products/BTC-USD/book?level=1'
import requests

resp = requests.get(
    "https://api.exchange.coinbase.com/products/BTC-USD/book",
    params={
        'level': '1',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("coinbase-pro")
result = api.fetch("products/{product_id}/book", level=1)

for item in result:
    print(item)
const resp = await fetch("https://api.exchange.coinbase.com/products/BTC-USD/book?level=1");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 16:51:36.336467 200 259ms
2026-04-16 03:59:17.831937 200 313ms
2026-04-15 00:25:31.881933 200 239ms
2026-04-14 00:59:33.261991 200 425ms
2026-04-12 14:16:20.710902 200 96ms
2026-04-10 00:40:55.432445 200 87ms
2026-04-09 01:36:34.263913 200 278ms
2026-04-08 00:09:16.056779 200 150ms
2026-04-07 00:22:24.815355 200 268ms
2026-04-05 19:09:21.172980 ERR