Exchange Wire Formats

Lighter (Perpetuals & Spot) wire format

How Lighter messages become rows in our Parquet files. Each data type below shows a real message next to the rows we publish for it, with the source and the rule for every column. Hover a line or a column to see how they connect.

Checked against our pipeline

These messages were captured from Lighter on 2026-10-05. Our test suite replays each one through the production collector parser and postprocessor, and fails if the published rows differ from the rows on this page. Files written before a change to the pipeline can differ; see Known Gaps & Corrections.

Lighter identifies markets by a market index (1 is BTC, 2048 is ETH/USDC). The collector loads the market list from GET /api/v1/orderBooks when it starts and when it checks for new markets. It subscribes to order_book/<index> and trade/<index> for every active market, and once to market_stats/all (perpetuals) and spot_market_stats/all (spot). Those two channels carry every market; rows are published only for the active markets. Perpetual symbols are the base asset (BTC); spot symbols are BASE/QUOTE on Lighter and BASE_QUOTE in our files (ETH_USDC).

  • Public WebSocket (order book, trades, market stats): wss://mainnet.zklighter.elliot.ai/stream
  • REST (market list): https://mainnet.zklighter.elliot.ai/api/v1/orderBooks

Exchange API reference: apidocs.lighter.xyz. Conventions shared by every exchange are on the wire formats overview.

Trades

One row per trade from the trade/<index> channel, from both the trades and liquidation_trades arrays.

  • WebSocket trade/<index>

Trade update

One frame can carry several trades. Each trade becomes its own row; rows are ordered by trade_time, then trade_id.

WebSocket message · trade/<index>received 2026-10-05 19:15:04.723749 UTC
{
"channel": "trade:1",
"liquidation_trades": [],
"nonce": 23863348794,
"trades": [
{
"trade_id": 33380750090,
"trade_id_str": "33380750090",
"tx_hash": "0000001ea5bde783000001a10d7db4e4000000000000000000000000000000000000000000000000",
"type": "trade",
"market_id": 1,
"market_kind": "perps",
"size": "0.00010",
"price": "85636.3",
"usd_amount": "8.563630",
"ask_id": 562953487717055,
"ask_id_str": "562953487717055",
"bid_id": 844421361202466,
"bid_id_str": "844421361202466",
"ask_client_id": 31938461114236,
"ask_client_id_str": "31938461114236",
"bid_client_id": 5434,
"bid_client_id_str": "5434",
"ask_account_id": 702384,
"bid_account_id": 750305,
"is_maker_ask": true,
"block_height": 349153116,
"timestamp": 1791227704548,
"taker_position_size_before": "-0.00001",
"taker_entry_quote_before": "0.856509",
"taker_initial_margin_fraction_before": 500,
"taker_position_sign_changed": true,
"maker_fee": 28,
"maker_position_size_before": "39.75775",
"maker_entry_quote_before": "3398551.295093",
"maker_initial_margin_fraction_before": 3333,
"transaction_time": 1791227704597066,
"ask_order_version": 0,
"bid_order_version": 0
},
{
"trade_id": 33380750089,
"trade_id_str": "33380750089",
"tx_hash": "b5313d3bcb15bfa14b7c18ea21330d3e0efdf5ba80874c3e478f9fcfd641d10e248218a5ffabf4ce",
"type": "trade",
"market_id": 1,
"market_kind": "perps",
"size": "0.00031",
"price": "85635.5",
"usd_amount": "26.547005",
"ask_id": 562953487717054,
"ask_id_str": "562953487717054",
"bid_id": 844421361202466,
"bid_id_str": "844421361202466",
"ask_client_id": 34120,
"ask_client_id_str": "34120",
"bid_client_id": 5434,
"bid_client_id_str": "5434",
"ask_account_id": 281474976623775,
"bid_account_id": 750305,
"is_maker_ask": true,
"block_height": 349153116,
"timestamp": 1791227704548,
"taker_position_size_before": "-0.00032",
"taker_entry_quote_before": "27.408314",
"taker_initial_margin_fraction_before": 500,
"maker_fee": 36,
"maker_position_size_before": "1.36744",
"maker_entry_quote_before": "117314.743225",
"maker_initial_margin_fraction_before": 2000,
"transaction_time": 1791227704596967,
"ask_order_version": 0,
"bid_order_version": 0
}
],
"type": "update/trade"
}

