Data Sources

Open Interest

Open Interest 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
{
  "t": 1793232000000,
  "value": 1200,
  "o": 1200,
  "h": 1200,
  "l": 1200,
  "c": 1200,
  "n": 1,
  "mark_price": 80500,
  "notional": 96600000
}
FieldTypeMeaning
tintegerUnix timestamp in milliseconds.
valuenumberCurrent normalized OI value.
o, h, l, cnumberPeriod OHLC or normalized snapshot value.
nintegerSample count.
mark_pricenumber, optionalCurrent mark price.
notionalnumber, optionalCurrent OI notional.

Configure the feed

SOURCE = "btc@oi@hyperliquidf"

Use bulkf for BULK. Open interest is perpetuals-only, live-only, and snapshot-based. Do not add a timeframe.

Direct BTC interest is base quantity; notional is quote value and mark_price is quote per base. Snapshot OHLC fields all equal the current interest and n is one. Optional fields should be read with .get(...).

script = {"name": "watch-oi", "version": "2", "lookback": 2}
SOURCE = "btc@oi@hyperliquidf"


def on_data(ctx, history):
    sample = history.source(SOURCE, 0)
    if sample is not None:
        return {"metrics": {"open_interest": sample["value"]}}

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