Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt

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

Returns the current order book for both sides (or a specific side) of a market, aggregated by price level with order count and unique-maker count per level.

Endpoint

GET /v1/markets/:id/book

Query parameters

ParamTypeDefaultDescription
sideintboth0 = Yes only, 1 = No only
levelsint30Depth per side (max 200)

Response

{
  "outcome_id": 0,
  "as_of": { "us": 1777745652310639, "iso": "...", "relative": "0s ago" },
  "levels_per_side": 5,
  "sides": [
    {
      "side_index": 0,
      "label": "Yes",
      "coin": "#0",
      "best_bid": "0.6478",
      "best_ask": "0.60673",
      "bids": [
        { "price": "0.6478", "size": "100.0", "orders": 1, "makers": 1 }
      ],
      "asks": [
        { "price": "0.60673", "size": "41.0",  "orders": 1, "makers": 1 },
        { "price": "0.60923", "size": "80.0",  "orders": 1, "makers": 1 },
        { "price": "0.6168",  "size": "56.0",  "orders": 1, "makers": 1 }
      ]
    },
    { "side_index": 1, "label": "No", "coin": "#1", "best_bid": "...", "best_ask": "...", "bids": [...], "asks": [...] }
  ]
}
FieldDescription
as_ofTimestamp the book snapshot was computed
bids[]Sorted descending by price (highest bid first)
asks[]Sorted ascending by price (lowest ask first)
bids[i].priceLimit price of the level (USDH per share)
bids[i].sizeTotal resting size at this level
bids[i].ordersNumber of distinct orders at this level
bids[i].makersNumber of distinct wallets providing this size

Use cases

  • Live orderbook display: render the book directly.
  • Spread + depth analytics: best_ask - best_bid, sum sizes across N levels.
  • Liquidity quality: high makers/orders ratio = many real makers vs few large limit orders.

Examples

curl -H "X-API-Key: hip4_live_..." \
  "https://hip4.polynode.dev/api/v1/markets/0/book?levels=10"

Notes

  • For historical book reconstruction at any past timestamp see /v1/markets/:id/book/at/:ts (coming soon).
  • Edge-cached for 1 second.