Published rows · 2

received_time1791227704723749000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227704548trades[].timestampCopied from the trade's timestamp. Milliseconds. The same value as trade_time: the frame has no separate event time.
symbolBTCchannelThe symbol of the market index in channel (1 is BTC), looked up in the market list the collector loads from GET /api/v1/orderBooks.
trade_id33380750089trades[].trade_idCopied. One counter shared by all Lighter markets, so a market's IDs increase but are not contiguous.
price85635.5trades[].priceCopied as the exact decimal string.
quantity0.00031trades[].sizeCopied from size as the exact decimal string. Base asset units.
trade_time1791227704548trades[].timestampCopied from the trade's timestamp. Milliseconds.
is_buyer_makerfalsetrades[].is_maker_askThe negation of is_maker_ask. is_maker_ask: true means the seller was the maker, so the buyer was the aggressor and is_buyer_maker is false. true if Lighter omits is_maker_ask.
order_typetradetrades[].typeCopied from type: trade for ordinary trades, liquidation for liquidations.

Subscription replay with an old liquidation

When the collector subscribes (also after every reconnect), Lighter first sends subscribed/trade with the most recent trades and, separately, the most recent liquidations, which can be hours old. Trades from this frame are published only if their timestamp is no earlier than 5 seconds before the start of the arrival hour, and only if their trade_id was not already published. Here both trades are published and the liquidation from 16:23 UTC, received at 19:15 UTC, is not.

Abridged: Lighter sent 50 trades and 50 liquidations in this frame; two trades and the most recent liquidation are shown.

