> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Event

> A single event for a pair: trade (Swap), LP add/remove (Mint/Burn), or pool rebalance (PoolBalanceChanged).

### TypeScript shape

```ts theme={null}
interface Event {
  address: string;
  commitmentLevel: EventCommitmentLevel;
  baseTokenPrice: string | null;
  blockHash: string;
  blockNumber: number;
  data: EventData | null;
  eventType: EventType;
  id: string;
  liquidityToken: string | null;
  logIndex: number;
  maker: string | null;
  networkId: number;
  quoteToken: QuoteToken | null;
  timestamp: number;
  token0Address: string | null;
  token1Address: string | null;
  token0SwapValueUsd: string | null;
  token1SwapValueUsd: string | null;
  token0ValueBase: string | null;
  token1ValueBase: string | null;
  token0PoolValueUsd: string | null;
  token1PoolValueUsd: string | null;
  transactionHash: string;
  transactionIndex: number;
  supplementalIndex: number | null;
  eventDisplayType: EventDisplayType | null;
  labels: LabelsForEvent | null;
  feeData: EventFeeData | null;
  walletAge: number | null;
  walletLabels: string[] | null;
}
```

<Note>
  `Event` is shared by the **historical query** path ([`getTokenEvents`](/api-reference/graphql/queries/getTokenEvents) / [`getTokenEventsForMaker`](/api-reference/graphql/queries/getTokenEventsForMaker)) and the **live subscription** path ([`onTokenEventsCreated`](/api-reference/graphql/subscriptions/onTokenEventsCreated) / [`onEventsCreated`](/api-reference/graphql/subscriptions/onEventsCreated)). Field *types* are identical, but which fields are *populated* differs by path — noted per field below as **Historical** vs **Live**.
</Note>

<ResponseField name="id" type="String!">Unique event identifier in `transactionHash:logIndex:networkId` form. Always populated.</ResponseField>
<ResponseField name="address" type="String!">Pool (pair) contract address. Always populated.</ResponseField>
<ResponseField name="networkId" type="Int!">Network ID. Always populated.</ResponseField>
<ResponseField name="eventType" type="EventType!">Event kind. See [EventType](/api-reference/graphql/types/EventType). Always populated.</ResponseField>
<ResponseField name="eventDisplayType" type="EventDisplayType">Buy/Sell for Swap (when `quoteToken` is set), Mint/Burn for LP events. See [EventDisplayType](/api-reference/graphql/types/EventDisplayType).</ResponseField>

<ResponseField name="commitmentLevel" type="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](/api-reference/graphql/types/EventCommitmentLevel).
</ResponseField>

<ResponseField name="quoteToken" type="QuoteToken">Quote side selected by the request, if any. See [QuoteToken](/api-reference/graphql/types/QuoteToken).</ResponseField>

<ResponseField name="data" type="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](/api-reference/graphql/types/EventData).
</ResponseField>

<ResponseField name="timestamp" type="Int!">Unix seconds. Always populated.</ResponseField>
<ResponseField name="logIndex" type="Int!">Log index within the block. Historical: legacy NULL-index rows are coerced to `0`. Always populated.</ResponseField>
<ResponseField name="transactionHash" type="String!">Transaction hash. Always populated.</ResponseField>

<ResponseField name="transactionIndex" type="Int!">
  Transaction index within the block. **Historical:** always `0` (column not stored on `swaps`). **Live:** populated from the source swap/pool event.
</ResponseField>

<ResponseField name="blockHash" type="String!">
  Block hash. **Historical:** empty string on the swap path; populated on the pool path. **Live:** populated.
</ResponseField>

<ResponseField name="blockNumber" type="Int!">
  Block height. **Historical:** `0` on the swap path; populated on the pool path. **Live:** populated.
</ResponseField>

<ResponseField name="maker" type="String">Maker / transaction sender wallet address.</ResponseField>
<ResponseField name="token0Address" type="String">Pair's token0 address.</ResponseField>
<ResponseField name="token1Address" type="String">Pair's token1 address.</ResponseField>
<ResponseField name="baseTokenPrice" type="String">Base token USD price at event time. Not populated on either path today — always `null`.</ResponseField>
<ResponseField name="liquidityToken" type="String">Liquidity token address. Not populated on either path today — always `null`.</ResponseField>
<ResponseField name="token0SwapValueUsd" type="String">USD value of token0 in this swap. **Historical:** `null`. **Live:** populated for `Swap` events, `null` otherwise.</ResponseField>
<ResponseField name="token1SwapValueUsd" type="String">USD value of token1 in this swap. **Historical:** `null`. **Live:** populated for `Swap` events, `null` otherwise.</ResponseField>
<ResponseField name="token0PoolValueUsd" type="String">USD value of token0 reserves at event time. **Historical:** `null`. **Live:** populated.</ResponseField>
<ResponseField name="token1PoolValueUsd" type="String">USD value of token1 reserves at event time. **Historical:** `null`. **Live:** populated.</ResponseField>
<ResponseField name="token0ValueBase" type="String">Token0 value denominated in the base token. Not populated on either path today — always `null`.</ResponseField>
<ResponseField name="token1ValueBase" type="String">Token1 value denominated in the base token. Not populated on either path today — always `null`.</ResponseField>
<ResponseField name="supplementalIndex" type="Int">Additional ordering hint for chains with multiple events per (block, log) (e.g. Solana). **Historical:** `null`. **Live:** populated when available.</ResponseField>

<ResponseField name="feeData" type="EventFeeData">
  Fee breakdown. **Historical:** only `poolFeeAmountRaw` is populated. **Live:** not yet populated — always `null`. See [EventFeeData](/api-reference/graphql/types/EventFeeData).
</ResponseField>

<ResponseField name="labels" type="LabelsForEvent">Sandwich / washtrade labels. Not populated on either path today — always `null`. See [LabelsForEvent](/api-reference/graphql/types/LabelsForEvent).</ResponseField>
<ResponseField name="walletAge" type="Int">Maker wallet age. Not populated on either path today — always `null`.</ResponseField>
<ResponseField name="walletLabels" type="[String!]">Maker wallet labels. Not populated on either path today — always `null`.</ResponseField>
