bars()
The chart’s bars by default, or another market or interval.MarketInfo
string
Venue
number
The smallest price step at the current price. Hyperliquid’s step changes with price.
number
IntervalInfo
IntervalCode
number
Length in milliseconds for time bars (for months, the average month);
na for bars that close on trades.boolean
BarView
One bar. Values the source does not provide arena.
Time
Time
When the bar ends (exclusive). For time bars,
time + interval.ms; for months, the next month’s open.number
number
number
number
number
Base volume.
number
Quote (USD) volume.
number
number
Taker buy and sell base volume, when the host has them.
number
(name: SourceName): number
A bar value by name, such as
source('hl2').BarsOptions
string
A market other than the chart’s, such as
ETH.Venue
IntervalCode
An interval other than the chart’s, such as
4h.Bars
MarketInfo
IntervalInfo
number
Bar number on this stream, from 0 at the first loaded bar.
boolean
True when this run is for a closed bar; false for an update of the forming bar.
boolean
True on the first run of a bar.
boolean
True on the newest bar the chart has.
number
The index of this stream’s newest bar, known on every bar of history (Pine’s
last_bar_index). It grows as new bars arrive; bars already run keep the value they saw.Time
The open time of this stream’s newest bar, known on every bar (Pine’s
last_bar_time).boolean
True once the run has reached live data.
number
The footprint’s row size on the chart, in price: the reader’s own, or what Auto draws at the
chart’s zoom, so rows a script marks sit on the footprint’s rows. Pass it to a profile, as
profile.bar().rows({ rowSize: chart.rowSize }). A script that reads it runs again from its
first bar when the size changes. Without a footprint, the reader’s size for the market, or one
near a 5,000th of the price ($20 rows for BTC at 81,000). On the chart’s own bars only;
na on another market’s or interval’s.(n: number): BarView
The bar
n bars ago on this stream; ago(0) is the current one. Fields are na before the first bar.BarView
The developing bar of this stream, read from another stream’s handler. It changes until the
bar closes (it repaints), which is why it has to be asked for by name.
(handler: () => void): void
Runs for every bar of history, once, and again on every update of the forming bar.
(handler: () => void): void
Runs once when a bar closes, after its last
onBar.trades()
Trade
One trade (a taker fill), with the identities 0xArchive records.Time
number
number
number
price × size, in USD.
'buy' | 'sell'
The taker’s side.
string | null
string | null
The taker’s order id: fills with the same id are one order.
string | null
Wallet addresses, lower-case hex, when the source carries them.
string | null
boolean
True when the taker was being liquidated.
boolean
True when the same taker order filled the trade before this one on the stream (time order,
execution order within a millisecond), filters such as
minSize aside. False where the
source does not say. Join fills into orders with it when takerOrderId is null.number
The trade’s change in the venue’s open interest, in the market’s base unit, from both sides’
positions before it: positive where it opened positions, negative where it closed them, 0 where
one side opened and the other closed. Hyperliquid and HIP-3 count both sides of open interest,
Lighter longs only, as each venue’s own open interest does.
na where the venue does not know.Intent | null
Why the taker’s side of the trade traded, from the position it changed: see
Intent. null
where it is unknown (a position 0xArchive could not vouch for), on Lighter, and from a server
that does not send it yet.Intent | null
Why the maker’s side traded, as
takerWhy. Market makers’ legs are tagged too.Intent
What one side of a trade did to its position, as 0xArchive’s who’s-trading series buckets it:open_long,open_short: opened or added to a long (short);tp_long,tp_short: reduced or closed a long (short) in profit, not forced;stop_long,stop_short: reduced or closed a long (short) at a loss, or forced out by a liquidation or auto-deleveraging;flip_ls,flip_sl: went from long to short (short to long) in the one fill;settlement: a settlement, which is no trade decision. New values are only ever added.
TradesOptions
string
Venue
number
Skip trades smaller than this, in base units or in USD.
number
Trades
(handler: (trade: Trade) => void): void
Runs once per trade, in execution order, before the
onBar of the bar it falls in.boolean
Whether trades cover the current bar completely. Trade history is limited, so older bars have none.
takerOrders()
Taker orders joined from the market’s trades: the same history and live feed astrades().
TakerOrder
One taker order, joined from its fills: a trade withsameOrder false and the trades after it
with sameOrder true.
Time
Its fills’ time: one taker order fills within one millisecond.
'buy' | 'sell'
number
The fills’ sizes summed, in base units.
number
The fills’ price × size summed, in USD.
number
notional / size: the order’s average fill price.
number
How many fills it took. Lighter names no orders, so there every fill is an order of one.
number
The price of its first fill and of its last: how far it walked the book.
number
number
How many prices it filled at, in turn.
number
Its fills’ changes in open interest summed (see
Trade.oiDelta); na if any fill’s is.boolean
True when the taker was being liquidated.
string | null
As on its first fill: the order id and the taker’s wallet where the source names them.
string | null
TakerOrdersOptions
string
Venue
number
Skip orders smaller than this, in USD, counting the whole order.
TakerOrders
(handler: (order: TakerOrder) => void): void
Runs once per taker order, once all its fills are in, in time order with other events and
before the
onBar of the bar it falls in. A forming bar never sees part of an order.boolean
Whether trades cover the current bar completely, as
trades().available.liquidations()
Liquidation
Time
number
number
number
'long' | 'short'
The side of the position that was liquidated.
string | null
Liquidations
(handler: (liquidation: Liquidation) => void): void
boolean
Whether the current bar’s liquidations are all in. It says the bar is complete, not that the
feed is healthy. False on bars older than the 7 days of history. A closed bar waits for its
liquidations (about 2 seconds on the chart’s own market, a few minutes on another market,
which has no live feed) and reads false only past that wait; the script then runs again from
its first bar once they arrive. The forming bar reads true once everything before it is in.
Time
The time the liquidations are complete to, now, whichever bar runs;
na before the first read.'loading' | 'live' | 'delayed' | 'retrying' | 'unavailable'
How the stream stands now, whichever bar runs:
'loading' (nothing yet), 'live' (complete
to within seconds of now), 'delayed' (complete to a few minutes behind: normal for a market
other than the chart’s, for a moment while the chart’s live feed starts or reconnects, and for
a few minutes when the live server holds fewer minutes than that, as just after it restarts),
'retrying' (a read failed and is asked again, and the coverage is not keeping up meanwhile)
or 'unavailable' (the market has none).derivatives()
Derivatives
Perp state as of the current bar: the last sample at or before it.na when unknown.
Time
When the sample read was taken;
na when there is none.number
number
number
The funding rate for one hour, as a fraction (0.0001 is 0.01%).
number
number
boolean
breadth()
Breadth
The share of a venue’s markets trading above their session VWAP, as of the current bar.number
Percent, 0 to 100.
number
number
How complete the sample is: the percent of the venue’s markets that had data for it, 0 to 100.
Time
When the sample read was calculated;
na when there is none.boolean
universe
Universes picked point in time from every Hyperliquid perp, delisted ones included while they traded, so a backtest never trades a market for what it later became.(n: number, options?: UniverseOptions & { by?: 'volume' | 'openInterest'; window?: number; minHistory?: number; every?: number; anchor?: string | number }): Pool
The
n (at most 50) markets with the most dollar volume over the trailing window days (or
the most open interest on the last day, by: 'openInterest'), among those with minHistory
days of prices, re-picked every every days from anchor. Defaults: 30, 60, 30 and
2025-03-22, signal-lab’s rule; fewer than half the places filled is no universe.(select: (view: PickView) => readonly string[] | null, options?: UniverseOptions & { every?: number; anchor?: string | number }): Pool
A rule of your own:
select(view) returns the members best first (at most 50), or null to keep the last pick, every every days.(options?: UniverseOptions): Pool
Every market listed on the day read.
UniverseReads
The universe history’s reads (issue #830), for picking markets: every Hyperliquid perp’s daily rows, listed and delisted, as of the current moment, so a day is read once it has closed and never before. Days and counts are UTC days; returns are daily log returns exceptret. A rule’s
select(view) and pool.view read these; a pool’s own price reads use its members’ bars.
readonly string[]
Markets with a close on the day read.
(market: string): boolean
Whether the market has a close on the day read: listed then, and not yet delisted.
(market: string, ago?: number): number
The close
ago days back (0, the default, is the last day read).(market: string, n: number): readonly number[]
The last
n closes, oldest first, na where a day has none.(market: string, n: number): number
The simple return over the last
n days.(market: string, n: number): number
The standard deviation of the last
n daily log returns, not annualised.(market: string, to: string, n: number): number
The least-squares beta of the last
n daily log returns on to’s.(market: string, to: string, n: number, fit: number): number
The sum over the last
n days of each return less to’s times the beta fitted over the last fit days.(market: string, n: number): number
Dollar volume over the last
n days.(market: string): number
Open interest in dollars at the day’s last mark.
(market: string, n?: number): number
The mean hourly funding rate over the last
n days (1 by default); a day’s funding is about 24 times it.(market: string): number
Days of prices the market has in the universe history up to the day read.
PickView
What auniverse.rule select reads: the days before its pick.
Time
The pick’s boundary.
Pool
A universe: its members, picked point in time from the universe history, and reads of any market’s own bars at the pool’s interval (the chart’s unlessinterval names another), the bars
a portfolio trades on. Counts are bars of that interval; a bar is read once it has closed. A
market’s bars load the first time it is picked or read; until then its reads are na.
readonly string[]
The members in force, best first: at most 50.
Time
The boundary of the pick in force;
na for universe.all().boolean
UniverseReads
The universe history’s reads as of now, as a rule’s
select(view) gets them: markets, listed, openInterest, funding, historyDays…(market: string, ago?: number): number
The close
ago bars back (0, the default, is the last closed bar).(market: string, n: number): readonly number[]
The last
n closes, oldest first, na where a bar is missing.(market: string, n: number): number
The simple return over the last
n bars.(market: string, n: number): number
The standard deviation of the last
n log returns, per bar, not annualised.(market: string, to: string, n: number): number
The least-squares beta of the last
n log returns on to’s over the same bars.(market: string, to: string, n: number, fit: number): number
The sum over the last
n bars of each return less to’s times the beta fitted over the last fit bars.(market: string, n: number): number
Dollar volume over the last
n bars.UniverseOptions
number
Days of the universe history loaded before the chart’s first bar (default 180, or what the first universe or portfolio asked for).
string
The interval of the pool’s price reads, such as
'1h' or '1d', from 1m to 1W. Default the chart’s.portfolio
Turning scores into a portfolio’s weights. Scores and weights are objects of market to number.(scores: Readonly<Record<string, number>>): readonly string[]
The markets by score, best first;
na scores left out.(scores: Readonly<Record<string, number>>, options?: { quantile?: number; sides?: 'both' | 'long' | 'short'; gross?: number; by?: Readonly<Record<string, number>> }): Readonly<Record<string, number>>
Long the top
quantile (default 0.2) of the markets scored and short the bottom one, or one
side only (sides), each side’s weights summing to its share of gross (default 1), equal or
in proportion to by (such as 1 / vol).(weights: Readonly<Record<string, number>>, vols: Readonly<Record<string, number>>): Readonly<Record<string, number>>
Each weight over its market’s volatility, rescaled to the same gross.
depth()
Depth
Resting size in the book near the price, as of the current update.(bandPct: number): number
Total resting bid and ask size within
bandPct percent of the mid. bandPct must be one of the declared bands.(bandPct: number): number
number
number
number
number
Time
When the sample read was taken;
na when there is none.boolean
Book views have no history until the terminal serves one; before that only live bars have them.
book()
The live order book of a market, level by level: the nearestlevels a side (100 by default),
ungrouped, from 0xArchive’s live book. Live only; history level by level is not served.
BookLevel
One price level of the live book.number
number
Resting size, in the market’s base unit.
number
price × size, in USD.
BookChange
A level an update changed.'bid' | 'ask'
number
number
The size after the update: 0 where the level went.
number
The size before it: 0 where the level is new.
LiveBook
The live order book, level by level and ungrouped, as of the current moment: built from every update before it, as trades are delivered before it. Live only: before the page’s book arrived (every bar older than the page) it readsavailable false and empty lists.
(handler: (book: LiveBook) => void): void
Runs once per update of the book, in time order with trades and other events and before the
onBar of the bar it falls in. An update is one book the page received: about one per block
of the venue’s, coalesced to at most one per frame.readonly BookLevel[]
Bids, best (highest) first; at most
levels of them.readonly BookLevel[]
Asks, best (lowest) first; at most
levels of them.number
number
number
number
(side: 'bid' | 'ask', price: number): number
The size resting at
price on a side: 0 where no level rests there, na past the deepest
level held on that side, where the book is not known.readonly BookChange[]
The levels the last update changed; in
onUpdate, the update running. A level that only came
into the levels held, or left them, as the book moved is not a change: the book holds only its
nearest levels a side.boolean
The last update replaced the book whole: its first, or the first after the feed dropped.
Time
When the book read was taken (its last update);
na before the first.boolean
The book is known: it has arrived, and has not been lost since.
orderBook()
BookBand
A band around the mid, in basis points: 10 is 0.1%, 1000 is 10%.BookStat
avg, the default: the time-weighted mean over the bar. close: the book at the bar’s end.
OrderBook
The full-depth order book over each of the chart’s bars (Hyperliquid and HIP-3, from 2026-03-10): from 0xArchive’s book archive, and for the newest hour from the page’s live book. A bar the book was not known for readsna, never 0. Live, the page holds up to 400 levels a side, so a band
that reaches past them reads na until the archive has the hour.
(options?: { stat?: BookStat }): number
Mid price.
(options?: { stat?: BookStat }): number
Best ask less best bid over the mid, in basis points.
(options?: { stat?: BookStat }): number
Size resting at the best bid and the best ask (the best queues), in contracts.
(options?: { stat?: BookStat }): number
(band: BookBand, options?: { usd?: boolean; stat?: BookStat }): number
Resting size within
band of the mid on one side: in contracts, or in USD with usd: true.(band: BookBand, options?: { usd?: boolean; stat?: BookStat }): number
(band: BookBand, options?: { stat?: BookStat }): number
Bids less asks over their sum, in USD within
band: -1 (all asks) to 1 (all bids).(usd: 10000 | 100000 | 1000000): number
What a market order of
usd pays against the mid at the bar’s end, in basis points; na when the book cannot fill it.(usd: 10000 | 100000 | 1000000): number
number
Price levels on each side at the bar’s end;
na live.number
number
The share of the bar the book was known, 0 to 1.
boolean
True when any of the bar came from the live book rather than the archive.
Time
The bar’s open time;
na when there is no reading.boolean
openInterest()
OpenInterest
Open interest over each of the chart’s bars, from 0xArchive’s one-minute open interest (Hyperliquid from 2025-03-01, HIP-3 and Lighter from their own starts). A bar opens at the close of the minute before it, soclose - open is its whole change; its high and low are over its
minutes. In the market’s base unit, or USD with { usd: true } (each minute’s open interest times
its mark).
The newest bars are built from the trades instead: each trade’s change in open interest
(Trade.oiDelta), summed and anchored to the one-minute open interest, so the forming bar moves
with every trade and each bar closes where its last trade left it. On time bars of a minute or
more that is every bar since the hour before the chart opened; on seconds bars and bars that close
on trades (tick, volume, range and the rest) it is every bar, as far back as those bars reach
(today and the two UTC days before). USD there is each level times the price of the
trade that set it.
(options?: { usd?: boolean }): number
(options?: { usd?: boolean }): number
(options?: { usd?: boolean }): number
(options?: { usd?: boolean }): number
(options?: { usd?: boolean }): number
The bar’s change, close less open. In USD it is the change in coins at the bar’s closing mark,
so it counts positions opened and closed, not the price moving the ones already open.
Time
The bar’s open time;
na when there is no reading.boolean
funding()
Funding
The funding rate over each of the chart’s bars, from 0xArchive’s one-minute funding readings (Hyperliquid from 2025-03-01, HIP-3 and Lighter from their own starts). A bar’s rate is the venue’s rate at its last minute: on Hyperliquid the predicted rate for the hour then running, which is what settles at the hour’s end, so a 1h bar holds the rate its hour paid. Positive: longs pay shorts. The forming bar moves as each minute closes, about 1 to 4 minutes behind. Only time charts of whole minutes, 1m or longer, have it: on seconds, tick, volume and range bars every value isna.
(options?: { hours?: number }): number
The rate as a fraction per hour, as the venues pay it, or per
hours hours (8 for an eight-hour rate, 8760 for a year’s).The premium at the bar’s last minute, the mark’s distance from the oracle the rate is built from;
na on Lighter.Time
The bar’s open time;
na when there is no reading.boolean
liquidationLevels()
Where open positions would be liquidated, from 0xArchive’s liquidation levels.Level
A price level with resting size on each side, such as a liquidation or stop cluster.number
number
USD notional that would trade if price reached the level: long and short positions, or buy and sell orders.
number
Levels
(): readonly Level[]
The levels as of the current bar, sorted by price. Empty when unknown.
Time
When the snapshot read was taken;
na when there is none.boolean
triggers()
Resting stop and trigger orders by price, where the data exists.dealerExposure()
BTC option dealers, every 5 minutes, whatever the chart’s market: their gamma, charm and vanna at BTC’s price, the gamma flip, and each strike’s net position. The last 7 days.StrikeExposure
One strike’s dealers at adealerExposure() snapshot.
number
number
Dealers’ net position in BTC of options at this strike, calls and puts together: + long, − short.
number
What this strike adds to the totals at the snapshot’s price, in the same units.
number
number
DealerExposure
Time
The snapshot as of the current bar: when it was taken, and the BTC index then (the options’ underlying).
number
number
Where dealers’ total gamma changes sign nearest spot, within 6%;
na when it keeps one sign.number
Dealers’ totals at spot. Gamma: BTC of delta per $1,000 of price; + dealers lean against moves
(sell rises, buy dips), − they chase them. Charm: BTC of delta per hour as time passes; + dealers
sell, − they buy. Vanna: BTC of delta per vol point of implied volatility; + dealers sell as IV
rises, − they buy.
number
number
(): readonly StrikeExposure[]
Every strike with a dealer position, sorted by strike.
boolean
DealerExposureOptions
'block' | 'all'
How dealer positions are inferred from the options’ trades. ‘block’ (the default): dealers hold the
other side of block trades, where the taker asked for the quote. ‘all’: every trade, which counts
a dealer who lays a block off on screen twice.
'next' | 'all'
Which options count. ‘next’ (the default): the nearest expiry still to come at each snapshot,
as the Dealer exposure panel opens; it dominates gamma near spot. ‘all’: every expiry.
optionTrades()
Every BTC option print, whatever the chart’s market: history back to the chart’s first bar, at most 7 days, then live.OptionTrade
One BTC option print, with every field the exchange sends.Time
number
The option’s price in BTC, and the size in BTC of options.
number
number
The premium in USD: price × size × the index.
'buy' | 'sell'
The taker’s side. On a block the taker is the one who asked for the quote.
number
Time
When it expires: 08:00 UTC on its date.
'call' | 'put'
number
Implied volatility of the print, in percent.
number
number
number
number
number
boolean
boolean
True for a leg of a block trade.
number
string | null
string | null
The instrument’s name, such as
BTC-6NOV26-82000-C.string | null
The order it belongs to: a block’s id,
COMBO-… for a screen combo, or TAKER-{time}-{side}.string | null
string | null
string | null
string | null
string | null
Which side was liquidated, as the exchange writes it (‘M’, ‘T’ or ‘MT’), or null.
string | null
string | null
string | null
Any field the exchange added that has no name here yet, as JSON text, or null.
OptionTradesOptions
number
Skip prints smaller than this, in BTC of options.
number
Skip prints whose premium is under this, in USD.
OptionTrades
(handler: (trade: OptionTrade) => void): void
Runs once per print, in time order with other events and before the
onBar of the bar it falls in.boolean
Whether the prints cover the current bar completely.
optionOrders()
BTC option orders joined from their prints: the same history and live feed asoptionTrades().
OptionOrder
One option order, joined from its prints: a block, a screen combo, or one taker order that took several prices or strikes in the same millisecond (a sweep).Time
'block' | 'combo' | 'taker'
'buy' | 'sell' | 'mixed'
The taker’s side, or ‘mixed’ when the legs went both ways (a spread).
number
The legs’ sizes summed, in BTC of options, and split by side and by type.
number
number
number
number
The premium in USD, and in BTC.
notional is the premium in USD too.number
number
How many prints, strikes and expiries it took, its first print’s strike, and its lowest and highest.
number
number
number
number
number
boolean
string | null
OptionOrders
(handler: (order: OptionOrder) => void): void
Runs once per order, once all its prints are in.
boolean
volumeProfile()
ProfileRow
One row of a volume profile: what takers bought and sold betweenlow and high, in the
market’s base unit.
number
Where the row starts: a whole multiple of the row size, or the traded price itself without one.
number
Where the next row starts; equal to
low for a row that is one traded price.number
The middle of the row, where a line through it is drawn.
number
Taker buying.
number
Taker selling.
number
buy + sell.
number
buy − sell.
ValueArea
The rows around the point of control holding a share of a profile’s volume.number
The value area’s low (VAL): the bottom of its lowest row.
number
The value area’s high (VAH): the top of its highest row.
number
The middle of the point of control’s row.
number
The volume inside the area.
ProfileOptions
number
The height of each row in price, such as 10 for $10 rows on BTC. Rows sit on whole multiples
of it, so a row is the same row on every bar and in every profile. Defaults to the stream’s
rowSize; without either, each traded price is its own row.Profile
Volume by price over a span of trades, as of the moment the handler runs. Read it in the run that asked for it: asking the stream again for the same span gives the newer profile.boolean
Whether the trades cover the whole span. A span older than the trade history is missing its start.
number
Taker buying, taker selling, both, and buying less selling, over the span.
number
number
number
number
The highest and lowest traded price in the span;
na with no trades.number
(options?: ProfileOptions): readonly ProfileRow[] | null
The rows, lowest price first. With a row size, every row from the lowest to the highest
traded one, empty rows included; without, each traded price.
null past 4,096 rows: use a
larger row size.(options?: ProfileOptions): ProfileRow | null
The point of control: the row with the most volume (the higher one on a tie);
null with no trades.(percent?: number, options?: ProfileOptions): ValueArea | null
The value area holding
percent (default 70) of the volume, by TradingView’s rule, the one the
footprint chart uses: from the point of control, add whichever neighbouring row holds more,
while the area stays at or under the share. null with no trades.VolumeProfile
Volume by price from the market’s trades (trades()): what takers bought and sold at each
price, over the current chart bar, the last few bars, or since a time such as the session’s
start. Trades reach back to the chart’s first bar, at most 7 UTC days, so older spans read
available: false and hold only the trades there are.
boolean
Whether trades cover the current chart bar completely, as
trades().available.(): Profile
The current chart bar’s trades so far: a footprint’s rows.
(bars: number): Profile
The current chart bar and the
bars - 1 before it, 1 to 5,000.(time: Time): Profile
Every trade from
time to now, such as the session so far: since(clock.startOf(chart.time, 'day')).sessions
Exchange session calendars for HIP-3 stock and commodity perps (src/browser/market-calendars.mjs).(market: string): string | null
The calendar id for a market, such as
nyse, or null for markets that trade around the clock.(calendar: string, time: Time): { readonly open: boolean; readonly regular: boolean; readonly start: Time; readonly end: Time }
Whether
calendar is in session at time (regular or extended hours), with that session’s
bounds; when closed, start is the last close and end the next open. regular says whether
the session is the regular one. Holidays and early closes included.