Skip to main content
GET
/
v1
/
orderbook
/
fetch_orderbook_microstructure
Fetch orderbook microstructure
curl --request GET \
  --url https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure
{
  "asset_id": "<string>",
  "depth_buckets": {
    "ask_within_100bps": 123,
    "ask_within_10bps": 123,
    "ask_within_50bps": 123,
    "bid_within_100bps": 123,
    "bid_within_10bps": 123,
    "bid_within_50bps": 123
  },
  "level_count": {
    "asks": 1,
    "bids": 1
  },
  "max_gap": {
    "ask_gap_bps": 123,
    "bid_gap_bps": 123
  },
  "openpx_ts": "2023-11-07T05:31:56Z",
  "ask_slope": 123,
  "bid_slope": 123,
  "exchange_ts": "2023-11-07T05:31:56Z"
}
Microstructure signals: depth within 10/50/100 bps, slope, max gap, and per-side level counts.

Query Parameters

asset_id
string
required

Response

Success.

Microstructure signals for one orderbook.

asset_id
string
required

Orderable asset id (e.g. "KXBTCD-25APR1517").

depth_buckets
DepthBuckets · object
required

Cumulative depth at 10/50/100 bps from mid.

level_count
LevelCount · object
required

Number of levels per side.

max_gap
MaxGap · object
required

Largest consecutive-level price gap on each side, in basis points.

openpx_ts
string<date-time>
required

Wall-clock time OpenPX served the response (UTC).

ask_slope
number<double> | null

OLS slope of cumulative ask size vs distance-from-mid (e.g. 12.5).

bid_slope
number<double> | null

OLS slope of cumulative bid size vs distance-from-mid (e.g. 12.5).

exchange_ts
string<date-time> | null

Upstream snapshot time in UTC; null when not provided.