# Volumes (/scripting-v2/furge/sources/volumes)



## Returned record [#returned-record]

Illustrative values with optional fields. Timestamps use Unix milliseconds.

```json
{
  "t": 1793232000000,
  "volume": 12.4,
  "trades": 84,
  "close_time": 1793232060000,
  "price": 80510
}
```

| Field | Type | Meaning |
| --- | --- | --- |
| `t` | integer | Unix timestamp in milliseconds. |
| `volume` | number | Aggregate volume. |
| `trades` | integer, optional | Trade count. |
| `close_time` | integer, optional | Exclusive period end. |
| `price` | number, optional | Reference price. |

## Configure the feed [#configure-the-feed]

```python
SOURCE = "btc@volumes@hyperliquidf:timeframe=60"
```

Use `bulkf` for BULK. For registered Hyperliquid, BULK, Nest and Montra markets, the live selector reads Furge's indexed volume profiles. Set `timeframe` in seconds. Supported intervals are 1, 3, 5, 15, and 30 minutes, 1, 2, 4, 6, 8, and 12 hours, and 1 day.

The live indexed record contains the interval start `t`, its end `close_time`, and `volume`, the sum of buy and sell base quantities across price levels. It can update more than once during the same interval. When the feed includes them, `price` is the latest traded price and `trades` is the interval trade count. Historical runs read aggregate bars from completed indexed candles within stored coverage.

```python
script = {"name": "watch-volume", "version": "2", "lookback": 2}
SOURCE = "btc@volumes@hyperliquidf:timeframe=60"


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

An indexed read returns one dictionary or `None`; without an index it returns retained records oldest to newest. See [Read history](/scripting-v2/furge/sources#read-history).

## Volume for pool and contract markets [#volume-for-pool-and-contract-markets]

Copy the pool source from **Markets**, replace `@trades@` with `@volumes@`, and add a timeframe.

```python
script = {"name": "watch-nest-volume", "version": "2", "lookback": 2}
SOURCE = "UBTC/USDC@volumes@nest:timeframe=60"


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

[All Furge data sources](/scripting-v2/furge/sources) · [Monitoring](/scripting-v2/furge/monitoring).