WebSocket message · trade/<index>received 2026-10-05 19:15:04.145348 UTC
{
"channel": "trade:1",
"liquidation_trades": [
{
"trade_id": 33365034814,
"trade_id_str": "33365034814",
"tx_hash": "0000001ea368fe94000001a10ce03f1f000000000000000000000000000000000000000000000000",
"type": "liquidation",
"market_id": 1,
"market_kind": "perps",
"size": "0.00873",
"price": "84943.1",
"usd_amount": "741.553263",
"ask_id": 562953486967141,
"ask_id_str": "562953486967141",
"bid_id": 844421361906196,
"bid_id_str": "844421361906196",
"ask_client_id": 0,
"ask_client_id_str": "0",
"bid_client_id": 152055869430945,
"bid_client_id_str": "152055869430945",
"ask_account_id": 281474976502928,
"bid_account_id": 726722,
"is_maker_ask": false,
"block_height": 349069394,
"timestamp": 1791217385247,
"taker_fee": 10000,
"taker_position_size_before": "0.00873",
"taker_entry_quote_before": "747.818784",
"taker_initial_margin_fraction_before": 200,
"taker_position_sign_changed": true,
"maker_fee": 28,
"maker_position_size_before": "2.22729",
"maker_entry_quote_before": "189612.331672",
"maker_initial_margin_fraction_before": 500,
"transaction_time": 1791217385309461,
"taker_allocated_margin_usdc_before": 15057329,
"ask_order_version": 0,
"bid_order_version": 0
}
],
"nonce": 23863347871,
"trades": [
{
"trade_id": 33380746827,
"trade_id_str": "33380746827",
"tx_hash": "0000001ea5bdc7d8000001a10d7dadd0000000000000000000000000000000000000000000000000",
"type": "trade",
"market_id": 1,
"market_kind": "perps",
"size": "0.00012",
"price": "85636.0",
"usd_amount": "10.276320",
"ask_id": 562953487717006,
"ask_id_str": "562953487717006",
"bid_id": 844421361202510,
"bid_id_str": "844421361202510",
"ask_client_id": 1000700396,
"ask_client_id_str": "1000700396",
"bid_client_id": 57912887826612,
"bid_client_id_str": "57912887826612",
"ask_account_id": 711373,
"bid_account_id": 27927,
"is_maker_ask": false,
"block_height": 349153099,
"timestamp": 1791227702736,
"taker_position_size_before": "-0.00020",
"taker_entry_quote_before": "17.127220",
"taker_initial_margin_fraction_before": 1000,
"maker_fee": 38,
"maker_position_size_before": "-8.04322",
"maker_entry_quote_before": "687471.664393",
"maker_initial_margin_fraction_before": 500,
"transaction_time": 1791227702773021,
"ask_order_version": 0,
"bid_order_version": 0
},
{
"trade_id": 33380746738,
"trade_id_str": "33380746738",
"tx_hash": "0000001ea5bdc718000001a10d7dadd0000000000000000000000000000000000000000000000000",
"type": "trade",
"market_id": 1,
"market_kind": "perps",
"size": "0.00003",
"price": "85636.4",
"usd_amount": "2.569092",
"ask_id": 562953487717000,
"ask_id_str": "562953487717000",
"bid_id": 844421361202507,
"bid_id_str": "844421361202507",
"ask_client_id": 34116,
"ask_client_id_str": "34116",
"bid_client_id": 0,
"bid_client_id_str": "0",
"ask_account_id": 281474976623775,
"bid_account_id": 723636,
"is_maker_ask": true,
"block_height": 349153099,
"timestamp": 1791227702736,
"taker_fee": 100,
"taker_position_size_before": "0.01240",
"taker_entry_quote_before": "1061.781826",
"taker_initial_margin_fraction_before": 200,
"maker_fee": 36,
"maker_position_size_before": "1.36759",
"maker_entry_quote_before": "117327.611953",
"maker_initial_margin_fraction_before": 2000,
"transaction_time": 1791227702737142,
"ask_order_version": 0,
"bid_order_version": 0
}
],
"type": "subscribed/trade"
}

Published rows · 2

received_time1791227704145348000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227702736trades[].timestampliquidation_trades[].timestampCopied from the trade's timestamp. Milliseconds. The same value as trade_time: the frame has no separate event time.
symbolBTCchannelThe symbol of the market index in channel (1 is BTC), looked up in the market list the collector loads from GET /api/v1/orderBooks.
trade_id33380746738trades[].trade_idliquidation_trades[].trade_idCopied. One counter shared by all Lighter markets, so a market's IDs increase but are not contiguous.
price85636.4trades[].priceliquidation_trades[].priceCopied as the exact decimal string.
quantity0.00003trades[].sizeliquidation_trades[].sizeCopied from size as the exact decimal string. Base asset units.
trade_time1791227702736trades[].timestampliquidation_trades[].timestampCopied from the trade's timestamp. Milliseconds.
is_buyer_makerfalsetrades[].is_maker_askliquidation_trades[].is_maker_askThe negation of is_maker_ask. is_maker_ask: true means the seller was the maker, so the buyer was the aggressor and is_buyer_maker is false. true if Lighter omits is_maker_ask.
order_typetradetrades[].typeliquidation_trades[].typeCopied from type: trade for ordinary trades, liquidation for liquidations.

Spot trade (ETH/USDC)

Spot markets use the same channel and mapping. Only the symbol differs: Lighter names spot markets BASE/QUOTE, published as BASE_QUOTE.

