> ## 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.

# listPairsWithMetadataForToken

> Returns a list of pair metadata for a token.

<div data-generated>
  ## GraphQL

  ```
  type Query {
    listPairsWithMetadataForToken(
      limit: Int
      networkId: Int!
      tokenAddress: String!
    ): ListPairsForTokenResponse!
  }

  type SocialLinks {
    bitcointalk: String
    blog: String
    coingecko: String
    coinmarketcap: String
    discord: String
    email: String
    facebook: String
    github: String
    instagram: String
    linkedin: String
    reddit: String
    slack: String
    telegram: String
    twitch: String
    twitter: String
    website: String
    wechat: String
    whitepaper: String
    youtube: String
  }

  type TokenInfo {
    id: String!
    address: String!
    circulatingSupply: String
    cmcId: Int
    gridAssetId: String
    bluechipRating: String
    isScam: Boolean
    name: String
    networkId: Int!
    symbol: String!
    totalSupply: String
    imageThumbHash: String
    imageThumbUrl: String
    imageSmallUrl: String
    imageLargeUrl: String
    imageBannerUrl: String
    videoExternalUrl: String
    description: String
  }

  type OrganizationUrl {
    url: String!
    type: String
  }

  type OrganizationSocial {
    url: String!
    type: String
  }

  type AssetDeployment {
    id: String!
    networkId: Int!
    address: String!
    standard: String
    assetId: String!
    rootId: String!
    token: EnhancedToken
  }

  type Asset {
    id: String!
    name: String
    description: String
    ticker: String
    type: String
    status: String
    icon: String
    rootId: String!
    assetDeployments: [AssetDeployment!]!
  }

  type Organization {
    name: String!
    foundingDate: String
    descriptionShort: String
    descriptionLong: String
    tagLine: String
    type: String
    sector: String
    urls: [OrganizationUrl!]!
    socials: [OrganizationSocial!]!
    logo: String
    icon: String
    header: String
    rootId: String!
    assets: [Asset!]!
  }

  type ExplorerTokenData {
    id: String!
    blueCheckmark: Boolean
    description: String
    divisor: String
    tokenPriceUSD: String
    tokenType: String
  }

  type Exchange {
    id: String!
    address: String!
    color: String
    name: String
    exchangeVersion: String
    iconUrl: String
    networkId: Int!
    tradeUrl: String
  }

  enum WalletCategory {
    NORMIE
    TOKEN_CREATOR
    EXCHANGE
    DEFI_EXCHANGE
    PAIR
    PAIR_TOKEN_HOLDER
    POOL_AUTHORITY
    STAKING_VAULT
    NOTORIOUS
  }

  type WalletFunding {
    fundedByAddress: String!
    fundedByLabel: String
    fundedAt: Int!
    tokenAddress: String!
    networkId: Int!
    amount: String!
    transactionHash: String!
  }

  type WalletPolymarketProfile {
    proxyWallet: String!
    xUsername: String
    displayName: String
    pseudonym: String
    profileImageUrl: String
    verifiedBadge: Boolean
    displayUsernamePublic: Boolean
    fetchedAt: Int!
  }

  type Wallet {
    address: String!
    category: WalletCategory
    firstSeenTimestamp: Int
    firstFunding: WalletFunding
    identityLabels: [String!]
    avatarUrl: String
    displayName: String
    twitterId: String
    twitterUsername: String
    telegramId: String
    telegramUsername: String
    website: String
    discordId: String
    discordUsername: String
    githubId: String
    githubUsername: String
    farcasterId: String
    farcasterUsername: String
    description: String
    ethosScore: Int
    ethosLevel: String
    ethosVerified: Boolean
    identitySource: String
    identityUpdatedAt: Int
    polymarket: WalletPolymarketProfile
    tokensCreatedCount: Int
    tokensMigratedCount: Int
  }

  type LaunchpadData {
    launchpadName: String
    graduationPercent: Float
    poolAddress: String
    completedAt: Int
    completed: Boolean
    completedSlot: Int
    migratedSlot: Int
    migratedAt: Int
    migrated: Boolean
    migratedPoolAddress: String
    launchpadProtocol: String
    launchpadIconUrl: String
    isCashbackEnabled: Boolean
    category: String
  }

  type TokenExtrema {
    id: String!
    address: String!
    networkId: Int!
    athPrice: String!
    athPriceTimestamp: Int!
    atlPrice: String!
    atlPriceTimestamp: Int!
    athFdv: String!
    athFdvTimestamp: Int!
    atlFdv: String!
    atlFdvTimestamp: Int!
    athCircMc: String!
    athCircMcTimestamp: Int!
    atlCircMc: String!
    atlCircMcTimestamp: Int!
  }

  type CoinCommunity {
    id: String!
    createdAt: Int!
    postCount: Int!
    memberCount: Int!
    likeCount: Int!
    lastPostAt: Int
  }

  type Token2022ScaledUiAmountConfig {
    authority: String
    multiplier: Float!
    newMultiplierEffectiveTimestamp: String
    newMultiplier: Float
  }

  type Token2022Extensions {
    scaledUiAmountConfig: Token2022ScaledUiAmountConfig
  }

  type B20Extensions {
    multiplier: String
    multiplierObservedAt: String
    pausedTransfer: Boolean
    pausedMint: Boolean
    pausedBurn: Boolean
    supplyCap: String
  }

  type TokenExtensions {
    token2022: Token2022Extensions
    b20: B20Extensions
  }

  type Erc7572CustomInfo {
    type: String!
    featuredImage: String
    collaborators: [String!]
  }

  enum CategoryType {
    CANONICAL
    NARRATIVE
  }

  enum CategoryStatus {
    DRAFT
    ACTIVE
    ARCHIVED
  }

  type Category {
    id: String!
    name: String!
    shortName: String
    slug: String!
    description: String
    type: CategoryType!
    status: CategoryStatus!
    parentId: String
    memberCount: Int
  }

  type EnhancedToken {
    id: String!
    address: String!
    cmcId: Int
    decimals: Int!
    isScam: Boolean
    name: String
    networkId: Int!
    symbol: String
    socialLinks: SocialLinks
    info: TokenInfo
    gridAssetId: String
    bluechipRating: String
    organization: Organization
    asset: Asset
    exchanges: [Exchange!]
    creatorAddress: String
    creator: Wallet
    createBlockNumber: Int
    createTransactionHash: String
    createdAt: Int
    mintable: String
    freezable: String
    isFreezableValid: Boolean
    isMintableValid: Boolean
    launchpad: LaunchpadData
    top10HoldersPercent: Float
    profanity: Boolean
    extrema: TokenExtrema
    coinCommunity: CoinCommunity
    extensions: TokenExtensions
    tokenStandardCustomData: Erc7572CustomInfo
    categories: [Category!]
  }

  type PooledTokenValues {
    token0: String
    token1: String
  }

  type UniswapV4Data {
    uniswapV4HookAddress: String
    isToken0NetworkToken: Boolean
    isDynamicFee: Boolean
    type: String!
  }

  type ArenaTradeData {
    tokenId: String
    type: String!
  }

  type PumpData {
    creator: String
    type: String!
  }

  union ProtocolData = UniswapV4Data | ArenaTradeData | PumpData

  type PairProtocolCustomData {
    uniswapV4HookAddress: String
  }

  type Pair {
    address: String!
    exchangeHash: String!
    fee: Int
    id: String!
    networkId: Int!
    protocol: String
    tickSpacing: Int
    token0: String!
    token1: String!
    createdAt: Int
    token0Data: EnhancedToken
    token1Data: EnhancedToken
    pooled: PooledTokenValues
    virtualPooled: PooledTokenValues
    protocolData: ProtocolData
  }

  enum QuoteToken {
    token0
    token1
  }

  type ListPairsForTokenValue {
    volume: String!
    liquidity: String!
    token: EnhancedToken!
    backingToken: EnhancedToken!
    pair: Pair!
    exchange: Exchange!
    quoteToken: QuoteToken
  }

  type ListPairsForTokenResponse {
    results: [ListPairsForTokenValue!]!
  }
  ```
