GET /api/v1/orderBooks
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/lighter/api/v1/orderBooksCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeAll perpetual, spot, and prediction order books with market IDs, fees, and precision.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
market_id | query | int | optional | Optional single market ID. |
filter | query | str | optional | Optional market type filter (all, perp, spot). |
Response
type: object
data key: order_books
pagination: none
sample: {
"code": "int",
"order_books": "array[246]"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/lighter/api/v1/orderBooks"