Data Sources

Candles

Candles 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,
  "o": 80500,
  "h": 80520,
  "l": 80490,
  "c": 80510,
  "volume": 12.4,
  "trades": 84,
  "close_time": 1793232060000
}
FieldTypeMeaning
tintegerBucket start in Unix milliseconds.
onumberOpen price.
hnumberHigh price.
lnumberLow price.
cnumberClose price.
volumenumberTotal available volume.
tradesintegerTrade count.
close_timeinteger, optionalExclusive bucket end in Unix milliseconds.
vb, vsnumber, optionalBuy and sell volume.
tb, tsinteger, optionalBuy and sell trade counts.

For direct BTC feeds, volume, vb, and vs are BTC quantities; trades, tb, and ts are counts. Optional fields are omitted when unavailable, not guaranteed to be zero.

Configure the feed

SOURCE = "btc@candles@hyperliquidf:timeframe=60"

Use bulkf for BULK. timeframe is a positive whole number of seconds. Live candles are built from trades, and only complete epoch-aligned intervals are emitted. The first partial interval is discarded; periods with no trades do not create invented candles.

Nest and Montra support live candles derived from trades. Each candle's volume is the base quantity traded in the interval, with vb and vs splitting buys and sells.

Historical runs use stored candles at supported intervals. Furge's indexed history starts at 60 seconds and is available for registered Hyperliquid, BULK, Nest, Ascend and Montra markets within stored coverage. BULK also supports its native 10-second candle interval. Contract market history supports data analysis. Swap and liquidity actions run live.

Read a candle

script = {"name": "watch-candles", "version": "2", "lookback": 20}
SOURCE = "btc@candles@hyperliquidf:timeframe=60"


def on_data(ctx, history):
    candle = history.source(SOURCE, 0)
    if candle is not None:
        return {"metrics": {"close": candle["c"], "volume": candle["volume"]}}

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