WebSocket message · trade/<index>received 2026-10-05 19:18:38.989871 UTC
{
"channel": "trade:2048",
"liquidation_trades": [],
"nonce": 23863586690,
"trades": [
{
"trade_id": 33381085033,
"trade_id_str": "33381085033",
"tx_hash": "0000001ea5caa221000001a10d80fa0e000000000000000000000000000000000000000000000000",
"type": "trade",
"market_id": 2048,
"market_kind": "spot",
"size": "0.0001",
"price": "2713.60",
"usd_amount": "0.000000",
"ask_id": 576742227473933817,
"ask_id_str": "576742227473933817",
"bid_id": 577023702063775400,
"bid_id_str": "577023702063775400",
"ask_client_id": 51016536833,
"ask_client_id_str": "51016536833",
"bid_client_id": 0,
"bid_client_id_str": "0",
"ask_account_id": 314233,
"bid_account_id": 255124,
"is_maker_ask": true,
"block_height": 349154892,
"timestamp": 1791227918862,
"taker_fee": 280,
"taker_position_size_before": "0.0000",
"taker_entry_quote_before": "0.000000",
"taker_position_sign_changed": true,
"maker_fee": 28,
"maker_position_size_before": "0.0000",
"maker_entry_quote_before": "0.000000",
"maker_position_sign_changed": true,
"transaction_time": 1791227918862785,
"ask_order_version": 0,
"bid_order_version": 0
}
],
"type": "update/trade"
}

Published row

received_time1791227918989871000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227918862trades[].timestampCopied from the trade's timestamp. Milliseconds. The same value as trade_time: the frame has no separate event time.
symbolETH_USDCchannelThe symbol of the market index in channel (2048 is ETH/USDC), looked up in the market list the collector loads from GET /api/v1/orderBooks, with / replaced by _.
trade_id33381085033trades[].trade_idCopied. One counter shared by all Lighter markets, so a market's IDs increase but are not contiguous.
price2713.60trades[].priceCopied as the exact decimal string.
quantity0.0001trades[].sizeCopied from size as the exact decimal string. Base asset units (ETH).
trade_time1791227918862trades[].timestampCopied from the trade's timestamp. Milliseconds.
is_buyer_makerfalsetrades[].is_maker_askThe negation of is_maker_ask. is_maker_ask: true means the seller was the maker, so the buyer was the aggressor and is_buyer_maker is false. true if Lighter omits is_maker_ask.
order_typetradetrades[].typeCopied from type: trade for ordinary trades, liquidation for liquidations.

Notes

  • Lighter occasionally sends a trade a second time, seconds later, in an ordinary update/trade frame. A repeated trade_id is always a re-delivery, because trade_id is one counter across all markets. Only the first delivery is published, also when the repeat arrives in the next hour.
  • Files are keyed by arrival hour (received_time). Lighter's trade feed can fall behind by seconds, occasionally minutes, so a late trade can appear in the next hour's file. Filter on trade_time and load the following hour when you need a complete window.
  • order_type is copied as sent, so other trade types Lighter documents (deleverage, market-settlement) appear under their own name.
  • Files written before the October 2026 pipeline update contain no rows from liquidation_trades and no trades from subscribed/trade replays. Liquidation fills sent only in liquidation_trades, and trades missed across reconnects, are absent there.

Column types and descriptions: Trades schema.

Order Book

One row per price level from the order_book/<index> channel: the subscribed/order_book snapshot, then update/order_book updates.

  • WebSocket order_book/<index>

Subscription snapshot

Lighter sends the book as subscribed/order_book when the collector subscribes, including after every reconnect. Each snapshot becomes one snapshot row per level and starts a new nonce chain.

Abridged: Lighter sent 1821 bid and 1271 ask levels in this snapshot; the best two of each are shown.

WebSocket message · order_book/<index>received 2026-10-05 19:15:04.141358 UTC
{
"channel": "order_book:1",
"last_updated_at": 1791227703748044,
"offset": 4577935,
"order_book": {
"code": 0,
"asks": [
{
"price": "85635.5",
"size": "0.03539"
},
{
"price": "85635.7",
"size": "0.01700"
}
],
"bids": [
{
"price": "85635.3",
"size": "0.00020"
},
{
"price": "85635.2",
"size": "0.00020"
}
],
"offset": 4577935,
"nonce": 23863347847,
"last_updated_at": 1791227703748044,
"begin_nonce": 0
},
"timestamp": 1791227703769,
"type": "subscribed/order_book"
}

