Skip to main content
Subscriptions (WebSockets) require a Growth or Enterprise plan. Learn more.
This endpoint requires a Enterprise plan. Learn more.

Returns

AddTokenEventsOutput

Arguments

subscription {
  onTokenEventsCreated(
    input: {
      tokenAddress: "So11111111111111111111111111111111111111112"
      networkId: 1399811149
    }
  ) {
    id
    events {
      eventType
      eventDisplayType
      timestamp
      blockNumber
      transactionHash
      maker
      address
      token0Address
      token1Address
      token0SwapValueUsd
      token1SwapValueUsd
      token0ValueBase
      token1ValueBase
      walletAge
      walletLabels
      labels {
        sandwich {
          label
          sandwichType
          token0DrainedAmount
          token1DrainedAmount
        }
      }
    }
  }
}
Example Response
{
  "data": {
    "onTokenEventsCreated": {
      "id": "D9TvhCRcD9JAkA4nfbYH9sUfhcJVzwrhCCj7jgwtD85s:1399811149",
      "events": [
        {
          "eventType": "Swap",
          "eventDisplayType": "Buy",
          "timestamp": 1769561435,
          "blockNumber": 396376317,
          "transactionHash": "4pAiF26PJSxj4qnWGjaFL5tFgV9zGa38sxzcXyzA8MAM7KiviTS4pdqTPoUusPccH3k7VbXWqfoEsqLkkLMzSrkm",
          "maker": "9Fke4xFjBZfUxe54TFbfZyUiWoGF91NB87gbgAqhVrZh",
          "address": "D9TvhCRcD9JAkA4nfbYH9sUfhcJVzwrhCCj7jgwtD85s",
          "token0Address": "FGerXseLVoEsbFtbMAN41V9kc68vJCZxVf1g7NzHBAGS",
          "token1Address": "So11111111111111111111111111111111111111112",
          "token0SwapValueUsd": "0.000055871173472466600153642132795497",
          "token1SwapValueUsd": "126.8383173428749235655594956278139469319",
          "token0ValueBase": "4.4042949909665e-7",
          "token1ValueBase": "1",
          "walletAge": 14513261,
          "walletLabels": null,
          "labels": {
            "sandwich": null
          }
        }
      ]
    }
  }
}

Usage Guidelines

  • Pass tokenAddress and networkId to stream events for a token across all its liquidity pools
  • Unlike onEventsCreated (which subscribes to a single pair), this aggregates swaps from every pool the token trades in
  • Each event includes address — the pair contract where the swap occurred — so you can identify which pool it came from
  • The events array may contain multiple events per message
  • Use eventDisplayType for human-readable buy/sell labels and token0SwapValueUsd / token1SwapValueUsd for USD values

Troubleshooting Tips

Use onTokenEventsCreated when you want to monitor all trading activity for a token regardless of which pool it happens in. Use onEventsCreated when you only care about a specific pair (e.g., SOL/USDC on a particular DEX).
Each event includes an address field — this is the pair contract address where the swap occurred. You can use this to group or filter events by pool.
Yes. Omit tokenAddress and pass only networkId to receive all events across the entire network. This requires an enterprise plan with EventFeed features and is extremely high-volume.
Events include Swap, Mint, and Burn types. eventDisplayType translates these into user-friendly labels like Buy, Sell, Add Liquidity, and Remove Liquidity.