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.
{
"t": 1793232000000,
"value": 1200,
"o": 1200,
"h": 1200,
"l": 1200,
"c": 1200,
"n": 1,
"mark_price": 80500,
"notional": 96600000
}| Field | Type | Meaning |
|---|---|---|
t | integer | Unix timestamp in milliseconds. |
value | number | Current normalized OI value. |
o, h, l, c | number | Period OHLC or normalized snapshot value. |
n | integer | Sample count. |
mark_price | number, optional | Current mark price. |
notional | number, optional | Current 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.