Published rows · 4

received_time1791227704141358000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227703769timestampCopied from the top-level timestamp, when Lighter's API server published the frame. Milliseconds.
transaction_time1791227703748last_updated_atThe top-level last_updated_at, Lighter's time of the last book update in microseconds, divided by 1,000 and truncated to milliseconds.
symbolBTCchannelThe symbol of the market index in channel (1 is BTC), looked up in the market list the collector loads from GET /api/v1/orderBooks.
event_typesnapshottypesnapshot for subscribed/order_book.
first_update_idnull—Null. Lighter sends no first update ID.
final_update_id23863347847order_book.nonceCopied. The matching engine's sequence number; the update chain starts here.
prev_final_update_idnull—Null for snapshots. Lighter sends begin_nonce 0 in snapshots; it is not a link to an earlier message.
last_update_id4577935offsetCopied. The API server's message offset, also sent as order_book.offset. It orders messages but is not contiguous, and it restarts when a reconnect lands on another server.
sidebidorder_book.bidsorder_book.asksbid for levels in bids, ask for levels in asks. One row per level.
price85635.3order_book.bids[].priceorder_book.asks[].priceCopied as the exact decimal string.
quantity0.00020order_book.bids[].sizeorder_book.asks[].sizeCopied from size as the exact decimal string. Base asset units.
order_countnull—Null. Lighter does not report order counts.

Book update

The first update after the snapshot above: its begin_nonce equals the snapshot's nonce. This one changes only asks; bids is empty.

WebSocket message · order_book/<index>received 2026-10-05 19:15:04.141780 UTC
{
"channel": "order_book:1",
"last_updated_at": 1791227703793710,
"offset": 4577939,
"order_book": {
"code": 0,
"asks": [
{
"price": "85635.5",
"size": "0.00043"
},
{
"price": "85635.7",
"size": "0.00000"
},
{
"price": "85636.0",
"size": "0.00000"
},
{
"price": "85640.9",
"size": "0.29572"
}
],
"bids": [],
"offset": 4577939,
"nonce": 23863347898,
"last_updated_at": 1791227703793710,
"begin_nonce": 23863347847
},
"timestamp": 1791227703809,
"type": "update/order_book"
}

Published rows · 4

received_time1791227704141780000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227703809timestampCopied from the top-level timestamp, when Lighter's API server published the frame. Milliseconds.
transaction_time1791227703793last_updated_atThe top-level last_updated_at, Lighter's time of the last book update in microseconds, divided by 1,000 and truncated to milliseconds.
symbolBTCchannelThe symbol of the market index in channel (1 is BTC), looked up in the market list the collector loads from GET /api/v1/orderBooks.
event_typeupdatetypeupdate for update/order_book.
first_update_idnull—Null. Lighter sends no first update ID.
final_update_id23863347898order_book.nonceCopied. The matching engine's sequence number after this update.
prev_final_update_id23863347847order_book.begin_nonceCopied. Equals the nonce of the previous message (snapshot or update); a mismatch is a gap.
last_update_id4577939offsetCopied. The API server's message offset, also sent as order_book.offset. It orders messages but is not contiguous, and it restarts when a reconnect lands on another server.
sideaskorder_book.bidsorder_book.asksbid for levels in bids, ask for levels in asks. One row per level.
price85635.5order_book.asks[].priceCopied as the exact decimal string.
quantity0.00043order_book.asks[].sizeCopied from size as the exact decimal string: the new total at that price, base asset units. 0.00000 removes the level.
order_countnull—Null. Lighter does not report order counts.

