Uniswap V2 Pairs
Get all pairs that trade with USDC
token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
for blocks 0
to 21170000
.
curl -s --location --request GET \
"https://app.pangea.foundation/v1/api/uniswap/v2/pairs?chains=ETH&from_block=0&to_block=21170000&tokens__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
--header "Accept: application/jsonstream" \
--header "Accept-Encoding: gzip" --compressed \
--header "Authorization: Basic $PANGEA_AUTH" | jq
Response
[
...
{
"chain": 1,
"block_number": 21168894,
"block_hash": "0x663730c5cacd58e8186bb21dad597b60eebd8b63b3bcefc5b91be68732cb3f02",
"transaction_hash": "0x3ba54aa110aede892a96fd4c5bf4fc4af534d8baecc4e85f2e96ebc2fb60493f",
"transaction_index": 152,
"log_index": 491,
"factory": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
"token0_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"token0_decimals": 6,
"token0_name": "USD//C",
"token0_symbol": "USDC",
"token1_address": "0xc035a7cf15375ce2706766804551791ad035e0c2",
"token1_decimals": 18,
"token1_name": "Aave Ethereum Lido wstETH",
"token1_symbol": "aEthLidowstETH",
"pair_address": "0xa0a0e5fb1f93d953e0839d2eaf364eadf1dfaf5d",
"pair_index": 387776,
"timestamp": 1731381779
}
]
Filter on factory address
Fetch pairs created between blocks 21000000
and 21010000
from the official Uniswap V2 factory_address
0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
.
curl -s --location --request GET \
"https://app.pangea.foundation/v1/api/uniswap/v2/pairs?chains=ETH&from_block=21000000&to_block=21010000&factory_address__in=0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f" \
--header "Accept: application/jsonstream" \
--header "Accept-Encoding: gzip" --compressed \
--header "Authorization: Basic $PANGEA_AUTH" | jq
Response
[
...
{
"chain": 1,
"block_number": 21009996,
"block_hash": "0x6f054522b7ae88d8f82c45413d0e4c544e45fbeeb829c13ba25a1105c433047c",
"transaction_hash": "0x73c0c0145c432b756fa19e432b3c8b85ecf4170b135cf2d50b302c1046692f06",
"transaction_index": 2,
"log_index": 7,
"factory": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
"token0_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token0_decimals": 18,
"token0_name": "Wrapped Ether",
"token0_symbol": "WETH",
"token1_address": "0xeca2ffd283841122142c6cdf161149075777fde1",
"token1_decimals": 9,
"token1_name": "Vitalik's 2017 Git",
"token1_symbol": "CASPER",
"pair_address": "0x0204845860ce2c689decb9e5ee895e4939996a7d",
"pair_index": 380963,
"timestamp": 1729465979
}
]
Query parameters
v1/api/uniswap/v2/pairs
chains
: Filters the data by specific blockchain networks.from_block
: Filters the data by a starting block number.to_block
: Filters the data by an ending block number.pair_address__in
: Filters the data by a list ofpair_address
.factory_address__in
: Filters the data by a list of pairfactory_address
.token0__in
/token0_address__in
: Filters the data by a list oftoken0_address
.token1__in
/token1_address__in
: Filters the data by a list oftoken1_address
.tokens__in
: Filters the data by a list of bothtoken0_address
andtoken1_address
.