trades() reaches back to the start of the UTC day before yesterday, from 0xArchive’s history, and continues live from the chart’s tape.
A trade
Sum the tape per bar
Add each trade to a tally inonTrade, and read it in the chart’s onBar. This is volume delta, in USD:
minSize and minNotional filter the stream, so trades({ minNotional: 100_000 }) delivers only trades of $100k or more.
Opening and closing trades
0xArchive records each trade’s change in open interest (oiDelta), in the market’s coin. With the taker’s side it says what the trade did:
An
oiDelta of 0 means one side opened while the other closed. Hyperliquid and HIP-3 count both sides of open interest, Lighter longs only, as each venue’s own open interest does. Opening and closing flow and Squeeze or new positions are built on it.
Taker orders
One market order fills against many resting orders, and each fill is a trade.sameOrder is true when the same taker order filled the trade before it, so a new order starts wherever it is false. That joins fills into orders across the whole history, where takerOrderId is null:
Order flow by bar, without events
Bars that close on trades (t500, v1000000 and the rest) carry buyVolume and sellVolume on each bar. Time bars do not split volume, so sum trades() for them.