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

# AddEventsOutput

> Response returned by `onEventsCreated`. Reference for the AddEventsOutput type in the Codex API: every field, its type, and the operations that return it.

## GraphQL

```
type AddEventsOutput {
  address: String!
  networkId: Int!
  id: String!
  quoteToken: QuoteToken
  events: [Event]!
}

enum QuoteToken {
  token0
  token1
}

enum EventCommitmentLevel {
  Processed
  Confirmed
}

enum EventType {
  Burn
  Mint
  Swap
  Sync
  Collect
  CollectProtocol
  PoolBalanceChanged
  LiquidityLock
}

type BurnEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  tickLower: String
  tickUpper: String
  type: EventType!
}

type MintEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  tickLower: String
  tickUpper: String
  type: EventType!
}

type SwapEventData {
  amount0: String
  amount0In: String
  amount0Out: String
  amount1: String
  amount1In: String
  amount1Out: String
  amountNonLiquidityToken: String
  priceBaseToken: String
  priceBaseTokenTotal: String
  priceUsd: String
  priceUsdTotal: String
  tick: String
  type: EventType!
}

type PoolBalanceChangedEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  token0: String
  token1: String
  sender: String
  protocolFeeAmount0: String
  protocolFeeAmount1: String
  liquidity0: String
  liquidity1: String
  type: EventType!
}

union EventData = BurnEventData | MintEventData | SwapEventData | PoolBalanceChangedEventData

enum EventDisplayType {
  Burn
  Mint
  Buy
  Sell
  Sync
  Collect
  CollectProtocol
}

enum SandwichLabelForEventType {
  sandwiched
  frontrun
  backrun
}

type SandwichLabelForEvent {
  label: String!
  sandwichType: SandwichLabelForEventType!
  token0DrainedAmount: String!
  token1DrainedAmount: String!
}

type WashtradeLabelForEvent {
  label: String!
}

type LabelsForEvent {
  sandwich: SandwichLabelForEvent
  washtrade: WashtradeLabelForEvent
}

type PumpCashbackFeeData {
  type: String!
  cashbackFeeBps: Int!
  cashbackAmountLamports: String!
}

type PumpAmmCashbackFeeData {
  type: String!
  cashbackFeeBps: Int!
  cashbackAmountLamports: String!
}

type LiftHarvestFeeData {
  type: String!
  positionId: String!
  quoteAddress: String!
  creatorAddress: String
  quoteToCreator: String!
  quoteToTreasury: String!
  baseBurned: String!
}

type TollyCollectionFeeData {
  type: String!
  positionId: String!
  projectToken: String!
  quoteCollectedRaw: String!
  tokenBurnedRaw: String!
  tollyBuybackRaw: String!
  projectBuybackRaw: String!
  projectBuybackAccruedRaw: String!
  holderRewardsRaw: String!
  protocolRaw: String!
  creatorPaidRaw: String!
  creatorAccruedRaw: String!
}

union SupplementalFeeData = PumpCashbackFeeData | PumpAmmCashbackFeeData | LiftHarvestFeeData | TollyCollectionFeeData

type EventFeeData {
  poolFeeRateRaw: String
  poolFeeBps: Float
  poolFeeAmountRaw: String
  dynamicFee: Boolean
  estimatedPoolFee: Boolean
  baseFeeNativeUnit: String
  priorityFeeNativeUnit: String
  gasUsed: String
  poolFeeCurrencyIndex: Int
  protocolFeeCurrencyIndex: Int
  builderTipNativeUnit: String
  l1DataFeeNativeUnit: String
  txEventCount: Int
  supplementalFeeData: SupplementalFeeData
}

type TradeSource {
  id: String!
  displayName: String
}

type CurrencyUnits {
  currency0: String!
  currency1: String!
  decimals0: Int!
  decimals1: Int!
}

type Event {
  address: String!
  commitmentLevel: EventCommitmentLevel!
  baseTokenPrice: String
  blockHash: String!
  blockNumber: Int!
  data: EventData
  eventType: EventType!
  id: String!
  liquidityToken: String
  logIndex: Int!
  maker: String
  networkId: Int!
  quoteToken: QuoteToken
  timestamp: Int!
  token0Address: String
  token1Address: String
  token0SwapValueUsd: String
  token1SwapValueUsd: String
  token0ValueBase: String
  token1ValueBase: String
  token0PoolValueUsd: String
  token1PoolValueUsd: String
  transactionHash: String!
  transactionIndex: Int!
  supplementalIndex: Int
  eventDisplayType: EventDisplayType
  labels: LabelsForEvent
  feeData: EventFeeData
  walletAge: Int
  walletLabels: [String!]
  tradeSource: TradeSource
  currencyUnits: CurrencyUnits
}
```

### Used By

**Returned by**

* [onEventsCreated](https://docs.codex.io/api-reference/subscriptions/oneventscreated.md): Live-streamed transactions for a pair.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.