# Order flow by exchange

oi_bn, cvd_hl, funding_ok, liq_long_by, ...: open interest, CVD, funding and liquidations of one exchange.

On BackQuant's BTC, ETH, SOL and HYPE charts, open interest, CVD, funding and liquidations come for each exchange on its own: the name, `_`, then the exchange as the chart writes it (`bn` Binance, `by` Bybit, `ok` OKX, `hl` Hyperliquid, `dr` Deribit, `lighter` Lighter, `gate` Gate.io). `oi_bn` is Binance's open interest, `cvd_hl` Hyperliquid's running delta, `liq_long_ok` the longs liquidated on OKX. Each equals that exchange's line of its pane bar for bar (OI by exchange, CVD perp by exchange, Funding by exchange, Liquidations on that exchange's chart), known at the bar's close. Where an exchange has none for the coin or the bar, the value is empty. Plain `oi` and `funding` stay all exchanges together, and `buy_volume`, `sell_volume`, `delta` and `cvd` the chart's own bars.

On an exchange's chart of a perpetual (`hl:DOGE`, `bn:ETHUSDT`), plain `oi`, `funding`, `liq_long` and `liq_short` are that market's own where BackQuant records the market, and the names by exchange read its coin on each exchange as that chart's panes do (empty where an exchange does not list it).

| Name | bn | by | ok | hl | dr | lighter | gate |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `oi_` ($) | yes | yes | yes | yes | yes (1) | yes (1) |  |
| `cvd_` ($, a running total) | yes | yes | yes | yes | yes (2) | yes (2) |  |
| `funding_` (bps per 8 hours) | yes | yes | yes | yes | yes (3) | yes (3) | yes |
| `liq_long_`, `liq_short_` ($ per bar) | yes (4) | yes | yes (4) |  | yes (2) | yes (2) |  |

- No liquidations on Hyperliquid: it publishes none. Funding has Gate.io too.
- (1) Deribit's and Lighter's open interest from 24 Nov 2026; the other exchanges' the last 30 days. CVD by exchange is kept 30 days as well.
- (2) BackQuant's recorded history, from 11 Nov 2026.
- (3) Deribit's funding on BTC and ETH only; Lighter's from 18 Nov 2026.
- (4) Binance and OKX publish at most one liquidation a second per market, so a burst is undercounted.
- `cvd_` is a running total from the first bar loaded, like `cvd`, so its level depends on how much history is on screen: compare its changes (`cvd_bn - prev(cvd_bn, n)`), not its level.

These names came after scripts were first saved. A script that already sets one of them (`oi_bn = ...`) keeps its own value; the editor warns, and another name for it (`my_oi_bn`) reads the data.

**Positions opening on Binance while Bybit closes them**

```vex
name("Binance vs Bybit open interest", where = pane)

n = 24
bn = (oi_bn / prev(oi_bn, n) - 1) * 100
by = (oi_by / prev(oi_by, n) - 1) * 100
plot(bn, "Binance OI change (%)", color = yellow)
plot(by, "Bybit OI change (%)", color = orange)
plot(bn - by, "Gap", style = bars, color = if bn > by then up else down)
mark(bn > 0 and by < 0 and closed, "D", where = above)
level(0)
```

See also: [BackQuant data](/documentation/vex/backquant-data), [Footprint numbers](/documentation/vex/footprint-numbers), [oi](/documentation/vex/reference/backquant-data#oi), [funding](/documentation/vex/reference/backquant-data#funding), [liq_long](/documentation/vex/reference/backquant-data#liq-long), [cvd](/documentation/vex/reference/bar-values#cvd)
