Resolve Uniswap V3 pool address

$0.001 per call · USDC via x402 · POST /api/dex-pair

Look up the Uniswap V3 pool address for a token pair + fee tier on Ethereum, Base, Polygon, Arbitrum, or Optimism. Send POST /api/dex-pair with the required fields tokenA, tokenB and fee and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with network, tokenA, tokenB, fee and poolAddress.

Pass either order (tokenA/tokenB) - the factory sorts internally. Returns 0x0…0 if no pool has been deployed for that combination yet.

Category: Crypto & onchain data · Tags: crypto uniswap dex v3 pool evm · Also found as: uniswap-v3-pool-address uniswap-pool dex-pool

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
tokenAstringyes0x-prefixed ERC-20 contract address.
tokenBstringyes0x-prefixed ERC-20 contract address (other side of the pair).
feenumberyesFee tier in 1e-6 units: 100, 500, 3000, or 10000 (0.01% / 0.05% / 0.30% / 1.00%).
networkstringnoethereum / base / polygon / arbitrum / optimism (default base).

Example request

curl -i -X POST https://agent402.tools/api/dex-pair \
  -H "Content-Type: application/json" \
  -d '{"tokenA":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenB":"0x4200000000000000000000000000000000000006","fee":500,"network":"base"}'

Without payment this returns HTTP 402 Payment Required with the exact price for dex-pair; any x402 v2 or MPP client pays it and retries.

Example response

{
  "network": "base",
  "tokenA": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "tokenB": "0x4200000000000000000000000000000000000006",
  "fee": 500,
  "poolAddress": "0xd0b53d9277642d899df5c87a3966a349a798f224"
}
FieldTypeAlways presentIn the example
networkstringyesbase
tokenAstringyes0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
tokenBstringyes0x4200000000000000000000000000000000000006
feenumberyes500
poolAddressstringyes0xd0b53d9277642d899df5c87a3966a349a798f224

From an MCP client

catalog.call {
  "slug": "dex-pair",
  "params": {
    "tokenA": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "tokenB": "0x4200000000000000000000000000000000000006",
    "fee": 500,
    "network": "base"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for dex-pair; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/dex-pair", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "tokenA": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "tokenB": "0x4200000000000000000000000000000000000006",
    "fee": 500,
    "network": "base"
  }),
});

Related tools

Read Uniswap V3 pool state

$0.002 · POST /api/dex-pool

Read on-chain state of a Uniswap V3 pool: token0/token1 addresses + decimals, fee tier, current sqrtPriceX96, tick, in-r…

Uniswap V3 spot quote

$0.002 · POST /api/dex-quote

Spot quote for swapping through a Uniswap V3 pool at the current tick. amountIn is in human units (not wei). zeroForOne=…

DEX volume by protocol

$0.001 · POST /api/defi-dex-volume

Decentralized exchanges ranked by 24h spot trading volume from DefiLlama's free DEX overview: per-DEX 24h/7d/30d/1y/all-…

Known-address label lookup

FREE w/ compute · or $0.002 · POST /api/address-label

Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG contr…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Block info

$0.001 · GET /api/block-info

Header-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO), trans…