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.
{
"t": 1793232000000,
"o": 80500,
"h": 80520,
"l": 80490,
"c": 80510,
"volume": 12.4,
"trades": 84,
"close_time": 1793232060000
}| Field | Type | Meaning |
|---|---|---|
t | integer | Bucket start in Unix milliseconds. |
o | number | Open price. |
h | number | High price. |
l | number | Low price. |
c | number | Close price. |
volume | number | Total available volume. |
trades | integer | Trade count. |
close_time | integer, optional | Exclusive bucket end in Unix milliseconds. |
vb, vs | number, optional | Buy and sell volume. |
tb, ts | integer, optional | Buy 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.