# Open Interest (/scripting/sources/oi)



Open interest cannot be reconstructed from public trades, so it does not inherit the arbitrary live intervals supported by `candles`.

MMT supplies OI candles and requires a provider-supported timeframe in seconds:

```bash
--source btc@oi@binancef@mmt:timeframe=60
```

Open interest is futures-only. The installed market snapshot classifies MMT exchanges such as `binance` and `bybit` as spot, and `binancef` and `bybitf` as futures. Spot OI selectors are rejected locally.

This works in live runs and backtests. Standalone BULK and Hyperliquid supply current/live snapshots instead:

```bash
--source btc@oi@bulkf
--source btc@oi@hyperliquidf
```

Do not pass a timeframe to standalone live OI. Direct BULK and Hyperliquid OI are not available for script backtests.

Read either normalized form through history:

```js
const current = history.source('btc@oi@binancef@mmt', 0)
const previous = history.source('btc@oi@binancef@mmt', 1)
const series = history.source('btc@oi@binancef@mmt')
```

MMT records contain OI OHLC and sample count. Standalone snapshots normalize one observed value into `o`, `h`, `l`, and `c` and can also expose mark price and notional.

See [Open Interest Data Type](/scripting/data-types/oi).
