# Orderbook (/scripting/sources/orderbook)



Live orderbooks use an optional `depth` and no timeframe:

```bash
--source btc@orderbook@binancef@mmt:depth=100
--source btc@orderbook@bulkf:depth=20
--source btc@orderbook@hyperliquidf:depth=20
```

Depth defaults to `100` where supported. Hyperliquid accepts depths from 1 through 20. Read snapshots through history:

```js
const book = history.source('btc@orderbook@bulkf', 0)
const previous = history.source('btc@orderbook@bulkf', 1)
```

MMT orderbooks are also available in backtests, where `timeframe` chooses the historical heatmap bucket:

```bash
--source btc@orderbook@binancef@mmt:timeframe=60,depth=100
```

Historical MMT books are reconstructed from binned `flat_heatmap_hd` data. They are suitable for liquidity and execution-condition analysis, not exact raw order replay. Direct BULK and Hyperliquid historical orderbooks are not available for script backtests.

See [Orderbook Data Type](/scripting/data-types/orderbook).
