The New DEX Pairs stream provides real-time updates when new liquidity pairs are created on decentralized exchanges (DEXes). This documentation follows our standard streaming API structure.

Credit Cost

TBD

Supported Chains

  • Base Mainnet
  • BSC Mainnet
  • Ethereum Mainnet

Supported DEXes

  • Uniswap V2, V3
  • PancakeSwap

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.

Authentication

Using any of the GoldRush developer tools requires an API key.

Get Started

Sign up for a free API key to get started with GoldRush.

Parameters

ParameterTypeRequiredDescription
chain_nameenumYesChain name to filter events (e.g., BASE_MAINNET, ETH_MAINNET, BSC_MAINNET)
protocolsarray<enum>YesList of protocol name enums to filter events (e.g.,[UNISWAP_V2, UNISWAP_V3])

Connection

If you’re not using the graphql-ws package, you must set the WebSocket protocol header:

"Sec-WebSocket-Protocol" : "graphql-transport-ws"

This header is required for the server to properly recognize and handle your GraphQL subscription requests.

The WebSocket endpoint uses the GraphQL query or subscription protocol. Here are examples of how one can connect with different languages:

import { createClient } from "graphql-ws";

const CONNECTION_URL = "wss://gr-staging.streaming.covalenthq.com/graphql";

const client = createClient({
  url: CONNECTION_URL,
  shouldRetry: (retries) => retries < 5,
  on: {
    connecting: () => {
      console.log("⏳ WebSocket connecting...");
    },
    opened: () => {
      console.log("✅ WebSocket connection established");
    },
    closed: () => {
      console.log("❌ WebSocket connection closed");
    },
    error: (err) => {
      console.error("⚠️ WebSocket error:", err);
    },
  },
});

Subscription

Once connected, you can subscribe to the newPairs endpoint to receive event notifications.

Basic Subscription Query

subscription {
  newPairs(
    chain_name: BASE_MAINNET,
    protocols: [UNISWAP_V2, UNISWAP_V3]
  ) {
    chain_name
    protocol
    protocol_version
    tx_hash
    block_signed_at
  }
}

Complete Subscription Query

subscription {
  newPairs(
    chain_name: BASE_MAINNET,
    protocols: [UNISWAP_V2, UNISWAP_V3]
  ) {
    chain_name
    protocol
    protocol_version
    pair_address
    deployer_address
    tx_hash
    block_signed_at
    liquidity
    supply
    market_cap
    event_name
    quote_rate
    quote_rate_usd
    base_token_metadata {
      contract_address
      contract_decimals
      contract_name
      contract_ticker_symbol
    }
    pair_metadata {
      contract_address
      contract_decimals
      contract_name
      contract_ticker_symbol
    }
    quote_token_metadata {
      contract_address
      contract_decimals
      contract_name
      contract_ticker_symbol
    }
    prices {
      last_5m
      last_1hr
      last_6hr
      last_24hr
    }
    swaps {
      last_5m
      last_1hr
      last_6hr
      last_24hr
    }
  }
}

Implementation

client.subscribe({
    query: SUBSCRIPTION_QUERY
}, {
    next: (data) => {
        console.log(JSON.stringify(data));
    },
    error: (err) => console.error("⚠️ Subscription error:", err),
    complete: () => console.log("✅ Subscription completed"),
})

Response Format

Here’s an example of the response data structure:

{
  "data": {
    "newPairs": [
      {
        "chain_name": "base",
        "protocol": "uniswap",
        "protocol_version": "3",
        "pair_address": "0xa7dfb58a6e0d675c19f76dfd3b8b80a3a4814728",
        "deployer_address": "0x33128a8fc17869897dce68ed026d694621f6fdfd",
        "tx_hash": "0x5374c0182580ff2b3e868f58bdce697f3e4256baebc6f6e8db008fadb32d6253",
        "block_signed_at": "2025-05-28T22:01:41Z",
        "liquidity": 177.50267302070574,
        "supply": 1000000000,
        "market_cap": 6153.261270529,
        "event_name": "PoolCreated",
        "quote_rate": 0.000006153261270529,
        "quote_rate_usd": 0.000006153261270529,
        "base_token_metadata": {
          "contract_address": "0x8ac05571b525dd555320df58a40a0c0ab6d807c7",
          "contract_decimals": 18,
          "contract_name": "GOAT",
          "contract_ticker_symbol": "GOAT"
        },
        "quote_token_metadata": {
          "contract_address": "0x1111111111166b7fe7bd91427724b487980afc69",
          "contract_decimals": 18,
          "contract_name": "Zora",
          "contract_ticker_symbol": "ZORA"
        },
        "pair_metadata": {
          "contract_address": "0xa7dfb58a6e0d675c19f76dfd3b8b80a3a4814728",
          "contract_decimals": 18,
          "contract_name": "GOAT-ZORA Pool",
          "contract_ticker_symbol": "GOAT-ZORA"
        },
        "prices": {
          "last_5m": 0.0,
          "last_1hr": 0.1,
          "last_6hr": 0.5,
          "last_24hr": 2.3
        },
        "swaps": {
          "last_5m": 3,
          "last_1hr": 12,
          "last_6hr": 45,
          "last_24hr": 128
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
chain_namestringThe blockchain network where the pair was created
protocolstringDEX protocol name (e.g., “uniswap”, “pancakeswap”)
protocol_versionstringVersion of the DEX protocol
pair_addressstringAddress of the new pair contract
deployer_addressstringAddress that deployed the pair contract
tx_hashstringTransaction hash of the pair creation
block_signed_atstringISO timestamp of when the block was signed
liquidityfloatInitial liquidity amount (in USD)
supplyintegerTotal supply of the pair token
market_capfloatMarket capitalization in USD
event_namestringName of the contract event (e.g., “PoolCreated”)
quote_ratefloatExchange rate between base and quote tokens
quote_rate_usdfloatUSD value of the quote rate
base_token_metadataobjectMetadata for the base token including contract address, decimals, name, and symbol
quote_token_metadataobjectMetadata for the quote token including contract address, decimals, name, and symbol
pair_metadataobjectMetadata for the pair including contract address, decimals, name, and symbol
pricesobjectPrice change metrics at different time intervals (5m, 1hr, 6hr, 24hr)
swapsobjectNumber of swaps at different time intervals (5m, 1hr, 6hr, 24hr)

GraphQL Playground