</div>

### Example

<a href="/explore" target="_blank" rel="noopener noreferrer">Test this query in the Explorer →</a>

```graphql theme={null}
{
  listPairsWithMetadataForToken(
    tokenAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
    networkId: 1
    limit: 5
  ) {
    results {
      volume
      liquidity
      quoteToken
      token {
        address
        name
        symbol
        networkId
      }
      backingToken {
        address
        name
        symbol
        networkId
      }
      pair {
        address
        id
        networkId
        fee
        protocol
      }
      exchange {
        name
        iconUrl
        tradeUrl
      }
    }
  }
}
```

### Usage Guidelines

* Query using `tokenAddress` (contract address) and `networkId` (chain ID)
* Results are sorted by liquidity, with the highest liquidity pairs first
* `token` contains metadata for the higher-liquidity token in the pair
* `backingToken` contains metadata for the lower-liquidity token in the pair
* `quoteToken` indicates which token (`token0` or `token1`) is the quote token for price calculations
* Use the `exchange` field to get DEX information including trade URLs

### Troubleshooting Tips

<AccordionGroup>
  <Accordion title="What's the difference between token and backingToken?">
    In each result, `token` is the token with higher liquidity in the pair (typically the major/stable token like WETH, USDC), while `backingToken` is the token with lower liquidity (typically the token you're querying for). This helps identify which side of the pair is which.
  </Accordion>

  <Accordion title="How is this different from filterPairs?">
    `listPairsWithMetadataForToken` returns pairs for a specific token with rich metadata including exchange info. `filterPairs` is more flexible for searching across all pairs with various filters but returns less detailed metadata per result.
  </Accordion>

  <Accordion title="Why are some pairs missing?">
    Only pairs with sufficient liquidity and trading activity are indexed. Very new pairs or those with minimal liquidity may not appear immediately.
  </Accordion>

  <Accordion title="How do I get price data for these pairs?">
    This query returns liquidity and volume but not current prices. Use `pairMetadata` with the pair ID from the results to get detailed price and stats data.
  </Accordion>

  <Accordion title="Can I filter by exchange?">
    This query returns all pairs for a token across all exchanges. To filter by specific exchanges, use `filterPairs` with the `exchangeAddress` filter instead.
  </Accordion>
</AccordionGroup>

### Related Recipes

* [Detailed Token Page](/recipes/detailed-token-page): Build a comprehensive token detail page with price, holders, trades, and real-time updates
