GET /networks/{network}/pools/{pool_address} returns everything DexPaprika knows about one pool: its two tokens, the reserves of each, total liquidity in USD, the latest price, and volume, swap counts and price change over the last 5 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours and 24 hours. No key is needed:
Which plan you need
The endpoint works on every plan. A key changes the limits and the host.
The key goes in
Authorization on its own. How fresh the data is also depends on the plan; see pricing for the data delay of each one, and get a key in console.dexpaprika.com.
What the response carries
last_price_usd_change is a percentage: 0.96 means the price rose 0.96% over the window. buys and sells split the swaps by direction, and buy_usd plus sell_usd add up to volume_usd.
Flip the price with inversed
In the pool above the base token is WETH and the quote token is USDC, so last_price is about 2,530 USDC per WETH. Add inversed=true to price the other token instead:
A pool summary in Python
This script prints the pool’s pair, price, reserves in whole tokens and its activity window by window, in one request:Things to know
reserve is in raw units. Divide by 10 ** decimals of that token, as the script does. USDC has 6 decimals and WETH 18, so the raw numbers are not comparable until you do.
Check which token is the base before you read last_price. The base token is not always the one you think of as “the” token of the pool. Compare base_token_id with the address you care about, or set inversed=true.
Some fields can be null. fee and the 24h high_24h and low_24h in price_stats were null for this pool. Treat any field you do not see above as optional in your code.
One request, one credit. Polling a pool every few seconds adds up quickly; see credit usage. For a live view, the reserves stream pushes changes instead.
Where to go next
- Pool OHLCV: price history for the same pool
- Pool transactions: the individual swaps behind the counts, on Dev and up
- Pool reference
- Pricing, console.dexpaprika.com and docs home