Notes

  • Each update's prev_final_update_id (begin_nonce) equals the previous message's final_update_id (nonce). A snapshot starts a new chain. A mismatch is a gap: resume from the next snapshot.
  • A message with no levels at all is published as one row with side noop, price 0 and quantity 0, so the nonce chain stays complete. A noop update changes no level. A noop snapshot means the book is empty: clear your book.
  • last_update_id (offset) restarts when a reconnect lands on another Lighter server, so a lower value after a reconnect is expected. Use the nonce chain to detect gaps.
  • Files written before the 2026-09 data-integrity release hold the offset in both final_update_id and last_update_id, and prev_final_update_id is empty.
  • Lighter's REST order list (GET /api/v1/orderBookOrders) carries no nonce, so it cannot anchor the update stream and is not published. Files written before the October 2026 pipeline update can contain snapshot rows built from it when the collector had REST snapshots enabled; do not use those rows to anchor the book.
  • Files written before the October 2026 pipeline update have our receive time in milliseconds as event_time and an empty transaction_time.
  • Files can start with a checkpoint snapshot of the book carried over from the previous hour: its received_time is the hour start, transaction_time is null, and final_update_id is the nonce of the last message applied. In these rows last_update_id also holds that nonce, not an offset.

Column types and descriptions: Order Book schema.

Ticker

One row per market per market_stats/all or spot_market_stats/all frame that includes the market.

  • WebSocket market_stats/all
  • WebSocket spot_market_stats/all

Perpetual market stats

Abridged: This update/market_stats frame carried 99 of the 235 markets in the subscription snapshot; only BTC (market index 1) is shown. Each market becomes its own row.

WebSocket messagereceived 2026-10-05 19:15:04.354191 UTC
{
"channel": "market_stats:all",
"market_stats": {
"1": {
"symbol": "BTC",
"market_id": 1,
"index_price": "85667.7",
"mark_price": "85635.1",
"mid_price": "85635.4",
"best_ask_price": "85635.5",
"best_bid_price": "85635.3",
"open_interest": "163238852.201930",
"open_interest_limit": "72057594037927936.000000",
"funding_clamp_small": "0.0500",
"funding_clamp_big": "4.0000",
"last_trade_price": "85631.6",
"current_funding_rate": "0.0012",
"funding_rate": "0.0012",
"funding_timestamp": 1791226800002,
"daily_base_token_volume": 9275.68025,
"daily_quote_token_volume": 797148325.667363,
"daily_price_low": 84940.2,
"daily_price_high": 86955.4,
"daily_price_change": -0.20010862040431965,
"base_interest_rate": "0.0100",
"premium": "-0.0277"
}
},
"timestamp": 1791227704229,
"type": "update/market_stats"
}

Published row

received_time1791227704354191000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227704229timestampCopied from the frame's top-level timestamp. Milliseconds.
symbolBTCmarket_stats.1.market_idThe symbol of market_id in the market list the collector loads from GET /api/v1/orderBooks.
price_changenull—Null. Lighter sends only the percentage change.
price_change_percent-0.20010862040431965market_stats.1.daily_price_changeCopied. Percent: -0.2 means −0.2 %.
weighted_average_pricenull—Null. Not sent by Lighter.
last_price85631.6market_stats.1.last_trade_priceCopied.
last_quantitynull—Null. Not sent by Lighter.
open_pricenull—Null. Not sent by Lighter.
high_price86955.4market_stats.1.daily_price_highCopied.
low_price84940.2market_stats.1.daily_price_lowCopied.
base_asset_volume9275.68025market_stats.1.daily_base_token_volumeCopied. Base asset units.
quote_asset_volume797148325.667363market_stats.1.daily_quote_token_volumeCopied. Quote currency units.
statistics_open_timenull—Null. Not sent by Lighter.
statistics_close_timenull—Null. Not sent by Lighter.
first_trade_idnull—Null. Not sent by Lighter.
last_trade_idnull—Null. Not sent by Lighter.
total_tradesnull—Null. Not sent by Lighter.

Spot market stats (ETH/USDC)

Spot markets stream on spot_market_stats/all, which has no mark price, funding or open interest. They publish ticker rows only.

Abridged: This subscribed/spot_market_stats frame carried 11 spot markets; only ETH/USDC (market index 2048) is shown.

