The Update Pairs stream provides real-time updates on the prices, volumes, market cap and liquidity of one or many token pairs. This documentation follows our standard streaming API structure.

Credit Cost

TBD

Supported Chains

  • BASE_MAINNET
  • BSC_MAINNET
  • ETH_MAINNET
  • SONIC_MAINNET

Supported DEXes

  • UNISWAP_V2
  • UNISWAP_V3
  • UNISWAP_V4
  • PANCAKESWAP_V2
  • SHADOW_V2
  • SHADOW_V3
This stream is currently in Beta. It is stable for testing and evaluation but may undergo changes in schema or behavior as we continue to improve it. No API credits are currently charged.We welcome your feedback so please reach out to us directly to report issues or request features.

Parameters

ParameterTypeRequiredDescription
chain_nameenumYesChain name to filter events (e.g. BASE_MAINNET, ETH_MAINNET, BSC_MAINNET)
pair_addressesarray<string>YesArray of pair addresses on supported DEXes and chains to track

Subscription

You can subscribe to the updatePairs endpoint to receive the events.

Basic Subscription Query

subscription {
  updatePairs(
    chain_name: BASE_MAINNET
    pair_addresses: ["0x9c087Eb773291e50CF6c6a90ef0F4500e349B903"]
  ) {
    chain_name
    pair_address
    timestamp
    price
    price_usd
    volume
    volume_usd
    market_cap
    liquidity
  }
}

Complete Subscription Query

subscription {
  updatePairs(
    chain_name: BASE_MAINNET
    pair_addresses: [
      "0x9c087Eb773291e50CF6c6a90ef0F4500e349B903"
      "0x4b0Aaf3EBb163dd45F663b38b6d93f6093EBC2d3"
    ]
  ) {
    chain_name
    pair_address
    timestamp
    price
    price_usd
    volume
    volume_usd
    market_cap
    liquidity
    base_token {
      contract_name
      contract_address
      contract_decimals
      contract_ticker_symbol
    }
    quote_token {
      contract_name
      contract_address
      contract_decimals
      contract_ticker_symbol
    }
    price_deltas {
      last_5m
      last_1hr
      last_6hr
      last_24hr
    }
    swap_counts {
      last_5m
      last_1hr
      last_6hr
      last_24hr
    }
  }
}

Response Format

Here’s an example of the response data structure:
{
  "data": {
    "updatePairs": [
      {
        "chain_name": "BASE_MAINNET",
        "pair_address": "0x9c087Eb773291e50CF6c6a90ef0F4500e349B903",
        "price": 0.0002962,
        "price_usd": 1.39,
        "volume": 0.2079461510855417,
        "volume_usd": 975.515187,
        "quote_token": {
          "contract_name": "Wrapped Ether",
          "contract_symbol": "WETH",
          "contract_address": "0x4200000000000000000000000000000000000006",
          "contract_decimals": 18
        },
        "base_token": {
          "contract_name": "Virtual",
          "contract_symbol": "VIRTUAL",
          "contract_address": "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b",
          "contract_decimals": 18
        },
        "swap_counts": {
          "last_5m": 10
          "last_1hr": 100
          "last_6hr": 1000
          "last_24hr": 10000
        },
        "price_deltas": {
          "last_5m": 1.2
          "last_1hr": 1.9
          "last_6hr": 2.7
          "last_24hr": -9.1
        }
      }
    ]
  }
}

Field Descriptions

FieldTypeDescription
chain_namestringThe blockchain network where the pair exists
pair_addressstringThe address of the DEX pair
pricefloatPrice of the token
price_usdfloatPrice of the token in USD
volumefloatTrading volume during the interval
volume_usdfloatTrading volume in USD
base_tokenobjectInformation about the base token in the pair
quote_tokenobjectInformation about the quote token in the pair
swap_countsobjectSwap counts for last 5m, 1hr, 6hr, 24hr
price_deltasobjectPrice deltas for last 5m, 1hr, 6hr, 24hr

GraphQL Playground