Skip to main content

TypeScript shape

Event is shared by the historical query path (getTokenEvents / getTokenEventsForMaker) and the live subscription path (onTokenEventsCreated / onEventsCreated). Field types are identical, but which fields are populated differs by path — noted per field below as Historical vs Live.
String!
Unique event identifier in transactionHash:logIndex:networkId form. Always populated.
String!
Pool (pair) contract address. Always populated.
Int!
Network ID. Always populated.
EventType!
Event kind. See EventType. Always populated.
EventDisplayType
Buy/Sell for Swap (when quoteToken is set), Mint/Burn for LP events. See EventDisplayType.
EventCommitmentLevel!
Historical: always Confirmed. Live: EVM events are Confirmed; Solana events are ingested at Processed commitment and the value reflects the level you requested via the subscription’s commitmentLevel argument (default Confirmed). See EventCommitmentLevel.
QuoteToken
Quote side selected by the request, if any. See QuoteToken.
EventData
Per-event payload — use a __typename switch in your query. Codex documents BurnEventData / MintEventData / SwapEventData; Mobula additionally emits PoolBalanceChangedEventData and SyncEventData (superset — Codex clients can ignore the extra members). See EventData.
Int!
Unix seconds. Always populated.
Int!
Log index within the block. Historical: legacy NULL-index rows are coerced to 0. Always populated.
String!
Transaction hash. Always populated.
Int!
Transaction index within the block. Historical: always 0 (column not stored on swaps). Live: populated from the source swap/pool event.
String!
Block hash. Historical: empty string on the swap path; populated on the pool path. Live: populated.
Int!
Block height. Historical: 0 on the swap path; populated on the pool path. Live: populated.
String
Maker / transaction sender wallet address.
String
Pair’s token0 address.
String
Pair’s token1 address.
String
Base token USD price at event time. Not populated on either path today — always null.
String
Liquidity token address. Not populated on either path today — always null.
String
USD value of token0 in this swap. Historical: null. Live: populated for Swap events, null otherwise.
String
USD value of token1 in this swap. Historical: null. Live: populated for Swap events, null otherwise.
String
USD value of token0 reserves at event time. Historical: null. Live: populated.
String
USD value of token1 reserves at event time. Historical: null. Live: populated.
String
Token0 value denominated in the base token. Not populated on either path today — always null.
String
Token1 value denominated in the base token. Not populated on either path today — always null.
Int
Additional ordering hint for chains with multiple events per (block, log) (e.g. Solana). Historical: null. Live: populated when available.
EventFeeData
Fee breakdown. Historical: only poolFeeAmountRaw is populated. Live: not yet populated — always null. See EventFeeData.
LabelsForEvent
Sandwich / washtrade labels. Not populated on either path today — always null. See LabelsForEvent.
Int
Maker wallet age. Not populated on either path today — always null.
[String!]
Maker wallet labels. Not populated on either path today — always null.