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

Returns

AddUnconfirmedEventsOutput

Arguments

address
String
deprecated
The pair contract address.
This argument is deprecated. Unused
id
String
The ID of the pair (address:networkId).
quoteToken
The token of interest within the pair. Can be token0 or token1.
This subscription is Solana only. Unconfirmed event data reflects transactions that have not yet been finalized on-chain. Events may change or be dropped once transactions are confirmed.
subscription {
  onUnconfirmedEventsCreated(
    id: "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149"
    quoteToken: token0
  ) {
    address
    networkId
    id
    quoteToken
    events {
      eventType
      eventDisplayType
      timestamp
      blockNumber
      blockHash
      transactionHash
      transactionIndex
      logIndex
      maker
      data {
        ... on UnconfirmedSwapEventData {
          type
          amountNonLiquidityToken
          amountBaseToken
          priceUsd
          priceUsdTotal
          priceBaseToken
          priceBaseTokenTotal
        }
      }
    }
  }
}
Example Response
{
  "data": {
    "onUnconfirmedEventsCreated": {
      "address": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y",
      "networkId": 1399811149,
      "id": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149",
      "quoteToken": "token0",
      "events": [
        {
          "eventType": "Mint",
          "eventDisplayType": "Mint",
          "timestamp": 1769563303,
          "blockNumber": 396380972,
          "blockHash": "2VWRwRSr1XtKPDLWPyekaJsmvUeTRRm2QB1mEY3AYibP",
          "transactionHash": "5stCUsHY3kgbPMGRKZVjWsZuXt3928H3ptkwW3hxRSNax2oiJVUqacQLRUyLEj6EHkoDx9V7eUDShH8kB5qAkUkw",
          "transactionIndex": 1184,
          "logIndex": 2,
          "maker": "HAWK3BVnwptKRFYfVoVGhBc2TYxpyG9jmAbkHeW9tyKE",
          "data": {}
        }
      ]
    }
  }
}

Usage Guidelines

  • Subscribe by id (format pairAddress:networkId) to stream unconfirmed transactions for a specific pair
  • Alternatively, use address + networkId to identify the pair
  • Solana only — this subscription streams events from unconfirmed (pending) transactions for the lowest possible latency
  • Set quoteToken to token0 or token1 to control which token is treated as the base for display
  • The data field uses a union type — use inline fragments (... on UnconfirmedSwapEventData) to access swap-specific fields like priceUsd and amountNonLiquidityToken
  • Liquidity events (Mint, Burn) return UnconfirmedLiquidityChangeEventData with amount0 / amount1 fields instead
  • Use this for latency-sensitive applications where seeing unconfirmed trades is more important than finality

Troubleshooting Tips

Use onUnconfirmedEventsCreated when you need the fastest possible trade feed on Solana and can tolerate the data being unconfirmed. Use onEventsCreated for confirmed, finalized events with richer metadata like walletAge, walletLabels, and sandwich attack labels. Most applications should use onEventsCreated.
Yes. Since the data is from unconfirmed transactions, events can fail, be reordered, or be dropped before finalization. Treat unconfirmed events as provisional.
The data field returns different shapes depending on the event type. Swap events return UnconfirmedSwapEventData with price and amount fields, while liquidity events (Mint/Burn) return UnconfirmedLiquidityChangeEventData with amount0/amount1 fields. Use inline fragments to query the fields you need.
No. Unconfirmed event data is currently only available on Solana (networkId: 1399811149).