WebSocket messagereceived 2026-10-05 19:15:03.894461 UTC
{
"channel": "spot_market_stats:all",
"spot_market_stats": {
"2048": {
"symbol": "ETH/USDC",
"market_id": 2048,
"index_price": "2709.710000",
"mid_price": "2709.70",
"best_ask_price": "2709.70",
"best_bid_price": "2709.69",
"last_trade_price": "2709.69",
"daily_base_token_volume": 80.6425,
"daily_quote_token_volume": 218436.236399,
"daily_price_low": 2681.47,
"daily_price_high": 2751.24,
"daily_price_change": 0.08791013958504937
}
},
"timestamp": 1791227703768,
"type": "subscribed/spot_market_stats"
}

Published row

received_time1791227703894461000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227703768timestampCopied from the frame's top-level timestamp. Milliseconds.
symbolETH_USDCspot_market_stats.2048.market_idThe symbol of market_id (2048 is ETH/USDC) in the market list the collector loads from GET /api/v1/orderBooks, with / replaced by _.
price_changenull—Null. Lighter sends only the percentage change.
price_change_percent0.08791013958504937spot_market_stats.2048.daily_price_changeCopied. Percent: -0.2 means −0.2 %.
weighted_average_pricenull—Null. Not sent by Lighter.
last_price2709.69spot_market_stats.2048.last_trade_priceCopied.
last_quantitynull—Null. Not sent by Lighter.
open_pricenull—Null. Not sent by Lighter.
high_price2751.24spot_market_stats.2048.daily_price_highCopied.
low_price2681.47spot_market_stats.2048.daily_price_lowCopied.
base_asset_volume80.6425spot_market_stats.2048.daily_base_token_volumeCopied. Base asset units.
quote_asset_volume218436.236399spot_market_stats.2048.daily_quote_token_volumeCopied. Quote asset units (USDC).
statistics_open_timenull—Null. Not sent by Lighter.
statistics_close_timenull—Null. Not sent by Lighter.
first_trade_idnull—Null. Not sent by Lighter.
last_trade_idnull—Null. Not sent by Lighter.
total_tradesnull—Null. Not sent by Lighter.

Notes

  • The market stats channels have no 24-hour window boundaries, open price, trade count or trade IDs; those columns are null.
  • Files written before the October 2026 pipeline update have our receive time in nanoseconds as event_time instead of Lighter's publication time in milliseconds.

Column types and descriptions: Ticker schema.

Mark Price

One row per perpetual market per market_stats/all frame that includes the market.

  • WebSocket market_stats/all

Abridged: This update/market_stats frame carried 99 of the 235 markets in the subscription snapshot; only BTC (market index 1) is shown. Each market becomes its own row.

WebSocket message · market_stats/allreceived 2026-10-05 19:15:04.354191 UTC
{
"channel": "market_stats:all",
"market_stats": {
"1": {
"symbol": "BTC",
"market_id": 1,
"index_price": "85667.7",
"mark_price": "85635.1",
"mid_price": "85635.4",
"best_ask_price": "85635.5",
"best_bid_price": "85635.3",
"open_interest": "163238852.201930",
"open_interest_limit": "72057594037927936.000000",
"funding_clamp_small": "0.0500",
"funding_clamp_big": "4.0000",
"last_trade_price": "85631.6",
"current_funding_rate": "0.0012",
"funding_rate": "0.0012",
"funding_timestamp": 1791226800002,
"daily_base_token_volume": 9275.68025,
"daily_quote_token_volume": 797148325.667363,
"daily_price_low": 84940.2,
"daily_price_high": 86955.4,
"daily_price_change": -0.20010862040431965,
"base_interest_rate": "0.0100",
"premium": "-0.0277"
}
},
"timestamp": 1791227704229,
"type": "update/market_stats"
}

Published row

