Uniswap V3 Pools

Fetch pools containing usdc = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

There is no block range limit on this endpoint.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=13605124&to_block=13616454&tokens__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ... 
  {
    "chain": 1,
    "block_number": 13616454,
    "block_hash": "0x7bd7e332ed6a56191e9b33cbb3407ed8b5d0826dda453e691290e8ef40c88e54",
    "transaction_hash": "0x9a773c2ab3acc47552e73d553b35e29c8fb0ca9576882f46552254232edb3cfd",
    "transaction_index": 34,
    "log_index": 27,
    "factory": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
    "token0_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token0_decimals": 6,
    "token0_name": "USD Coin",
    "token0_symbol": "USDC",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "pool_address": "0xe0554a476a092703abdb3ef35c80e0d76d32939f",
    "fee": 100,
    "tick_spacing": 1,
    "timestamp": 1636926269
  }
]

Fetch data for one pool by pool address:

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&pool_address__in=0x31ac258b911af9a0d2669ebdfc4e39d92e96b772" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  {
    "chain": 1,
    "block_number": 16987371,
    "block_hash": "0xf7dc333304d4a5e1909e84ae48596bbbe10f58e5b21b1dad3ee44ffa84c25234",
    "transaction_hash": "0x02857c539326ef2dceaea946c8dfe77ad4c3e65350606f90fc5debaedccb8685",
    "transaction_index": 88,
    "log_index": 306,
    "factory": "0xbaceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f",
    "token0_address": "0x6b175474e89094c44da98b954eedeac495271d0f",
    "token0_decimals": 18,
    "token0_name": "Dai Stablecoin",
    "token0_symbol": "DAI",
    "token1_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token1_decimals": 6,
    "token1_name": "USD Coin",
    "token1_symbol": "USDC",
    "pool_address": "0x31ac258b911af9a0d2669ebdfc4e39d92e96b772",
    "fee": 100,
    "tick_spacing": 1,
    "timestamp": 1680756539
  }
]

Fetch all pools that trade USDC and DAI tokens using token0__in and token1__in

"token0": "0x6b175474e89094c44da98b954eedeac495271d0f",
"token1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",

Note token0 or token1 are ordered alphabetically. This is determined by the smart contract so could be different if the implementation has been modified beyond Uniswap V3

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&token0__in=0x6b175474e89094c44da98b954eedeac495271d0f&token1__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

// todo: update response when missing factory address is added

[
  ...
  {
    "chain": 1,
    "block_number": 18384222,
    "block_hash": "0xcfa28f09b60d44ac817143ed7bce4ffff6522ef54f228091e1efdb6659fccd8e",
    "transaction_hash": "0xea979b2cf4837f44b7e5331a2b62a5d1b3e16fa0f025119dace9a968051f30bb",
    "transaction_index": 0,
    "log_index": 0,
    "factory": "0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a",
    "token0_address": "0x6b175474e89094c44da98b954eedeac495271d0f",
    "token0_decimals": 18,
    "token0_name": "Dai Stablecoin",
    "token0_symbol": "DAI",
    "token1_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token1_decimals": 6,
    "token1_name": "USD Coin",
    "token1_symbol": "USDC",
    "pool_address": "0xa847a0ddc1eab013d2c8f6d8b37766df99776bc6",
    "fee": 10,
    "tick_spacing": 1,
    "timestamp": 1697716643
  }
]

Fetch pools by factory address

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&factory_address__in=0x1f98431c8ad98523631ae4a59f267346ea31f984" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "block_number": 12381836,
    "block_hash": "0x2fb2ec7b9739b4cf2810feae377f6552dcd00ba97f9de61755690f02749e564e",
    "transaction_hash": "0x3a2bcf05921f38aea75c6562e378e2334a2c368a95dac4dca654ccdc74474fcd",
    "transaction_index": 97,
    "log_index": 148,
    "factory": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
    "token0_address": "0x5f183834b61bf4d0ce28033871bfa408ff97f735",
    "token0_decimals": 18,
    "token0_name": "KOCHI INU",
    "token0_symbol": "KOCHI",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "pool_address": "0xdab59355190d110f9f71a5f97993511343264db3",
    "fee": 3000,
    "tick_spacing": 60,
    "timestamp": 1620319088
  }
]

Query Parameters

v1/api/uniswap/v3/pools

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • factory_address__in: This parameter is used to filter the data by a list of pool factory addresses.
  • token0__in: This parameter is used to filter the data by a list of token0 names or symbols.
  • token1__in: This parameter is used to filter the data by a list of token1 names or symbols.
  • token0_address__in: This parameter is used to filter the data by a list of token0 addresses.
  • token1_address__in: This parameter is used to filter the data by a list of token1 addresses.
  • tokens__in: This parameter is used to filter the data by a list of token addresses, which can include both token0 and token1 addresses.
  • fee__gte: This parameter is used to filter the data by a minimum value for fee greater than or equal to the specified value.
  • fee__lte: This parameter is used to filter the data by a maximum value for fee less than or equal to the specified value.
  • tick_spacing__gte: This parameter is used to filter the data by a minimum value for tick spacing greater than or equal to the specified value.
  • tick_spacing__lte: This parameter is used to filter the data by a maximum value for tick spacing less than or equal to the specified value.