Overview
This page covers the most common sequences of API calls for typical tasks. Each pattern shows the exact endpoints, parameters, and response fields you need. Base URL:https://api.dexpaprika.com
Pattern 1: Get a token’s price
When you know the network and token address:response.summary.price_usd.
When you only know the token name or symbol:
- Search first:
-
From the
tokensarray in the response, find the matching token. Note thechainandid(address) fields. - Call the token endpoint:
Pattern 2: Compare prices of multiple tokens
Use batch pricing when you need prices for 2–10 tokens on the same network:{id, chain, price_usd} objects. Order is not guaranteed. Tokens without pricing data are silently omitted (not an error).
Limits: Max 10 tokens per request. More than 10 returns HTTP 400. Zero tokens also returns HTTP 400.
For tokens across different networks, make separate requests per network.
Pattern 3: Find top pools on a network
order_by: volume_usd, price_usd, transactions, last_price_change_usd_24h, created_at
Pagination: Pages are 1-indexed. Max 100 items per page.
The response wraps pools in a pools array with a page_info object.
Pattern 4: Find pools for a specific token
reorder=true to make the queried token the primary token in all metrics. Add address=<second_token> to filter to pools paired with a specific second token.
Pattern 5: Get historical price data (OHLCV)
OHLCV data is per pool, not per token. The workflow is:- Find the best pool — the highest-volume pool for the token:
- Get OHLCV data for that pool:
1m, 5m, 10m, 15m, 30m, 1h, 6h, 12h, 24h
start is required — ISO 8601 date or UNIX timestamp. Optional end parameter (max 1 year from start). Max 366 data points per request.
Response is a JSON array of candlestick objects with time_open, time_close, open, high, low, close, volume.
Use inversed=true to flip the pair (e.g., get ETH/USDC instead of USDC/ETH).
Pattern 6: Filter pools by criteria
Use the filter endpoint to find pools matching specific conditions:| Parameter | Type | Description |
|---|---|---|
volume_24h_min | number | Minimum 24h volume in USD |
volume_24h_max | number | Maximum 24h volume in USD |
txns_24h_min | integer | Minimum transactions in last 24h |
created_after | integer | UNIX timestamp — only pools created after this |
created_before | integer | UNIX timestamp — only pools created before this |
sort_by | string | volume_24h (default), txns_24h, created_at |
sort_dir | string | asc or desc (default: desc) |
page | integer | 1-indexed (default: 1) |
limit | integer | 1–100 (default: 50) |
results array (not pools) and includes page_info with total_items and total_pages.
Pattern 7: Monitor pool transactions
amount_0,amount_1— token amountsvolume_0,volume_1— volumesprice_0_usd,price_1_usd— USD prices for each tokentoken_0_symbol,token_1_symbol— token symbolstype—swap,add, orremovecreated_at— timestamp
cursor parameter (a transaction ID) instead of page numbers.
Pattern 8: Discover DEXes on a network
Pattern 9: Stream live prices
For real-time updates, use the streaming API instead of polling REST. Single token (GET):p field is a string (not a number) — parse it as a decimal for precision.
Pattern 10: REST + Streaming combined
The most common production pattern:- REST for discovery — use search, token details, and pool listing to find what you want to track
- Validate — confirm the tokens exist and have pricing data via REST
- Stream for live updates — open an SSE connection for real-time prices
- REST for enrichment — periodically call REST for OHLCV history, pool details, or transaction data that streaming doesn’t cover
Quick reference: which endpoint for what?
| I want to… | Endpoint |
|---|---|
| Get a token’s current price | GET /networks/{network}/tokens/{address} → .summary.price_usd |
| Get multiple token prices at once | GET /networks/{network}/multi/prices?tokens=a,b,c |
| Find a token I don’t have the address for | GET /search?query={name_or_symbol} |
| See top pools by volume | GET /networks/{network}/pools?order_by=volume_usd&sort=desc |
| Find pools for a specific token | GET /networks/{network}/tokens/{address}/pools |
| Filter pools by volume/txns/age | GET /networks/{network}/pools/filter?volume_24h_min=X |
| Get historical candlestick data | GET /networks/{network}/pools/{pool}/ohlcv?start=X&interval=24h |
| See recent swaps on a pool | GET /networks/{network}/pools/{pool}/transactions |
| List DEXes on a network | GET /networks/{network}/dexes |
| Get pools on a specific DEX | GET /networks/{network}/dexes/{dex}/pools |
| Stream live prices | GET https://streaming.dexpaprika.com/stream?method=t_p&chain=X&address=Y |
| Get API stats | GET /stats |
FAQs
Why do I get an empty array from batch pricing?
Why do I get an empty array from batch pricing?
If all requested tokens are unknown or don’t have pricing data, you get HTTP 200 with an empty array — not an error. Verify the token addresses are correct.
Why does the filter endpoint return different field names than pool listing?
Why does the filter endpoint return different field names than pool listing?
The filter endpoint (
/pools/filter) uses address (not id), volume_usd_24h (not volume_usd), and txns_24h (not transactions). The response uses a results array (not pools). These are different schemas optimized for different use cases.How do I get OHLCV for a token that's in many pools?
How do I get OHLCV for a token that's in many pools?
Use the highest-volume pool — it has the most representative pricing. Find it by calling the token pools endpoint sorted by
volume_usd descending with limit=1.