received_time1791227704354191000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
event_time1791227704229timestampCopied from the frame's top-level timestamp. Milliseconds.
symbolBTCmarket_stats.1.market_idThe symbol of market_id in the market list the collector loads from GET /api/v1/orderBooks.
mark_price85635.1market_stats.1.mark_priceCopied.
index_price85667.7market_stats.1.index_priceCopied.
estimated_settle_pricenull—Null. Not sent by Lighter.
funding_rate0.000012market_stats.1.current_funding_ratecurrent_funding_rate divided by 100. Lighter sends percent per hour (0.0012 is 0.0012 %); we publish a fraction per hourly funding period (0.000012). current_funding_rate is Lighter's estimate of the upcoming payment; funding_rate, the last payment, is used only when it is missing.
next_funding_time1791230400000market_stats.1.funding_timestampThe next full hour after funding_timestamp. Milliseconds. funding_timestamp is when the last funding was applied, on the hour or a few milliseconds after it; Lighter settles funding every hour.

Notes

  • Spot markets publish no mark price rows.
  • Files written before the 2026-09 data-integrity release had funding_rate in percent and next_funding_time set to the last funding time; they were corrected on 2026-09-30.
  • Files written before the October 2026 pipeline update have our receive time in nanoseconds as event_time instead of Lighter's publication time in milliseconds.

Column types and descriptions: Mark Price schema.

Open Interest

One row per perpetual market per market_stats/all frame that includes the market.

  • WebSocket market_stats/all

Abridged: This update/market_stats frame carried 99 of the 235 markets in the subscription snapshot; only BTC (market index 1) is shown. Each market becomes its own row.

WebSocket message · market_stats/allreceived 2026-10-05 19:15:04.354191 UTC
{
"channel": "market_stats:all",
"market_stats": {
"1": {
"symbol": "BTC",
"market_id": 1,
"index_price": "85667.7",
"mark_price": "85635.1",
"mid_price": "85635.4",
"best_ask_price": "85635.5",
"best_bid_price": "85635.3",
"open_interest": "163238852.201930",
"open_interest_limit": "72057594037927936.000000",
"funding_clamp_small": "0.0500",
"funding_clamp_big": "4.0000",
"last_trade_price": "85631.6",
"current_funding_rate": "0.0012",
"funding_rate": "0.0012",
"funding_timestamp": 1791226800002,
"daily_base_token_volume": 9275.68025,
"daily_quote_token_volume": 797148325.667363,
"daily_price_low": 84940.2,
"daily_price_high": 86955.4,
"daily_price_change": -0.20010862040431965,
"base_interest_rate": "0.0100",
"premium": "-0.0277"
}
},
"timestamp": 1791227704229,
"type": "update/market_stats"
}

Published row

received_time1791227704354191000—Our collector's clock when the message arrived, in nanoseconds since the Unix epoch. Not sent by Lighter.
symbolBTCmarket_stats.1.market_idThe symbol of market_id in the market list the collector loads from GET /api/v1/orderBooks.
sum_open_interest1906.2143market_stats.1.open_interestmarket_stats.1.mark_priceopen_interest divided by mark_price, rounded half-even to the market's size precision (supported_size_decimals from GET /api/v1/orderBooks, 5 for BTC), with trailing zeros removed: 1906.21430 is published as 1906.2143. Base asset units.
sum_open_interest_value163238852.201930market_stats.1.open_interestCopied. USD notional: the stream sends open interest in base units multiplied by the mark price.
timestamp1791227704229timestampCopied from the frame's top-level timestamp. Milliseconds.

Notes

  • Lighter's open_interest is the USD notional, not base units: base open interest from GET /api/v1/orderBookDetails multiplied by the mark price matches it.
  • Spot markets publish no open interest rows.
  • Files written before the 2026-09 data-integrity release had the USD notional in sum_open_interest; they were corrected on 2026-09-30.
  • Files written before the October 2026 pipeline update have our receive time in nanoseconds as timestamp instead of Lighter's publication time in milliseconds.

Column types and descriptions: Open Interest schema.

Not published

  • Liquidations: Lighter has no separate liquidation stream. Liquidation fills arrive on the trade channel and are published as trades with order_type liquidation.