Data Sources

Orderbook

Orderbook selectors, returned fields, and examples for Furge scripts.

Returned record

Illustrative direct-feed values. Prices use the market's quote asset per base asset, and timestamps use Unix milliseconds.

Example returned record
{
  "exchange": "hyperliquidf",
  "symbol": "BTC",
  "timestamp_ms": 1793232000000,
  "bids": [
    {
      "price": 80500,
      "quantity": 0.25
    }
  ],
  "asks": [
    {
      "price": 80501,
      "quantity": 0.4
    }
  ]
}
FieldTypeMeaning
exchangestringNormalized exchange.
symbolstringNormalized symbol.
timestamp_msintegerSnapshot time in Unix milliseconds.
bidslistBid levels, best price first.
askslistAsk levels, best price first.
bids[i].price, asks[i].pricenumberLevel price.
bids[i].quantity, asks[i].quantitynumberLevel quantity.

Configure the feed

SOURCE = "btc@orderbook@hyperliquidf:depth=5"

Direct Hyperliquid and BULK orderbooks are live-only. Do not add a timeframe. Hyperliquid depth is 1 through 20; configured depth caps the returned levels. This is aggregated depth, not a list of individual resting orders or an L4 subscription. Either side can be empty.

script = {"name": "watch-book", "version": "2", "lookback": 2}
SOURCE = "btc@orderbook@hyperliquidf:depth=5"


def on_data(ctx, history):
    book = history.source(SOURCE, 0)
    if book and book["bids"] and book["asks"]:
        return {"metrics": {"spread": book["asks"][0]["price"] - book["bids"][0]["price"]}}

Use Watch the spread for a complete example with basis-point conversion.

An indexed read returns one dictionary or None; without an index it returns retained records oldest to newest. See Read history.

All Furge data sources · Monitoring.

On this page