# The DEX pools that hold two given tokens

[Open the pool explorer →](https://tracefast.xyz/defi/dex/pools)

Every DEX pool whose tokens include both `tokenA` and `tokenB` (in either order, and pools of three or more tokens that hold both), newest created first — each with its protocol and version, fee tier where the source records one, approximate creation block and its tokens. Uniswap v4 pools are included and named by their PoolId. At most 200 pools; `truncated` says when more exist.

```
GET https://tracefast.xyz/api/v1/chains/1/pools/by-pair
```

| Parameter | In | Type | Notes |
|---|---|---|---|
| `tokenA` | query | string | One token contract, `0x` + 40 hex. Required. |
| `tokenB` | query | string | The other token contract, `0x` + 40 hex. Required. |

**Access** — an [API key](/api/authentication) on the **Intelligence** plan or higher ([plans](/api/authentication#plans)), or no key at all: pay per call with [x402](/api/x402) at the same path on `https://mpp.tracefast.xyz/api/v1`, at the price its `402` states. As a tool for AI agents: `get_pools_for_pair` on the [MCP server](/api/mcp-server). **Stable** — see [stability](/api/conventions#stability).

`chains/1` is a literal: other chain ids answer `404 chain_not_supported`. An unknown query parameter is refused rather than ignored.

## Response

`200 application/json`, USDC and WETH. Lists in the example are cut to two entries.

```json
{
  "data": {
    "chainId": 1,
    "tokenA": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "tokenB": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "pools": [
      {
        "poolId": "0x8db8cf12e15c871479a720d2a555ceac838859f13fb2a7d4302bb698a7d6e162",
        "protocol": "uniswap",
        "version": "v4",
        "creationBlockApprox": 26405456,
        "tokens": [
          {
            "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "role": "asset"
          },
          {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "symbol": "WETH",
            "name": "Wrapped Ether",
            "decimals": 18,
            "role": "asset"
          }
        ],
        "compositionStatus": "complete"
      },
      {
        "poolId": "0xee1755c714005390b696bf0ce09b20867495da2b93ef97a3008358321103e8a9",
        "protocol": "uniswap",
        "version": "v4",
        "creationBlockApprox": 26395731,
        "tokens": [
          {
            "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "role": "asset"
          },
          {
            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "symbol": "WETH",
            "name": "Wrapped Ether",
            "decimals": 18,
            "role": "asset"
          }
        ],
        "compositionStatus": "complete"
      }
    ],
    "truncated": true
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918371816,
    "cached": false,
    "docs": "https://docs.tracefast.xyz/api/pools-by-pair"
  }
}
```

### `data`

| Field | Meaning |
|---|---|
| `chainId` | Chain id. `1` is Ethereum mainnet. |
| `pools` | The pools, newest created first. |
| `tokenA` | The first token asked about, lowercase and `0x`-prefixed. |
| `tokenB` | The second token asked about, lowercase and `0x`-prefixed. |
| `truncated` | `true` when more pools hold both tokens than this list carries (200). |

### `data.pools[]`

| Field | Meaning |
|---|---|
| `compositionStatus` | Whether the pool's token list is known, as the source states it (`complete`: every token of the pool is listed). |
| `creationBlockApprox` | The block the pool was created around (approximate). |
| `feeTier` | The fee tier where the source records one (Uniswap v3 and PancakeSwap v3: hundredths of a basis point, `500` = 0.05 %). Absent does not mean the pool charges no fee. |
| `pool` | The pool contract, lowercase and `0x`-prefixed. Absent for a Uniswap v4 pool, which has no address of its own. |
| `poolId` | The pool's own 32-byte id where it has one (the Uniswap v4 PoolId, as the protocol's events name it). Absent for a pool with an address, and for a v4 pool the pool registry has not caught up with yet. |
| `protocol` | The protocol (`uniswap`, `curve`, …). |
| `tokens` | The pool's tokens. Empty when its composition is not known. |
| `version` | The protocol's version, for example `v3`. Absent where the protocol has none. |
| `volumeUsd7d` | USD volume over the last 7 days. Absent when the pool had none that could be priced (not the same as zero). |

### `data.pools[].tokens[]`

| Field | Meaning |
|---|---|
| `address` | The token contract, lowercase and `0x`-prefixed. |
| `decimals` | The decimals the token contract declares. Absent when unknown. |
| `name` | The name the token contract declares — verbatim, not verified. Absent when it declares none. Absent when longer than 128 characters — left out whole, never shortened. |
| `role` | The token's role in the pool as the source states it. |
| `symbol` | The symbol the token contract declares — verbatim, not verified. Absent when it declares none. Absent when longer than 64 characters — left out whole, never shortened. |
| `weightBps` | The pool's target weight of the token in basis points, where the pool declares weights. |

`meta` is the same envelope on every method — see [conventions](/api/conventions#meta).

## Errors

| Status | When |
|---|---|
| 400 | `bad_request`: `tokenA` or `tokenB` missing or not an address (`address_invalid`, with `parameter`), an unknown query parameter |
| 404 | `chain_not_supported`, or an unknown path |

Malformed input, unknown parameters and the key check's `401`/`403`/`429`/`503` are the same for every method — see [conventions](/api/conventions#errors) and [API keys](/api/authentication#when-a-key-is-refused).

## Related pages

* [One pool](/api/pool)
* [Pool reserves](/api/pool-reserves)
* [Pool swaps](/api/pool-swaps)
* [Pool volume](/api/pool-volume)
* [All API methods](/api/methods) — every method on one page
* [Conventions](/api/conventions) — requests, responses, errors and pagination
