Skip to main content

Tables

Factory_OrderBookCreated_event

Order book creation events from Lighter V2 decentralized exchange factory contract on Optimism. Records new trading pair deployments with token addresses, price/size tick parameters, and minimum order amounts for analyzing market initialization and liquidity structure.
ColumnTypeDescription
block_timestampTIMESTAMPTimestamp when the block was produced. UTC timezone, millisecond precision.
block_numberINT64Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain.
transaction_hashSTRINGUnique identifier for the transaction. 66-character hex string including 0x prefix.
log_indexINT64Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission.
addressSTRINGContract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.
removedBOOLBoolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.
in_orderBookAddressSTRINGContract address of the newly created order book instance on Optimism. Hex-encoded, 0x-prefixed 40-character string representing the deployed order book contract for the specified token pair.
in_orderBookIdINT64Sequential identifier assigned to the newly created order book within the Lighter v2 factory contract. Increments with each new order book deployment, starting from 0.
in_token0STRINGContract address of the first token in the trading pair. Hex-encoded, 0x-prefixed, 42-character string.
in_token1STRINGContract address of the second token in the trading pair. Hex-encoded, 0x-prefixed, 42-character string.
in_logSizeTickINT64Logarithmic tick size parameter that determines order size granularity in the Lighter V2 order book. Typically ranges from 3 to 16, with higher values allowing larger size increments between orders.
in_logPriceTickINT64Logarithmic price tick size parameter that determines the granularity of price levels in the order book. Higher values indicate coarser price increments between tradeable levels.
in_minToken0BaseAmountSTRINGMinimum order size required for token0 (the first token in the trading pair) denominated in the token’s base units. Values are stored as strings to preserve precision for large integers beyond native number types.
in_minToken1BaseAmountSTRINGMinimum order size required for token1 in the trading pair, denominated in token1’s base units. Typically set to prevent dust orders and maintain orderbook efficiency.
addressremovedin_token0in_token1log_indexblock_numberin_logSizeTickin_orderBookIdblock_timestampin_logPriceTicktransaction_hashin_orderBookAddressin_minToken0BaseAmountin_minToken1BaseAmount
0xf3eee5c7d3bed32a9bf70433e9882cef7ecfd5f0false0x42000000000000000000000000000000000000060x68f180fcce6836688e9084f035309e29bf0a2095111125365991212023-11-22T16:52:55.000Z20x72833af16faa6f13c5afd170ab4180de0ecd44ebf917e31bbbbb651fe3c037920xbab4d6a1329e9a465ae65bcec032b13480d1664f5000300000000
0xf3eee5c7d3bed32a9bf70433e9882cef7ecfd5f0false0x42000000000000000000000000000000000000060x7f5c764cbc14f9669b88837ca1490cca17c3160791125365991202023-11-22T16:52:55.000Z40x72833af16faa6f13c5afd170ab4180de0ecd44ebf917e31bbbbb651fe3c037920xb93dff1d20f781690ab1fc79a6e8a5f8583e03fa50001000000000
0xf3eee5c7d3bed32a9bf70433e9882cef7ecfd5f0false0x42000000000000000000000000000000000000060xda10009cbd5d07dd0cecc66161fc93d7c9000da1131125365991222023-11-22T16:52:55.000Z160x72833af16faa6f13c5afd170ab4180de0ecd44ebf917e31bbbbb651fe3c037920x254af883d97f25f1264c67938fcb718a55c6947d50001000000000
Query with partition filter
SELECT *
FROM `tt-contracts.lighter_v2_optimism.Factory_OrderBookCreated_event`
WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
LIMIT 100

OrderBook_Swap_event

Swap execution events from Lighter V2 decentralized exchange (DEX) orderbook on Optimism, matching bid and ask orders with associated token amounts and owner addresses. Useful for analyzing orderbook trading activity, liquidity provision patterns, and price discovery mechanisms.
ColumnTypeDescription
block_timestampTIMESTAMPTimestamp when the block was produced. UTC timezone, millisecond precision.
block_numberINT64Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain.
transaction_hashSTRINGUnique identifier for the transaction. 66-character hex string including 0x prefix.
log_indexINT64Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission.
addressSTRINGContract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.
removedBOOLBoolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.
in_askIdSTRINGOrder identifier for the ask (sell) side of the matched trade in the Lighter V2 order book. Numeric string value that references a specific limit sell order being filled.
in_bidIdSTRINGOrder identifier for the bid side of the matched swap on the Lighter V2 order book. Value of ‘0’ indicates a market order that matched against an existing ask order.
in_askOwnerSTRINGOwner address of the ask order being filled in this Lighter V2 orderbook swap. Hex-encoded, 0x-prefixed 40-character Optimism address of the seller.
in_bidOwnerSTRINGAddress of the user who owns the bid order being matched in this Lighter V2 swap. Hex-encoded, 0x-prefixed 40-character Optimism address.
in_amount0STRINGAmount of token0 involved in the liquidity pool operation. Numeric string representation of token quantity in smallest denomination.
in_amount1STRINGAmount of token1 involved in the liquidity pool operation. Numeric string representation of token quantity in smallest denomination.
addressremovedin_askIdin_bidIdlog_indexin_amount0in_amount1in_askOwnerin_bidOwnerblock_numberblock_timestamptransaction_hash
0x409b2966dea8b8b9e9b578be51eb58f3ec9f7e1afalse4404012158511400015851298510xd35138f1a59f8ddc705549a2459250eccddb7a300x62b3e98afa30f94f382856a71d811ac41f5211a71141050512023-12-29T00:14:39.000Z0xd80c9d848a21b8a482788d86c3e18d61df838cb6a435051b3086ef44f883bc20
0x409b2966dea8b8b9e9b578be51eb58f3ec9f7e1afalse44040157177740100017774187740xd35138f1a59f8ddc705549a2459250eccddb7a300xca423977156bb05b13a2ba3b76bc5419e2fe96801141061862023-12-29T00:52:29.000Z0x003bf8890c3e028418608fde4dcd50b86fbaa48353857c0c92e129f73de9e5aa
0x409b2966dea8b8b9e9b578be51eb58f3ec9f7e1afalse4404068726445600072645286440xd35138f1a59f8ddc705549a2459250eccddb7a300xca423977156bb05b13a2ba3b76bc5419e2fe96801141067872023-12-29T01:12:31.000Z0x73cb9ee9f36b357d04c397fb0abdc44fe2ce872341d6daaa27200c37c3dfbf5d
Query with partition filter
SELECT *
FROM `tt-contracts.lighter_v2_optimism.OrderBook_Swap_event`
WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
LIMIT 100