Skip to main content
GET
/
v1
/
orderbook
/
fetch_orderbook_stats
Fetch orderbook stats
curl --request GET \
  --url https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_stats
{
  "ask_depth": 123,
  "asset_id": "<string>",
  "bid_depth": 123,
  "openpx_ts": "2023-11-07T05:31:56Z",
  "best_ask": 123,
  "best_bid": 123,
  "exchange_ts": "2023-11-07T05:31:56Z",
  "imbalance": 123,
  "mid": 123,
  "spread_bps": 123,
  "weighted_mid": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.openpx.trade/llms.txt

Use this file to discover all available pages before exploring further.

Snapshot stats: top-of-book bid/ask, mid, spread (bps), size-weighted mid, top-10 imbalance, and total bid/ask depth — pure functions of the full-depth orderbook. exchange_ts carries the upstream snapshot time; openpx_ts is set to wall-clock when OpenPX served the response.

Query Parameters

asset_id
string
required

Response

Success.

ask_depth
number<double>
required
asset_id
string
required
bid_depth
number<double>
required
openpx_ts
string<date-time>
required
best_ask
number<double> | null
best_bid
number<double> | null
exchange_ts
string<date-time> | null
imbalance
number<double> | null
mid
number<double> | null
spread_bps
number<double> | null
weighted_mid
number<double> | null