# DexPaprika API
> This file is very large and may be truncated. For an index of this content, please refer to https://docs.dexpaprika.com/llms.txt instead.
> Real-time DEX and on-chain cryptocurrency data: liquidity pools, swaps, token prices, transactions, and live SSE streams (token prices, pool reserves, transactions and candles) across 35 blockchain networks. REST API + streaming, no API key needed to start.
# About us & media kit
Source: https://docs.dexpaprika.com/about
Learn what DexPaprika does, our connection to CoinPaprika, and download our media kit with logos and icons.
## What we do
DexPaprika gives you clear, reliable DEX data, live and historical, so you can build with confidence. We bring together on-chain markets across major networks to power dashboards, trading systems, research, and AI agents.
* We're a team based in Poznań, Poland, with years of crypto data experience
* Our API gives fast access to tokens, pools, and DEX activity
* Developer-first docs, SDKs, and examples
* Consistent schema across supported blockchains
## Backed by CoinPaprika
DexPaprika is built by the team behind CoinPaprika, a crypto data platform trusted since 2018. We started DexPaprika to offer a lightweight, purpose-built layer for DEX markets, backed by CoinPaprika’s reliability and uptime.
* Our parent company: [CoinPaprika](https://coinpaprika.com)
## Media kit
Download our branding kit with logos and icons for press and integration use.
* **Media pack**: [Download media_pack.zip](https://dexpaprika.com/media_pack_dexpaprika.zip)
### FAQs
> [accordion] Is DexPaprika data public to use?
>
> Yes. You can call it keyless at 10,000 credits per rolling 30 days, and a free registered key raises that to 100,000. Paid plans are on [pricing](https://dexpaprika.com/api/pricing).
> [accordion] How is DexPaprika related to CoinPaprika?
>
> DexPaprika is built by the CoinPaprika team to focus specifically on on-chain DEX markets.
> [accordion] Where can I find brand assets?
>
> Use the media pack above; it contains logos and icons for press/integrations.
# Brand assets
Source: https://docs.dexpaprika.com/ai-integration/brand-assets
DexPaprika logos, colors, and the downloadable brand kit. Everything you need to use the DexPaprika mark correctly in an article, app, listing, or integration.
Use these when you write about, integrate, or list DexPaprika. The whole kit
(logos, symbol, app icons, social banner, and usage rules) is one download, and
every logo is also linked individually below for direct use.
> [card] [Download the brand kit (v1.0)](https://github.com/coinpaprika/dexpaprika-mcp/releases/download/brand-kit-v1.0/dexpaprika-brand-kit-v1.0.zip)
>
> Logos (color / white / black), the symbol in four variants, favicon and app
> icons, a social banner, and the full README rulebook. SVG + PDF + PNG.

## Colors
| Role | HEX | RGB |
| - | - | - |
| DexPaprika Green | `#00FF75` | 0, 255, 117 |
| White | `#FFFFFF` | 255, 255, 255 |
| Ink (logo black) | `#1C1C1C` | 28, 28, 28 |
| Dark surface | `#252425` | 37, 36, 37 |
Green is the brand. Use it for the pepper, the PAPRIKA wordmark, accents, and
CTAs. It is made for dark backgrounds; on light backgrounds pair it with ink.
## Which file do I use
| Your background | Logo | Symbol |
| - | - | - |
| Dark | [logo-color](/images/brand/dexpaprika-logo-color.svg) (primary) | [symbol-color-on-dark](/images/brand/dexpaprika-symbol-color-on-dark.svg) |
| Light / white | [logo-black](/images/brand/dexpaprika-logo-black.svg) | [symbol-color-on-light](/images/brand/dexpaprika-symbol-color-on-light.svg) |
| Single-color (dark) | [logo-white](/images/brand/dexpaprika-logo-white.svg) | [symbol-white](/images/brand/dexpaprika-symbol-white.svg) |
| Single-color (light) | [logo-black](/images/brand/dexpaprika-logo-black.svg) | [symbol-black](/images/brand/dexpaprika-symbol-black.svg) |
The primary logo is `dexpaprika-logo-color` (white DEX + green PAPRIKA), used on
dark backgrounds by default. SVG is the master; use it wherever you can.
## Logo and symbol
> [card] Full logo
>
> The symbol plus the DEXPAPRIKA wordmark. The default is the color logo (white DEX, green PAPRIKA), shown here on its dark surface. For light backgrounds use [logo-black](/images/brand/dexpaprika-logo-black.svg).
>
> 
> [card] Symbol
>
> The pepper-in-brackets mark alone, for avatars, app icons, and tight spaces.
>
> 
## Clear space and minimum size
* **Clear space:** keep empty space around the logo equal to the height of one
bracket corner (roughly the cap-height of the DEXPAPRIKA letters).
* **Minimum size:** full logo no smaller than 120px wide on screen (25mm print);
symbol no smaller than 24px. For anything smaller, use the app icons in the kit.
## Do and don't
> [!NOTE]
>
> **Do** use the SVG, match the logo to the background, and keep clear space.
> **Don't** recolor the green, stretch, rotate, add effects, place the logo on a
> busy or low-contrast background, separate the pepper from its brackets, or
> re-typeset the wordmark. There is no separate brand typeface: the wordmark is
> vector artwork inside the logo files.
## Using the DexPaprika name and logo
DexPaprika provides free DEX and on-chain data across 35 chains. You are welcome
to use these marks to link to or credit DexPaprika as a data source. Please do
not imply partnership or endorsement without permission. Questions: contact our
Lead Developer Advocate Mateusz Sroka at [msroka@coinpaprika.com](mailto:msroka@coinpaprika.com).
# Connect DexPaprika to ChatGPT
Source: https://docs.dexpaprika.com/ai-integration/chatgpt-actions
Give ChatGPT live DEX market data from DexPaprika. Add it as a custom GPT Action (works on any paid plan, keyless) or as a native MCP connector in ChatGPT Developer Mode (beta).
There are two ways to give ChatGPT live DexPaprika data. Start with **GPT Actions**: it works on any paid ChatGPT plan, needs no API key, and is generally available. The **native MCP connector** is a second option, but it is a beta feature behind ChatGPT Developer Mode.
## Option 1: Custom GPT with an Action (recommended)
A custom GPT with a DexPaprika Action queries networks, pools, tokens, and search from inside a ChatGPT conversation. Keyless, no beta.
> [!NOTE]
>
> Ready-to-use OpenAPI schema: [`https://mcp.dexpaprika.com/openapi`](https://mcp.dexpaprika.com/openapi). It exposes **12 GET operations** (networks, pools, DEXes, pool details, OHLCV, transactions, token details, top tokens, batch prices, search, stats). All but transactions run keyless with no authentication; transactions need your own Dev, Pro or Enterprise key and answer `401` without one.
**Prerequisites:** a paid ChatGPT plan (Plus, Pro, Team, or Enterprise). Custom GPTs are built on the web at [chatgpt.com](https://chatgpt.com); you cannot build one from the mobile app.
**1. Create a custom GPT**
On the web, open **Explore GPTs**, click **Create**, then open the **Configure** tab. Give it a name (for example "DexPaprika Crypto Assistant") and an instruction like:
```
You are a cryptocurrency and DeFi data assistant powered by DexPaprika. You can
query blockchain networks, DEXes, liquidity pools, token prices, OHLCV history,
and cross-chain search. Always call the action for live data rather than
guessing, and include metrics like liquidity, 24h volume, and price when
relevant.
```
**2. Add the DexPaprika action**
Scroll to **Actions** and click **Create new action**. In the **Schema** field, choose **Import from URL** and paste:
```
https://mcp.dexpaprika.com/openapi
```
The builder lists the operations by `operationId`.
**3. Set authentication to None**
DexPaprika is keyless and read-only, so set **Authentication** to **None**. Optionally add a privacy policy URL ([dexpaprika.com/privacy-policy](https://dexpaprika.com/privacy-policy)) if the builder asks for one.
**4. Test and save**
Click **Test** on an operation, then try a prompt like "What are the top 5 liquidity pools on Ethereum by volume?". When it returns live data, **Save** the GPT and choose its visibility.
> [!TIP]
>
> Building GPTs is web-only, and some ChatGPT mobile builds have had trouble firing Actions. If an Action does not respond on mobile, test it on desktop web.
***
## Option 2: Native MCP connector (Developer Mode, beta)
ChatGPT can connect directly to our hosted MCP server as a custom connector. This exposes all 18 DexPaprika tools, but it is a **beta feature** and the setup UI changes between releases.
> [!WARNING]
>
> As of 2026-07, custom MCP connectors live in **ChatGPT Developer Mode (beta)** and require a **paid plan** (Plus, Pro, Business/Team, Enterprise, or Edu). Free ChatGPT cannot add custom connectors. On workspace plans, an admin may need to enable Developer Mode first. The exact menu labels move between releases, so treat the steps below as a guide and confirm the current labels in-product.
1. Open **Settings → Connectors**, find the **Advanced** area, and enable **Developer mode**.
2. In the Connectors panel, choose **Create / Add custom connector**.
3. Paste the DexPaprika MCP server URL: `https://mcp.dexpaprika.com/sse`. If your Developer Mode build expects a Streamable HTTP endpoint instead, use `https://mcp.dexpaprika.com/streamable-http`. (Do not use `/mcp`.)
4. Set **Authentication** to **No authentication**, accept the trust confirmation, and save.
5. The DexPaprika tools then appear in chat.
> [!NOTE]
>
> This is a general chat connector, not a Deep Research or Company Knowledge connector. Those require an MCP server to implement `search` and `fetch` tools in OpenAI's document-retrieval shape; DexPaprika has a `search` tool but no `fetch`, so it works through Developer Mode rather than those modes.
***
## Example prompts
Once connected either way, try:
* "Which blockchain networks does DexPaprika support?"
* "What are the most liquid USDC/ETH pools across all networks?"
* "What's the current price of SOL, and which DEX has the deepest liquidity for it?"
* "Find newly created pools on Base with high trading volume"
* "Compare 24h volume on PancakeSwap versus Uniswap"
* "Get hourly OHLCV for the last day for the USDC/ETH pool on Uniswap V3"
***
## Troubleshooting
> [accordion] The Action imports but returns errors
>
> Confirm the schema URL is exactly `https://mcp.dexpaprika.com/openapi`, that your plan supports custom GPTs (any paid plan), and that authentication is set to None. Recreate the Action if the import failed midway.
> [accordion] The Action does not fire on mobile
>
> Build and test on desktop web. Some ChatGPT mobile builds have not reliably triggered Actions.
> [accordion] I can't find Developer Mode / custom connectors
>
> It is a paid-plan beta and Free cannot add custom connectors. On workspace plans, an admin enables Developer Mode first. The toggle has moved between releases; look under Settings, Connectors, then an Advanced area.
## FAQs
> [accordion] Which method should I use?
>
> Use a custom GPT with an Action. It works on any paid plan, needs no API key, and is not a beta feature. Use the native MCP connector only if you are in ChatGPT Developer Mode and want all 20 tools directly in chat.
> [accordion] Do I need an API key?
>
> No. Both paths are keyless. The OpenAPI schema and the MCP server are public and read-only. The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server). Limits for direct REST calls are on [rate limits](/knowledge-base/rate-limits).
> [accordion] Can I use DexPaprika as a ChatGPT Deep Research connector?
>
> Not as-is. Deep Research connectors require `search` and `fetch` tools in OpenAI's document-retrieval schema. DexPaprika has `search` but no `fetch`, so it connects through Developer Mode instead.
# DexPaprika Claude Code plugin - Quick setup guide
Source: https://docs.dexpaprika.com/ai-integration/claude-code-plugin-guide
Install the DexPaprika Claude Code plugin with two simple commands. Access real-time DEX data, liquidity pools, and token prices directly in Claude Code. Integrated MCP server with zero additional setup required.
## Tutorial overview
Get instant access to real-time DeFi data in Claude Code. The DexPaprika Claude Code plugin provides built-in access to decentralized exchanges, liquidity pools, and token pricing, all with just two commands.
> [!NOTE]
>
> The DexPaprika plugin is a **Claude Code plugin** with built-in MCP server access. Two commands. Zero additional setup. Real-time DEX data ready to use.
***
## What is the DexPaprika Claude Code plugin?
The DexPaprika plugin is a native Claude Code plugin that gives you instant access to real-time decentralized exchange (DEX) data, liquidity pool analytics, and token pricing information across 35 blockchain networks.
**Key features:**
* Real-time DEX and pool data access
* Token pricing and market analytics
* Liquidity pool information
* Coverage across 35 blockchain networks
* Built-in MCP server (no separate installation needed)
* Works in Claude Desktop and Cursor IDE
* Keyless to start: query without an API key, and [register a free key](https://console.dexpaprika.com) later to raise the allowance from 10,000 credits to 100,000
***
## Quick installation (2 commands)
### Step 1: Add the CoinPaprika marketplace
```bash theme={null}
/plugin marketplace add coinpaprika/claude-marketplace
```
This adds access to the CoinPaprika marketplace where the DexPaprika plugin is hosted.
### Step 2: Install the DexPaprika plugin
```bash theme={null}
/plugin install dexpaprika
```
Select **"Install now"** when prompted.
The plugin bundles the MCP server, so there are no config files, environment variables, or API keys to set up. You now have real-time DeFi data across 35 networks in Claude Code.
***
## Using the plugin
Once installed, you can ask Claude about DeFi data naturally:
### Example queries
**Get pool information:**
```
What are the top liquidity pools on Ethereum by volume?
```
**Find token prices:**
```
Show me the current price of USDC and USDT on Ethereum.
```
**Analyze specific pools:**
```
Tell me about the USDC/ETH pool on Uniswap V3.
```
**Discover networks:**
```
What blockchain networks are supported by DexPaprika?
```
**Search for tokens:**
```
Find all pools that include the PEPE token.
```
Claude will automatically use the plugin to fetch real-time data and provide you with current market information.
***
## What's included in the plugin
The DexPaprika plugin gives Claude access to:
### Network information
* List of supported blockchain networks
* Network metadata and specifications
### Decentralized exchanges (DEXes)
* Available DEXes on each network
* DEX volume and activity data
* Protocol information
### Liquidity pools
* Top pools by volume, price, transactions
* Detailed pool metrics and token pairs
* Pool fee structures
* Recent transaction history (with your own Dev or Pro key)
### Token data
* Current token prices in USD
* Market data and liquidity information
* Trading volume (5m, 15m, 1h, 6h, 24h)
* Token metadata and explorer links
### Search functionality
* Find tokens, pools, and DEXes across networks
* Search by name, symbol, or address
***
## Verify installation
After installing the plugin, you can check that it's working:
### Check available commands
```
/help
```
You should see the DexPaprika plugin listed among available commands.
### Test with a simple query
```
What networks does DexPaprika support?
```
Claude should return a list of supported blockchain networks (Ethereum, Solana, Base, Arbitrum, Polygon, etc.).
***
## Managing the plugin
### View installed plugins
```
/plugin
```
Select "Manage Plugins" to see all installed plugins and their status.
### Enable/disable the plugin
```
/plugin disable dexpaprika@coinpaprika
```
Disable the plugin if you want to reduce context usage, but keep it installed.
```
/plugin enable dexpaprika@coinpaprika
```
Re-enable the plugin when you need it again.
### Uninstall the plugin
```
/plugin uninstall dexpaprika@coinpaprika
```
Completely remove the plugin if you no longer need it.
### Update the plugin
```
/plugin marketplace update coinpaprika/claude-marketplace
```
Keep the plugin up-to-date with the latest features and improvements.
***
## Practical use cases
### Portfolio monitoring
Ask Claude to track your tokens:
```
Monitor these tokens on Ethereum:
- WETH (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
- USDC (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)
- DAI (0x6b175474e89094c44da98b954eedeac495271d0f)
Show their current prices and highest volume pools.
```
### DEX comparison
```
Compare trading volumes on Uniswap and Curve across Ethereum and Polygon.
Which DEX has higher volume? Which pools are most active?
```
### Market research
```
On Solana, what are the top 10 liquidity pools by 24h volume?
For each pool, show token pairs, current price, volume in USD, and liquidity.
```
### Token discovery
```
Find emerging tokens on Base network.
Show the ones created recently with highest trading volume.
```
***
## How it works
The DexPaprika Claude Code plugin:
1. **Installs via the marketplace** - `/plugin install dexpaprika`
2. **Includes built-in MCP server access** - No separate MCP configuration needed
3. **Connects to DexPaprika API** - Fetches real-time DEX and token data
4. **Provides data to Claude** - Claude uses the data to answer your questions
5. **Returns formatted results** - Get market analysis, pool data, pricing information
The MCP server is **built into the plugin**, so you don't need to install or configure it separately.
***
## Troubleshooting
### Plugin not showing up
**Problem:** After installing, you don't see the DexPaprika plugin in `/help`
**Solution:**
1. Run `/plugin marketplace update coinpaprika/claude-marketplace`
2. Restart Claude Code
3. Run `/plugin install dexpaprika` again
### Claude not using the plugin
**Problem:** You ask about DEX data but Claude doesn't use the plugin
**Solution:**
* Ask explicitly: "Using DexPaprika, show me..."
* Or phrase questions about pools, tokens, and DEXes specifically
* Claude automatically recognizes plugin-relevant queries
### Plugin commands not working
**Problem:** `/plugin` commands not recognized
**Solution:**
* Ensure you're in Claude Code (not another terminal)
* Check that you're using the correct syntax: `/plugin install dexpaprika`
* Verify marketplace is added: `/plugin marketplace add coinpaprika/claude-marketplace`
### No data returned
**Problem:** Claude can't find data for your query
**Solution:**
* Check the network name (use lowercase: `ethereum`, `solana`, not `Ethereum`)
* Verify token address format for your blockchain
* Some tokens may not have pricing data; try with major tokens (WETH, USDC, DAI)
***
## Integration with CoinPaprika plugin
The same marketplace also hosts the **CoinPaprika plugin** for global cryptocurrency market data.
**Install both for complete crypto coverage:**
```bash theme={null}
/plugin install dexpaprika
/plugin install coinpaprika
```
**What you get:**
* **DexPaprika plugin** - DEX pools, on-chain liquidity, tokens on specific networks
* **CoinPaprika plugin** - Global crypto rankings, market cap, exchange data
Use them together to compare DEX prices with exchange prices and find arbitrage opportunities.
***
## Next steps
> [card] [API Reference](/api-reference/introduction)
>
> Explore the complete DexPaprika API documentation for all available data.
> [card] [Batch Token Prices](/tutorials/batch-token-prices)
>
> Learn how to efficiently fetch prices for multiple tokens.
> [card] [Fetch Token Prices](/tutorials/fetch-token-price)
>
> Step-by-step guide to querying token data via the API.
> [card] [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
>
> Learn more about Claude Code plugins and marketplaces.
***
## Get support
> [card] [Join Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support.
> [card] [Give Feedback](mailto:support@coinpaprika.com)
>
> Share your experience and help us improve the plugin.
### FAQs
> [accordion] How do I install the DexPaprika plugin?
>
> Two commands:
>
> 1. `/plugin marketplace add coinpaprika/claude-marketplace`
> 2. `/plugin install dexpaprika`
>
> No configuration files or environment setup needed.
> [accordion] Do I need an API key?
>
> No. Public read access is keyless, so you can start querying without authentication.
> [accordion] Does the plugin work in Cursor IDE?
>
> Yes. The plugin works in both Claude Desktop and Cursor IDE.
> [accordion] What's the difference between this plugin and the MCP server?
>
> The **Claude Code plugin** is the easy way to get started, just install and use. It includes built-in access to the MCP server. If you need advanced MCP configuration, you can set up the MCP server separately for more control, but the plugin handles this for you automatically.
> [accordion] Can I disable the plugin without uninstalling?
>
> Yes. Run `/plugin disable dexpaprika@coinpaprika` to turn it off, then `/plugin enable dexpaprika@coinpaprika` to turn it back on.
> [accordion] How often is the plugin updated?
>
> The plugin receives updates automatically from the marketplace. Run `/plugin marketplace update coinpaprika/claude-marketplace` to check for updates.
> [accordion] What networks are supported?
>
> 35 networks including Ethereum, Solana, Base, Arbitrum, Polygon, Optimism, Fantom, Avalanche, Binance Smart Chain, and more. Ask Claude: "What networks are supported?"
> [accordion] Can I use both DexPaprika and CoinPaprika plugins together?
>
> Yes! Install both for comprehensive crypto data:
>
> * `DexPaprika` - DEX and on-chain pool data
> * `CoinPaprika` - Global market cap and exchange data
> [accordion] What if Claude doesn't use the plugin automatically?
>
> Ask explicitly: "Using DexPaprika, show me..." or phrase your question about pools, tokens, and DEXes specifically.
> [accordion] Is the plugin secure?
>
> The plugin only makes read-only API calls to public DexPaprika endpoints. No private data is transmitted. All queries are logged per standard Anthropic policy.
# Connect DexPaprika MCP to Codex
Source: https://docs.dexpaprika.com/ai-integration/codex
Add the DexPaprika MCP server to OpenAI Codex CLI with one command. Give Codex live DEX market data across 35 blockchains over streamable HTTP. No API key needed to start.
[OpenAI Codex CLI](https://github.com/openai/codex) supports MCP servers, so you can give it live DEX market data from DexPaprika. The hosted server is keyless, so there is no API key or token to configure.
## Add it with one command
```bash theme={null}
codex mcp add dexpaprika --url https://mcp.dexpaprika.com/streamable-http
```
This writes the server to `~/.codex/config.toml`. Codex connects to it over streamable HTTP on the next run.
## Or configure it manually
Add this to `~/.codex/config.toml`:
```toml theme={null}
[mcp_servers.dexpaprika]
url = "https://mcp.dexpaprika.com/streamable-http"
```
No `bearer_token_env_var` or OAuth options are needed. The DexPaprika API is keyless.
## Verify
Start Codex and ask a question that needs live data:
```
Which blockchain networks does DexPaprika support, and what are the top pools on Base by volume?
```
Codex should call the DexPaprika tools and return current data. List configured servers any time with:
```bash theme={null}
codex mcp list
```
## What you get
The server exposes 20 tools covering networks, pools, tokens, OHLCV, transactions, and cross-chain search. See the [MCP tools reference](/ai-integration/mcp-tools) for the full list, parameters, and the `getCapabilities` onboarding tool.
## Resources
* [Hosted MCP server](/ai-integration/hosted-mcp-server)
* [MCP tools reference](/ai-integration/mcp-tools)
* [Codex CLI](https://github.com/openai/codex)
## FAQs
> [accordion] Do I need an API key for Codex?
>
> No. The hosted DexPaprika MCP server is keyless, so there is no token or OAuth to configure. The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server). Limits for direct REST calls are on [rate limits](/knowledge-base/rate-limits).
> [accordion] Which transport does Codex use?
>
> Streamable HTTP. Point Codex at `https://mcp.dexpaprika.com/streamable-http`. The same server also serves SSE (`/sse`) for clients that prefer it.
> [accordion] How do I remove the server?
>
> Delete the `[mcp_servers.dexpaprika]` block from `~/.codex/config.toml`, or run `codex mcp` to manage configured servers.
# Use DexPaprika with CrewAI
Source: https://docs.dexpaprika.com/ai-integration/crewai
Give a CrewAI agent live DEX market data by connecting the keyless DexPaprika hosted MCP server with MCPServerAdapter. All 20 tools, zero custom code.
CrewAI can use DexPaprika's live DEX data with no custom tool code: its `MCPServerAdapter` connects to our hosted MCP server and hands all 20 tools to your agents. Keyless, no signup.
## Install
```bash theme={null}
pip install 'crewai-tools[mcp]'
```
## Connect the hosted MCP server
`MCPServerAdapter` pulls the tools from `https://mcp.dexpaprika.com/sse` and exposes them as native CrewAI tools:
```python theme={null}
from crewai import Agent, Task, Crew, Process
from crewai_tools import MCPServerAdapter
server = {"url": "https://mcp.dexpaprika.com/sse", "transport": "sse"}
with MCPServerAdapter(server, connect_timeout=60) as tools:
analyst = Agent(
role="DeFi Market Analyst",
goal="Answer on-chain DEX questions with live data",
backstory="Expert in liquidity and trading across 35 chains.",
tools=tools,
)
task = Task(
description="Find the top WETH pools on ethereum and report their 24h volume.",
expected_output="A short list of pools with 24h volume.",
agent=analyst,
)
Crew(agents=[analyst], tasks=[task], process=Process.sequential).kickoff()
```
The `with` block keeps the MCP connection open for the crew's run and closes it afterward. Use the `/sse` transport; it is the tested default.
## Tools and the rationale field
All 18 DexPaprika tools appear as CrewAI tools: networks, pools, tokens, OHLCV, transactions, and cross-chain search. See the [MCP tools reference](/ai-integration/mcp-tools) for the full list.
Every read tool takes a required `rationale` string (1-2 sentences on why you are calling it). It is part of each tool's schema, so a capable model fills it automatically. If a smaller model returns validation errors, prompt it to include a short rationale.
## Resources
* [CrewAI documentation](https://docs.crewai.com)
* [Hosted MCP server](/ai-integration/hosted-mcp-server)
* [MCP tools reference](/ai-integration/mcp-tools)
## FAQs
> [accordion] Do I need an API key?
>
> No. The hosted server is keyless for read access. The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server). Limits for direct REST calls are on [rate limits](/knowledge-base/rate-limits).
> [accordion] Which transport should I use?
>
> Use SSE (`https://mcp.dexpaprika.com/sse`) with CrewAI. The server also serves streamable HTTP, but SSE is the tested path through `MCPServerAdapter`.
> [accordion] Do I have to write any tool code?
>
> No. `MCPServerAdapter` discovers the tools from the server, so you get all 18 without defining any yourself.
# Connect DexPaprika MCP to Cursor
Source: https://docs.dexpaprika.com/ai-integration/cursor-ide-integration
Learn how to integrate DexPaprika documentation and MCP server directly into Cursor IDE for enhanced development workflows with real-time crypto data access.
## Integration overview
Connect Cursor IDE to DexPaprika via the hosted MCP server and add docs for rich AI context.
## What is Cursor IDE?
Cursor is a powerful AI-first code editor built on top of VS Code that provides advanced AI assistance for developers. With its built-in Claude integration and MCP (Model Context Protocol) support, Cursor can access external data sources and documentation to provide more intelligent coding assistance.
## Why integrate DexPaprika with Cursor?
Integrating DexPaprika documentation and data with Cursor IDE provides several powerful benefits:
* **Real-time crypto data access** - Get live market data, pool information, and token prices while coding
* **Enhanced AI assistance** - Cursor's AI can reference DexPaprika documentation and data for better code suggestions
* **DeFi development workflow** - Build DeFi applications with direct access to comprehensive blockchain data
* **Documentation context** - AI can reference our API docs, tutorials, and examples while helping you code
***
## Step 1: Install with one click
> [card] [Add DexPaprika to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=DexPaprika\&config=eyJuYW1lIjoiRGV4UGFwcmlrYSIsInVybCI6Imh0dHBzOi8vbWNwLmRleHBhcHJpa2EuY29tL3NzZSJ9Cg==)
>
> Opens Cursor and pre-fills the DexPaprika MCP server (`https://mcp.dexpaprika.com/sse`). Click **Install**, then restart Cursor if prompted.
Prefer to configure it manually? Follow the steps below.
**1. Configure MCP Server URL**
1. The button will open Cursor IDE (if not already open)
2. In the MCP server configuration dialog, enter the DexPaprika MCP server URL:
```
https://mcp.dexpaprika.com/sse
```
3. Click "Install" to complete the setup
4. Restart Cursor if prompted to complete the setup

**2. Verify MCP Integration**
1. Open a new chat with Claude in Cursor (Cmd/Ctrl + L)
2. Ask a question like: "What are the top liquidity pools on Ethereum?"
3. You should see DexPaprika data being retrieved and displayed
4. Try asking about specific networks, tokens, or pools to test the integration

> [!NOTE]
>
> **Can't find the button?** The "Connect to Cursor" button appears on pages where MCP integration is relevant. If you don't see it, you can also manually configure the MCP server using the method below.
## Step 2: Add documentation context
Once you have the MCP server installed, enhance your development experience by adding our documentation to your Cursor workspace for full API reference indexing.
**1. Open Cursor settings**
1. In Cursor, go to **Settings** (Cmd/Ctrl + ,)
2. Navigate to **Indexing & Docs** in the left sidebar
3. This section allows you to add custom documentation for AI context

**2. Add DexPaprika documentation**
1. In the **Docs** section, click **"+ Add Doc"**
2. Fill out the documentation details:
* **Name**: "DexPaprika API Reference"
* **URL**: [https://docs.dexpaprika.com/api-reference/introduction](https://docs.dexpaprika.com/api-reference/introduction)
3. Click **"Add"** to complete the setup
4. This will index our full API reference for AI context

> [!TIP]
>
> **Pro tip:** Using the URL [https://docs.dexpaprika.com/api-reference/introduction](https://docs.dexpaprika.com/api-reference/introduction) ensures Cursor indexes our complete API reference, giving you access to all endpoints, parameters, and examples in your AI conversations.
## Manual MCP server configuration
If you can't find the "Connect to Cursor" button or prefer manual setup, you can configure the MCP server manually by following our [hosted MCP server guide](/ai-integration/hosted-mcp-server).
> [!NOTE]
>
> **Need help with manual setup?** Our hosted MCP server guide provides detailed instructions for configuring the DexPaprika MCP server in Cursor, Claude Desktop, and other MCP-compatible tools.
***
## Available features
Once integrated, you can access comprehensive DexPaprika functionality within Cursor:
### Real-time data access
* **Network information** - Get details about supported blockchain networks
* **DEX data** - Access decentralized exchange information and metrics
* **Pool analytics** - Real-time liquidity pool data, volumes, and fees
* **Token information** - Current prices, market data, and token details
* **Search functionality** - Find tokens, pools, and DEXes across networks
### Documentation context
* **API reference** - Complete endpoint documentation and examples
* **SDK guides** - Language-specific integration tutorials
* **Best practices** - Coding patterns and optimization tips
* **Troubleshooting** - Common issues and solutions
***
## Usage examples
### Example 1: Building a DeFi dashboard
Ask Cursor to help you build a DeFi dashboard with real-time data:
```
"Help me create a React component that displays the top 5 liquidity pools
on Ethereum using the DexPaprika API. Include volume, TVL, and price data."
```
Cursor can now:
* Reference our API documentation for correct endpoint usage
* Provide real-time pool data for testing
* Suggest optimal data fetching patterns
* Help with error handling and loading states
### Example 2: Token price monitoring
Create a price monitoring application:
```
"Build a Python script that monitors SOL token prices across different
DEXes and alerts when there are significant price differences."
```
Cursor can:
* Access real-time SOL price data from multiple DEXes
* Reference our historical data tutorials
* Suggest efficient polling strategies
* Help implement price comparison logic
### Example 3: Pool discovery bot
Develop a new pool discovery system:
```
"Create a Node.js application that finds newly created liquidity pools
with high trading volume and sends notifications."
```
Cursor can:
* Use our pool discovery endpoints
* Reference our "Find New Pools" tutorial
* Provide real-time pool data for testing
* Help with notification system implementation
***
***
## Troubleshooting
> [accordion] MCP server connection issues
>
> **Symptoms**: Cursor shows connection errors or timeouts.
>
> **Solutions**:
>
> 1. Verify internet connection is stable
> 2. Check that the MCP server URL is correct: `https://mcp.dexpaprika.com/sse`
> 3. Restart Cursor completely
> 4. Try removing and re-adding the MCP server configuration
> 5. Check Cursor's console for detailed error messages
> [accordion] Documentation not loading
>
> **Symptoms**: Cursor's AI doesn't reference DexPaprika documentation.
>
> **Solutions**:
>
> 1. Ensure documentation files are in your workspace
> 2. Enable "Use workspace files as context" in AI settings
> 3. Try asking more specific questions about our API
> 4. Restart Cursor to refresh context
> [accordion] Slow response times
>
> **Symptoms**: Cursor takes a long time to respond with DexPaprika data.
>
> **Solutions**:
>
> 1. Check your internet connection speed
> 2. Try breaking complex queries into smaller parts
> 3. Use specific network/token names in your queries
> 4. Consider using the hosted MCP server for better performance
> [accordion] Authentication issues
>
> **Symptoms**: Getting authentication or permission errors.
>
> **Solutions**:
>
> 1. DexPaprika API is publicly accessible - no authentication required
> 2. Check if your network has firewall restrictions
> 3. Try using the hosted MCP server instead of local installation
> 4. Contact support if issues persist
***
## Best practices
### For optimal performance
1. **Use specific queries** - Instead of "show me all pools", ask for "top 5 USDC/ETH pools on Ethereum"
2. **Cache frequently used data** - Store common queries locally to reduce API calls
3. **Handle errors gracefully** - Implement proper error handling for network issues
4. **Watch your credit spend** - one request costs one credit against 10,000 per rolling 30 days keyless, and the [DexPaprika console](https://console.dexpaprika.com) shows what you have used this month
### For better AI assistance
1. **Provide context** - Tell Cursor what you're building and your goals
2. **Reference documentation** - Ask Cursor to explain concepts from our docs
3. **Iterate on solutions** - Ask follow-up questions to refine the code
4. **Test with real data** - Use actual DexPaprika data in your development
***
## What's next?
> [card] [API Documentation](/api-reference/introduction)
>
> Explore all available endpoints and their capabilities
> [card] [SDK Integration](/get-started/sdk-ts)
>
> Learn how to use our official SDKs in your projects
> [card] [Find New Pools](/tutorials/find-new-pools)
>
> Discover newly created liquidity pools and tokens
> [card] [Historical Data](/tutorials/retrieve-historical-data)
>
> Access and analyze historical price and volume data
> [card] [Hosted MCP Server](/ai-integration/hosted-mcp-server)
>
> Zero-setup MCP integration for instant access
> [card] [ChatGPT Actions](/ai-integration/chatgpt-actions)
>
> Integrate DexPaprika data with ChatGPT
## Need help?
> [card] [Join Our Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community for real-time support and discussions
> [card] [Direct Support](mailto:support@coinpaprika.com)
>
> Contact our team for technical assistance and custom integrations
> [!NOTE]
>
> **Building something amazing?** Share your Cursor + DexPaprika integrations with our community! We love seeing what developers build with our tools. [Reach out](mailto:support@coinpaprika.com) to showcase your work.
### FAQs
> [accordion] How do I add the MCP server if the button is missing?
>
> Manually add `https://mcp.dexpaprika.com/sse` via Cursor settings → Tools & Integrations → New MCP server.
> [accordion] The AI is not referencing the docs. What now?
>
> Add [https://docs.dexpaprika.com/api-reference/introduction](https://docs.dexpaprika.com/api-reference/introduction) under Indexing & Docs and enable workspace context.
> [accordion] How to troubleshoot connection issues?
>
> Restart Cursor, re-add the server, and verify the URL; check the developer console for detailed errors.
# DexPaprika Hosted MCP Server
Source: https://docs.dexpaprika.com/ai-integration/hosted-mcp-server
Access real-time DeFi data in Claude, Cursor, and other MCP-compatible tools without any installation or setup. Our hosted MCP server provides instant access to comprehensive DEX data across 35 blockchains.
## Integration overview
Use the hosted MCP server URL to enable streaming DeFi data in Claude, Cursor, and other MCP clients.
> [!NOTE]
>
> Having trouble connecting? We're here to help - [reach out](mailto:support@coinpaprika.com) and we'll get you up and running.
## Why use our hosted MCP server?
Skip installation entirely. The hosted MCP server is a keyless URL you drop into any MCP client to query live DeFi data across 35 networks.
**What you get instantly:**
* **Zero setup required** - just add the URL to your config
* **Multiple transport options** - SSE, streamable HTTP, and JSON-RPC support
* **Always up-to-date** - we run the server, handle updates, and index new pools
* **Keyless to start** - query without an API key or signup, at 10,000 credits per rolling 30 days per IP
* **Live market data** - current prices, volumes, and pool information
* **35 blockchain networks** - Ethereum, Solana, Base, Arbitrum, and more
> [!NOTE]
>
> Visit [mcp.dexpaprika.com](https://mcp.dexpaprika.com) to explore our hosted MCP server interface and see the available data before integrating.
***
## Quick integration guide
### Claude desktop setup
Add our hosted MCP server to Claude Desktop in just 2 steps:
**1. Locate your configuration file**
Find your Claude Desktop configuration file:
* **macOS**: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
* **Linux**: `~/.config/Claude/claude_desktop_config.json`
**2. Add the hosted server configuration**
If the file doesn't exist, create it with this content:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"url": "https://mcp.dexpaprika.com/sse"
}
}
}
```
If the file already exists, add our server to the existing `mcpServers` object:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"url": "https://mcp.dexpaprika.com/sse"
}
}
}
```
Save the file and restart Claude Desktop. You're ready to go!
### Cursor setup
**1. Access MCP settings**
1. Open Cursor IDE
2. Go to **Settings** (Cmd/Ctrl + ,)
3. Navigate to **Tools & Integrations**
4. Click **New MCP server**
**2. Configure in mcp.json**
This will open the `mcp.json` file. Add the DexPaprika server configuration:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"url": "https://mcp.dexpaprika.com/sse"
}
}
}
```
Save the file and restart Cursor if needed.
### ChatGPT integration
Want to use DexPaprika data in ChatGPT? You can integrate our API directly into ChatGPT using Actions:
1. **Create a custom GPT** in ChatGPT (requires Plus or Enterprise subscription)
2. **Add our OpenAPI specification** from [mcp.dexpaprika.com/openapi](https://mcp.dexpaprika.com/openapi)
3. **Start asking crypto questions** directly in your ChatGPT conversations
> [!NOTE]
>
> **Ready to set up ChatGPT?** Follow our complete [ChatGPT Actions integration guide](/ai-integration/chatgpt-actions) for step-by-step instructions.
***
## Connection options
Our hosted MCP server supports multiple transport protocols to ensure compatibility with different clients and use cases:
> [accordion] Server-sent events (SSE) - Recommended
>
> **Endpoint:** `https://mcp.dexpaprika.com/sse`
>
> **Best for:** Claude Desktop, Cursor, and most MCP clients\
> **Benefits:** Real-time streaming updates, excellent browser compatibility, automatic reconnection\
> **Use cases:** Live price monitoring, real-time pool updates, continuous market data feeds
>
> This is the recommended option for most users as it provides the smoothest experience with popular AI tools.
> [accordion] Streamable HTTP
>
> **Endpoint:** `https://mcp.dexpaprika.com/streamable-http`
>
> **Best for:** Custom applications, web services, and clients that prefer HTTP streaming\
> **Benefits:** Standard HTTP protocol, works well with firewalls, easier debugging\
> **Use cases:** Integration with existing web infrastructure, corporate environments with strict network policies
>
> Perfect for developers building custom integrations or working in environments where SSE might be restricted.
> [accordion] JSON-RPC over HTTP
>
> **Endpoint:** `https://mcp.dexpaprika.com/json-rpc`
>
> **Best for:** Traditional API integrations, batch processing, simple request-response patterns\
> **Benefits:** Familiar REST-like interface, stateless communication, easy to cache\
> **Use cases:** Periodic data fetching, batch analysis, integration with existing JSON-RPC systems
>
> Ideal for applications that don't need real-time updates and prefer traditional API communication patterns.
> [!TIP]
>
> **Getting started?** Use the SSE endpoint (`https://mcp.dexpaprika.com/sse`) for the best experience with Claude Desktop and Cursor. You can always switch protocols later based on your specific needs.
> [!NOTE]
>
> **Need help choosing?** Visit [mcp.dexpaprika.com](https://mcp.dexpaprika.com) to test different connection methods and see which works best for your setup.
***
## Your own API key, for token OHLCV and pool transactions
Three tools need a Dev, Pro or Enterprise plan, and on the hosted server they run on your key, never on ours. `getTokenOHLCV` returns USD candles for a token, volume-weighted across every pool it trades in on a network (see the [token OHLCV tutorial](/tutorials/token-ohlcv)). `getTokenIndicator` computes RSI, EMA, MACD, Bollinger Bands or VWAP from those token candles (see the [technical indicators tutorial](/tutorials/technical-indicators)); `getPoolIndicator` gives the same for a single pool on every plan with no key. `getPoolTransactions` returns a pool's recent swaps; the [pool transactions endpoint](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages) behind it is paid-only since 30 September 2026. Every other tool works the same with or without a key.
Add the key as the `Authorization` header on your connection to the server, the key on its own. Get it in [console.dexpaprika.com](https://console.dexpaprika.com); plans are on [pricing](https://dexpaprika.com/api/pricing).
> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http dexpaprika https://mcp.dexpaprika.com/streamable-http --header "Authorization: YOUR_API_KEY"
> ```
> [tab] Cursor
>
> In `~/.cursor/mcp.json`:
>
> ```json theme={null}
> {
> "mcpServers": {
> "dexpaprika": {
> "url": "https://mcp.dexpaprika.com/streamable-http",
> "headers": { "Authorization": "YOUR_API_KEY" }
> }
> }
> }
> ```
> [tab] JSON-RPC
>
> ```bash theme={null}
> curl -s https://mcp.dexpaprika.com/json-rpc \
> -H "Content-Type: application/json" \
> -H "Authorization: $DEXPAPRIKA_API_KEY" \
> -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getTokenOHLCV","arguments":{"network":"ethereum","token_address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","start":"-24h","interval":"1h","limit":24}}}'
> ```
* **Reconnect after adding or changing the key.** The server reads it when a session opens, so restart the client or reload the server. JSON-RPC reads it on every request.
* **Errors say what to fix.** With no key the tool answers `DP401_API_KEY_REQUIRED` and calls nothing. A key the API rejects answers `DP401_INVALID_API_KEY`, and a key whose plan does not cover the request answers `DP403_PLAN_REQUIRED`. Agents are told to fall back: to `getPoolOHLCV` or `getPoolIndicator` on the token's most liquid pool for candles and indicators, and to `getPoolDetails` for a pool's transaction counts.
* **The key goes nowhere else.** It is sent only with these three tools' requests to `api-pro.dexpaprika.com`. It is not logged, and it is kept only with your session, which is deleted with it.
* **Clients that cannot set headers**, such as connectors added by URL alone, can use every tool except these three.
***
## Available features
Our hosted MCP server provides comprehensive access to DeFi data:
### Core data access
* **Multi-chain support** - 35 blockchain networks including Ethereum, Solana, Base, Arbitrum, Polygon, and more
* **Real-time prices** - Live token prices and market data
* **Liquidity pools** - Detailed pool information, volumes, and fees
* **DEX analytics** - Trading data across major decentralized exchanges
* **Search functionality** - Find tokens, pools, and DEXes across all networks
> [!NOTE]
>
> Batch token pricing via [`GET /networks/{network}/multi/prices`](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network) for efficient multi-token lookups (up to 10 tokens per request).
### Advanced analytics
* **Historical data** - Price history and trading volumes over time
* **Pool monitoring** - Track new pool creation and liquidity changes
* **Cross-chain comparisons** - Compare prices and liquidity across different networks
* **Volume analysis** - Trading volume trends and patterns
***
## Usage examples
Once configured, you can ask Claude or Cursor powerful questions about DeFi data:
### Example queries you can make
| Category | Example Query |
| - | - |
| **Basic market data** | "What are the top 5 liquidity pools by volume today?" |
| **Network information** | "Which blockchain networks does DexPaprika support?" |
| **Token prices** | "What's the current price of SOL across different DEXes?" |
| **Pool analysis** | "Show me the most liquid USDC/ETH pools across all networks and compare their trading fees" |
| **New opportunities** | "Find newly created liquidity pools in the last 24 hours with volume over \$100k" |
| **Cross-chain comparison** | "Compare ETH prices between Ethereum mainnet and Layer 2 solutions like Arbitrum and Base" |
| **DEX performance** | "Which DEX has the highest trading volume on Solana today?" |
| **Token discovery** | "Search for meme tokens with high trading volume in the last hour" |
| **Arbitrage opportunities** | "Find price differences for USDC across different DEXes on Ethereum" |
> [!TIP]
>
> **Want to explore more?** Visit [mcp.dexpaprika.com](https://mcp.dexpaprika.com) to test the interface, check out our [tutorials](/tutorials/tutorial_intro) for step-by-step guides, or browse the [API documentation](/api-reference/introduction) for technical details.
***
## Benefits over self-hosted solutions
| Feature | Hosted MCP | Self-Hosted MCP |
| - | - | - |
| **Setup time** | \< 2 minutes | 15-30 minutes |
| **Maintenance** | Zero - we handle it | Regular updates required |
| **Reliability** | Managed and monitored by us | Depends on your infrastructure |
| **Edge caching** | Yes | No |
| **Updates** | Automatic | Manual intervention |
***
## Troubleshooting
### Common issues and solutions
> [accordion] Server not responding or connection timeout
>
> **Symptoms**: Claude shows connection errors or timeouts when making requests.
>
> **Solutions**:
>
> 1. Check your internet connection
> 2. Restart Claude Desktop/Cursor
> 3. Verify the configuration syntax in your config file
> 4. Try removing and re-adding the server configuration
> [accordion] Configuration file not found
>
> **Symptoms**: Can't locate the Claude Desktop configuration file.
>
> **Solutions**:
>
> 1. Create the directories if they don't exist:
> * **macOS**: `mkdir -p ~/Library/Application\ Support/Claude/`
> * **Windows**: Create the `Claude` folder in your `%APPDATA%` directory
> 2. Create the `claude_desktop_config.json` file manually
> 3. Ensure proper JSON syntax
> [accordion] MCP server not listed in Claude
>
> **Symptoms**: The DexPaprika server doesn't appear in Claude's available tools.
>
> **Solutions**:
>
> 1. Verify JSON syntax in your configuration file
> 2. Restart Claude Desktop completely
> 3. Check that the server URL is correct: `https://mcp.dexpaprika.com/sse`
> 4. Try removing and re-adding the server configuration
> [accordion] Rate limiting or API errors
>
> **Symptoms**: Getting rate limit errors or API failures.
>
> **Solutions**:
>
> 1. Our hosted service includes built-in rate limiting protection
> 2. `DP429_RATE_LIMITED` means the server's shared capacity is busy. Wait `retry_after_seconds` when it is given, then retry. Your own plan does not change this, except for the tools that run on your own key (see above), which count against your plan like any direct call
> 3. Try spacing out your requests if making many in quick succession
***
## API coverage
Our hosted MCP server provides access to all DexPaprika API endpoints:
> [card] [Networks & DEXes](/api-reference/networks/get-a-list-of-available-blockchain-networks)
>
> Access all supported blockchain networks and their available decentralized exchanges
> [card] [Liquidity Pools](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
>
> Comprehensive pool data including TVL, volume, fees, and token pairs
> [card] [Token Information](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
>
> Real-time token prices, market data, and detailed token information
> [card] [Historical Data](/api-reference/pools/get-ohlcv-data-for-a-pool-pair)
>
> Price history, volume trends, and historical pool performance
> [card] [Search & Discovery](/api-reference/search/search-for-tokens-pools-and-dexes)
>
> Powerful search across tokens, pools, and DEXes with filtering options
> [card] [Real-time Updates](/api-reference/introduction)
>
> Live data feeds with the latest market information and trading activity
***
## What's next?
> [card] [API Documentation](/api-reference/introduction)
>
> Explore all available data endpoints and their capabilities
> [card] [Find New Pools](/tutorials/find-new-pools)
>
> Learn how to discover newly created liquidity pools and tokens
> [card] [Self-Hosted Option](/ai-integration/mcp)
>
> Want to run your own MCP server? Check out our self-hosted guide
> [card] [Historical Data](/tutorials/retrieve-historical-data)
>
> Access and analyze historical price and volume data
## Need help?
> [card] [Join Our Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support from other builders
> [card] [Direct Support](mailto:support@coinpaprika.com)
>
> Reach out directly for technical support or feature requests
> [!NOTE]
>
> **Looking for custom integrations?** Our team can help you integrate DexPaprika data into any application or workflow. [Contact us](mailto:support@coinpaprika.com) to discuss your specific needs.
### FAQs
> [accordion] Do I need an API key to use the hosted MCP?
>
> Not for most tools. Add the hosted URL to your client config and every tool except `getTokenOHLCV`, `getTokenIndicator` and `getPoolTransactions` works with no key and no signup. Those three run on your own Dev, Pro or Enterprise key; see [your own API key](#your-own-api-key-for-token-ohlcv-and-pool-transactions).
> [accordion] Which transport should I choose?
>
> Start with SSE for streaming and broad compatibility. Use streamable HTTP or JSON-RPC if your environment restricts SSE.
> [accordion] How do I debug connection issues?
>
> Confirm the URL, restart the client, and test the endpoint in a browser. If using desktop apps, ensure your config JSON is valid.
> [accordion] Is rate limiting applied?
>
> Yes. Tool calls run on the server's shared capacity, not on a plan of yours, so when it is busy a tool returns `DP429_RATE_LIMITED`, with `retry_after_seconds` when the API supplies one. Wait that long and retry. `getTokenOHLCV`, `getTokenIndicator` and `getPoolTransactions` are the exception: they run on your own key and count against your plan like any direct call. For the REST API's own limits, see [rate limits](/knowledge-base/rate-limits) and [pricing](https://dexpaprika.com/api/pricing).
# DexPaprika for AI agents and AI-assisted development
Source: https://docs.dexpaprika.com/ai-integration/index
Connect AI tools to real-time DEX data across 35 blockchains. Choose from Claude Code plugin, hosted MCP server, IDE integrations, ChatGPT Actions, or direct REST API access. Keyless to start.
## Why DexPaprika + AI?
DexPaprika provides on-chain DEX data across every chain, token and pool on the [coverage page](/coverage), keyless to start. AI agents and AI-assisted IDEs can query token prices, pool data, historical OHLCV, swap transactions, and more, either through MCP (Model Context Protocol) or direct REST API calls.
This page helps you pick the right integration for your setup.
> [!NOTE]
>
> **For AI agents:** fetch [docs.dexpaprika.com/llms.txt](https://docs.dexpaprika.com/llms.txt) for a machine-readable index of this documentation, or [llms-full.txt](https://docs.dexpaprika.com/llms-full.txt) for the full text. To self-onboard against the live server, call the **getCapabilities** MCP tool first: it returns the tool list, network synonyms, and recommended call sequences in one shot.
***
## Fastest path
Add the hosted MCP server to Claude, Cursor, or VS Code. One keyless URL, no install:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"url": "https://mcp.dexpaprika.com/sse"
}
}
}
```
Recommended for most setups. Full walkthrough: [hosted MCP server](/ai-integration/hosted-mcp-server).
***
## Choose your integration
> [card] [Hosted MCP server (recommended)](/ai-integration/hosted-mcp-server)
>
> Add one keyless URL to Claude Desktop, Cursor, or VS Code. No installation.
> [card] [Self-hosted MCP server](/ai-integration/mcp)
>
> Run the MCP server locally via `npx dexpaprika-mcp` for full control.
> [card] [Claude Code plugin](/ai-integration/claude-code-plugin-guide)
>
> Two commands, zero config. Built-in MCP access inside Claude Code.
> [card] [Agent skills](/ai-integration/skills)
>
> One command. Full API knowledge for Claude Code, Cursor, Cline, and 40+ agents.
> [card] [LangChain](/ai-integration/langchain)
>
> `langchain-dexpaprika`: five tools plus a toolkit for Python agents.
> [card] [Cursor, VS Code, Codex, and more](/ai-integration/mcp-clients)
>
> One-click install for popular editors, or the config for any MCP client.
> [card] [CLI](/tutorials/cli)
>
> One install command. Query and stream data from the terminal.
> [card] [REST API](/api-reference/introduction)
>
> Call the API directly from any agent framework or custom application.
***
## Compare the options
| | Agent Skills | CLI | Claude Code Plugin | Hosted MCP | Self-hosted MCP | REST API |
| - | - | - | - | - | - | - |
| **Setup time** | 10 seconds | 10 seconds | 30 seconds | 1-2 minutes | 10-15 minutes | 0 (just call endpoints) |
| **Install** | `npx skills add` | One curl command | Plugin marketplace | Add URL to config | npm/npx | No install |
| **Works with** | Claude Code, Cursor, Cline, 40+ agents | Any terminal, any agent | Claude Code | Claude Desktop, Cursor, VS Code | Claude Desktop, Cursor | Any HTTP client or agent |
| **How it works** | Agent reads API docs and makes calls itself | Direct CLI commands | MCP tools called by agent | MCP tools called by agent | MCP tools called by agent | Direct HTTP calls |
| **Streaming prices** | Agent can use REST streaming | Built-in `stream` command | No (use REST streaming) | No (use REST streaming) | No (use REST streaming) | Yes via [SSE streaming](/streaming/introduction) |
| **Works offline** | Yes (local files) | Yes (local binary) | No | No | Yes (local server) | No |
| **Best for** | Any agent that can make HTTP/CLI calls | Terminal agents, scripting, pipelines | Claude Code users who want everything bundled | Quick AI IDE setup | Custom/private environments | Agent frameworks, custom apps |
***
## What data can AI agents access?
Every integration exposes the same dataset, delivered as **20 MCP tools** (see the [MCP tools reference](/ai-integration/mcp-tools)) or as REST endpoints:
| Capability | Description |
| - | - |
| **Token prices** | Real-time USD prices for any token on any supported network |
| **Batch prices** | Up to 10 token prices in a single request |
| **Pool data** | Liquidity, volume, fees, and token pairs for any pool |
| **Pool filtering** | Find pools by volume range, transaction count, or creation date |
| **OHLCV history** | Historical candlestick data, 9 intervals (1m to 24h); depth and interval [depend on the plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan) |
| **Transactions** | Recent swaps for any pool, on Dev, Pro and Enterprise plans |
| **DEX listings** | Every DEX on a network with pool counts |
| **Search** | Find tokens, pools, and DEXes by name, symbol, or address across all chains |
| **Network info** | All 35 supported blockchain networks |
| **Live streaming** | Real-time price and pool-reserve updates via [SSE streaming](/streaming/introduction) |
***
## Example prompts
Once connected, try:
* "What's the current price of SOL?"
* "Show me the top 10 pools on Ethereum by volume"
* "Find newly created pools on Base with over \$50k daily volume"
* "Get hourly OHLCV for the last day for the USDC/ETH pool on Uniswap V3"
* "Compare WETH prices across Ethereum, Arbitrum, and Base"
* "Which DEX has the most pools on Solana?"
***
## Next steps
> [card] [MCP tools reference](/ai-integration/mcp-tools)
>
> Every tool, its parameters, pagination, and the getCapabilities onboarding tool
> [card] [Knowledge base](/knowledge-base/concepts)
>
> Core concepts: pools, DEXes, OHLCV, and how DexPaprika data works
> [card] [REST API reference](/api-reference/introduction)
>
> Complete endpoint documentation with an interactive playground
> [card] [Streaming API](/streaming/introduction)
>
> Real-time price and reserve updates via Server-Sent Events
### FAQs
> [accordion] Which integration should I use?
>
> For terminal work and scripting, start with the CLI. If you use Claude Code, the plugin is the fastest path. For Claude Desktop, Cursor, or VS Code, use the hosted MCP server. For Python agents, use `langchain-dexpaprika`. For custom agents and applications, call the REST API directly.
> [accordion] Do I need an API key?
>
> No. DexPaprika is keyless for public read access: no API key, registration, or authentication needed to start. A free registered key raises the allowance from 10,000 credits to 100,000, and Pro raises it to 5,000,000 at 500 requests a minute; see [rate limits](/knowledge-base/rate-limits).
> [accordion] Can I use multiple integrations at once?
>
> Yes. For example, use the MCP server in Cursor for interactive development and call the REST API from your application code.
> [accordion] What about rate limits?
>
> 10,000 credits per rolling 30 days without a key at 15 requests a minute, or 100,000 with a [free key](https://console.dexpaprika.com) at 30 requests a minute. For more, the [Pro API](/api-pro/introduction) is \$99 a month for 5,000,000 credits at 500 requests a minute; [plans and checkout](https://dexpaprika.com/api/pricing) are on the pricing page. One request costs one credit; batch endpoints cost one credit per item.
# DexPaprika tools for LangChain agents
Source: https://docs.dexpaprika.com/ai-integration/langchain
Give a LangChain agent keyless DEX market data with langchain-dexpaprika: five tools plus a toolkit for search, token details, pools, OHLCV, and networks across every supported blockchain. No API key needed to start.
[`langchain-dexpaprika`](https://pypi.org/project/langchain-dexpaprika/) gives a LangChain agent live DEX market data from the [DexPaprika API](https://docs.dexpaprika.com). It is keyless: there is no signup and no environment variable to set, so your agent has DEX data across [every supported blockchain](/coverage) as soon as you install the package.
The tools are built for LLM consumption: descriptions spell out which parameters exist and where to get their values, error messages quote the API's own allowed-value lists so the model can self-correct, and outputs are compact JSON with long token descriptions trimmed.
## Install
```bash theme={null}
pip install -U langchain-dexpaprika
```
There are no credentials to configure. The DexPaprika API is keyless, so there is no environment variable to set.
## Quickstart
```python theme={null}
from langchain_dexpaprika import DexPaprikaSearch
search = DexPaprikaSearch()
print(search.invoke({"query": "WETH"}))
```
This returns compact JSON with matching tokens (contract address, chain, USD price, liquidity), pools, and DEXes. `search` is the entry point when you only have a ticker: it resolves a symbol into a contract address and network id you can feed into the other tools.
## Tools
| Tool name | Class | What it returns |
| - | - | - |
| `dexpaprika_search` | `DexPaprikaSearch` | Tokens, pools, and DEXes matching a name, symbol, or address. Use it first when you only have a ticker. |
| `dexpaprika_token_details` | `DexPaprikaTokenDetails` | Price, FDV, liquidity, pool count, and 24h/6h/1h volume with buy/sell breakdown for one token on one network. |
| `dexpaprika_token_pools` | `DexPaprikaTokenPools` | Pools where a token trades, sortable by volume, liquidity, transactions, age, price, or 24h price change. |
| `dexpaprika_pool_ohlcv` | `DexPaprikaPoolOHLCV` | Historical OHLCV candles for one pool. The package calls the API without a key, so it gets `1h` and longer candles over the last 24 hours ([OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). |
| `dexpaprika_networks` | `DexPaprikaNetworks` | Every supported network with its exact id, 24h volume, transactions, and pool counts. |
## Use the toolkit in an agent
`DexPaprikaToolkit` bundles all five tools over one shared HTTP client. This example drives them with an Anthropic model, so install the provider and set its key first (swap in any chat model you prefer):
```bash theme={null}
pip install -U "langchain[anthropic]"
export ANTHROPIC_API_KEY=...
```
```python theme={null}
from langchain.agents import create_agent
from langchain_dexpaprika import DexPaprikaToolkit
toolkit = DexPaprikaToolkit()
agent = create_agent("claude-sonnet-5", toolkit.get_tools())
result = agent.invoke(
{"messages": [("user", "Find the most liquid WETH pool on ethereum")]}
)
```
The tool descriptions chain naturally: the agent starts with `dexpaprika_search` to resolve a ticker into a contract address and network id, then feeds those into the other tools.
## Individual tools
Every tool works standalone, sync and async:
```python theme={null}
from langchain_dexpaprika import DexPaprikaPoolOHLCV
ohlcv = DexPaprikaPoolOHLCV()
candles = ohlcv.invoke(
{
"network": "ethereum",
"pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"start": "-24h", # the last 24 hours, which works without a key
"interval": "1h",
"limit": 24,
}
)
```
## Prefer MCP or the raw API?
The MCP server exposes the same data as callable tools for Claude, Cursor, and other MCP clients: see the [hosted MCP server](/ai-integration/hosted-mcp-server) and the [MCP tools reference](/ai-integration/mcp-tools). For any framework we do not ship a package for yet, call the [REST API](/api-reference/introduction) directly.
## Resources
* [Package on PyPI](https://pypi.org/project/langchain-dexpaprika/)
* [Source on GitHub](https://github.com/coinpaprika/langchain-dexpaprika) (MIT)
* [DexPaprika API docs](https://docs.dexpaprika.com)
## FAQs
> [accordion] Do I need an API key for langchain-dexpaprika?
>
> No. The DexPaprika API is keyless, so there is nothing to sign up for and no environment variable to set. A free registered key raises the allowance from 10,000 credits to 100,000, and Pro raises it to 5,000,000 at 500 requests a minute; see [rate limits](/knowledge-base/rate-limits).
> [accordion] Which chat models work with the toolkit?
>
> Any LangChain chat model. `DexPaprikaToolkit().get_tools()` returns standard LangChain tools, so you can pass them to `create_agent` with an Anthropic, OpenAI, or other provider model.
> [accordion] What is the difference between the tools and the MCP server?
>
> Same data, different delivery. Use `langchain-dexpaprika` inside a Python LangChain agent; use the [hosted MCP server](/ai-integration/hosted-mcp-server) to expose the tools to Claude, Cursor, or any MCP client without writing code.
# DexPaprika MCP server: DEX data for Claude, Cursor & AI agents
Source: https://docs.dexpaprika.com/ai-integration/mcp
Give AI assistants live DEX data via MCP: pools, tokens and prices on 35 chains. Free to start, no API key. Install locally with npx or use the hosted server.
## Integration overview
Install and configure the DexPaprika MCP server so AI tools can query networks, DEXes, pools, tokens, and search.
## What is MCP?
MCP (Model Context Protocol) is an [open protocol standard created by Anthropic](https://modelcontextprotocol.io/introduction) that gives AI models a unified way to connect to external data sources and tools. The DexPaprika MCP server leverages this protocol to provide AI assistants like Claude with access to real-time crypto and DeFi market data, enabling advanced conversations about blockchain networks, decentralized exchanges (DEXes), liquidity pools, and tokens across the DeFi ecosystem.
> [!NOTE]
>
> **Looking for an easier setup?** If you prefer not to install anything locally, check out our [DexPaprika Hosted MCP Server](/ai-integration/hosted-mcp-server) for instant access with zero installation required.
## Installation guide
[DexPaprika MCP Server Installation Guide](https://www.youtube.com/embed/rIxFn2PhtvI?si=c1BZ5bfS6chC7p-a)
### Prerequisites
Before installing the DexPaprika MCP server, ensure you have:
* [Node.js](https://nodejs.org/) (v16 or higher) installed on your system
* [npm](https://www.npmjs.com/) (comes with Node.js) or [yarn](https://yarnpkg.com/) package manager
* [Claude Desktop](https://claude.ai/desktop) or [Cursor](https://cursor.sh/) installed if you want to use the MCP server with these applications
### Installation options
#### Option 1: Global installation (recommended)
Installing the DexPaprika MCP server globally makes it available throughout your system:
```bash theme={null}
npm install -g dexpaprika-mcp
```
After installation, you can start the server by running:
```bash theme={null}
dexpaprika-mcp
```
#### Option 2: Use with npx (no installation)
Alternatively, you can run the server directly without installation using npx:
```bash theme={null}
npx dexpaprika-mcp@latest
```
This is useful for trying out the server without permanently installing it.
### Verification
To verify that your installation was successful, run:
```bash theme={null}
dexpaprika-mcp --version
```
You should see the current version number of the DexPaprika MCP server.
## Configuration
### Claude Desktop configuration
To use the DexPaprika MCP server with Claude Desktop:
1. Download and install [Claude Desktop](https://claude.ai/desktop) if you haven't already
2. Locate your Claude Desktop configuration file:
* **macOS**: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
3. If the file doesn't exist, create it with the following content:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"command": "dexpaprika-mcp"
}
}
}
```
4. If the file already exists, add the DexPaprika configuration to the existing `mcpServers` object:
```json theme={null}
"dexpaprika": {
"command": "dexpaprika-mcp"
}
```
5. Save the file and restart Claude Desktop.
6. To verify the configuration, open Claude Desktop and try asking a question about cryptocurrency data, such as "What are the top liquidity pools on Ethereum?"
> [!NOTE]
>
> Make sure you have the latest version of our package by running `npm update -g dexpaprika-mcp`
### Cursor configuration
If you're using Cursor IDE with Claude:
1. Download and install [Cursor](https://cursor.sh/) if you haven't already
2. Open Cursor and click on the Claude button in the sidebar
3. Click the settings (gear) icon and select "Add MCP Server"
4. Fill in the following information:
* **Server name**: `dexpaprika`
* **Type**: `command` (select from dropdown)
* **Command to run**: `npx dexpaprika-mcp@latest`
5. Click "Add" to save the configuration
6. Alternatively, Cursor will automatically use any MCP servers configured in Claude Desktop
## Troubleshooting
If you encounter issues with the DexPaprika MCP server:
1. **Server not found errors**:
* Ensure the server is installed correctly using `npm list -g dexpaprika-mcp`
* Try reinstalling with `npm install -g dexpaprika-mcp`
2. **Connection errors**:
* Check that your internet connection is active
* Verify that no firewall is blocking the connection
3. **Configuration errors**:
* Double-check your configuration file syntax
* Ensure the path to the configuration file is correct for your OS
4. **Command not found errors**:
* Ensure Node.js is installed and in your PATH
* Try using the full path to the npm or npx executables
## Features
The DexPaprika MCP server provides access to:
* Blockchain network information across multiple chains
* Decentralized exchange (DEX) data
* Liquidity pool details and metrics
* Token information and market data
* Price and volume analytics for tokens and pools
* Comprehensive search capabilities across DeFi entities
## Available tools
> [!NOTE]
>
> New to the server? Call **getCapabilities** first. In one call it returns the full tool list, network name synonyms, recommended call sequences, and common pitfalls, so an agent can self-onboard before making any data calls.
The DexPaprika MCP server exposes 20 tools.
**Discovery and onboarding**
* **getCapabilities** - Agent onboarding: supported workflows, network synonyms, pitfalls, and recommended call sequences. Call this first.
* **getNetworks** - List every supported blockchain network with 24h volume and indexing stats
* **getStats** - Platform-wide totals: networks, DEXes, pools, and tokens indexed
* **search** - Search across all networks for tokens, pools, and DEXes by name, symbol, or address
**Pools**
* **getNetworkPools** - Top liquidity pools on a network, ranked by 24h volume by default
* **getNetworkPoolsFilter** - Filter pools on a network by volume, liquidity, transactions, or creation time
* **getDexPools** - Pools on a specific DEX within a network (backed by pool search with a `dex_name` filter, since the old DEX pools endpoint returns `410 Gone`)
* **getPoolDetails** - Full details for one pool: tokens, price, liquidity, and 24h volume
* **getPoolOHLCV** - Historical OHLCV (candlestick) data for a pool (`1m` to `24h` intervals; interval and history depth depend on the plan, see [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan))
* **getPoolIndicator** - RSI, EMA, MACD, Bollinger Bands or VWAP for a pool, computed from its candles. Every plan, with the same interval and history limits as `getPoolOHLCV`; see the [technical indicators tutorial](/tutorials/technical-indicators)
* **getPoolTransactions** - Recent swaps for a pool. Needs your own Dev, Pro or Enterprise key; see [hosted setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions) (`from`/`to` take a relative offset such as `-1h`, Unix seconds, RFC3339 or `YYYY-MM-DD`; capped to the last 7 days)
**Tokens**
* **getTokenDetails** - Metadata and multi-timeframe price and volume metrics for one token
* **getTokenPools** - Liquidity pools containing a specific token on a network
* **getTokenOHLCV** - USD candles for a token across every pool it trades in. Needs your own Dev, Pro or Enterprise key; see [hosted setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)
* **getTokenIndicator** - The same indicators computed from a token's USD candles across all its pools. Needs your own Dev, Pro or Enterprise key; see [hosted setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)
* **getTokenMultiPrices** - USD prices for up to 10 tokens in one batched call
* **filterNetworkTokens** - Filter tokens on a network by volume, liquidity, FDV, transactions, or creation time
* **getTopTokens** - Top tokens on a network ranked by volume, liquidity, transactions, FDV, or 24h change
**DEXes**
* **getNetworkDexes** - DEXes operating on a specific network
**Feedback** (hosted server only)
* **submitFeedback** - Report a problem, unexpected response, or missing data back to the DexPaprika team
> [!NOTE]
>
> **Agent notes:** every read tool takes a required `rationale` string (1-2 sentences on what triggered the call). The pool and token list tools (`getNetworkPools`, `getNetworkPoolsFilter`, `getDexPools`, `getTokenPools`, `getTopTokens`, `filterNetworkTokens`) return rows under `results` with cursor pagination (`has_next_page` + `next_cursor`; on the npm server, paging needs `DEXPAPRIKA_API_KEY`, and a free key is enough), and sort with canonical `sort_by` / `sort_dir`.
For full parameters, defaults, and return shapes for every tool, see the [MCP tools reference](/ai-integration/mcp-tools).
## Usage examples
Once configured, you can ask Claude questions about DeFi data. Here are some example prompts:
### General market data
* "What are the top 5 liquidity pools across all networks by volume?"
### Network-specific queries
* "Which blockchain networks are supported by DexPaprika?"
* "What are the top DEXes on the Solana network?"
* "Show me the top 10 liquidity pools on Ethereum, ordered by volume."
### DEX and pool analysis
* "What are the most active pools on Uniswap V3?"
* "Show me details about the USDC/ETH pool on Uniswap V3."
* "Compare the trading volume between PancakeSwap and Uniswap."
### Token information
* "What's the current price of SOL in the Raydium pool on Solana?"
* "Find all pools that include the SHIB token."
### Search functionality
* "Search for pools related to 'Bitcoin'"
* "Find tokens with 'Pepe' in their name"
## Advanced queries
You can also ask Claude to perform more complex analysis:
* "Compare the liquidity and volume of the top 3 DEXes on Ethereum"
* "What's the price difference of ETH between Uniswap and SushiSwap?"
* "Show me the tokens with the highest price volatility in the last 24 hours"
* "Analyze the trading volume trends for BNB on PancakeSwap"
## Support
If you need further assistance, you can:
* Contact DexPaprika support by [email](mailto:support@coinpaprika.com)
* Join the [Discord community](https://discord.gg/DhJge5TUGM)
### FAQs
> [accordion] Do I need an API key for the MCP server?
>
> Not for most tools. `getTokenOHLCV`, `getTokenIndicator` and `getPoolTransactions` need a Dev, Pro or Enterprise key; every other tool runs with no key. On the hosted server that is your own key, sent as the `Authorization` header ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)).
> [accordion] Claude vs Cursor setup differences?
>
> Claude Desktop reads `claude_desktop_config.json`; Cursor can add the same server via “Add MCP Server” or inherit Claude’s config.
> [accordion] How to troubleshoot 'Server disconnected'?
>
> Use absolute paths to `uvx`/`npx` in the config; many desktop apps don’t inherit shell `PATH`.
> [accordion] Is the MCP server read-only?
>
> Yes. Every tool is a read-only data query; the server cannot modify on-chain state or your data, so no flag is needed.
# Connect DexPaprika MCP to any client
Source: https://docs.dexpaprika.com/ai-integration/mcp-clients
Connect the keyless DexPaprika MCP server to any MCP-compatible client (Windsurf, Cline, Zed, and more). One canonical config: a remote SSE/streamable-HTTP URL, or a local stdio command.
DexPaprika ships a standard MCP server, so it works with any MCP-compatible client, not just the ones with a dedicated guide. There are two ways to connect, and most clients accept the first.
## Option 1: Remote server (recommended)
Point your client at the hosted server. No install, keyless.
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"url": "https://mcp.dexpaprika.com/sse"
}
}
}
```
`/sse` is the recommended transport. The same server also serves streamable HTTP at `https://mcp.dexpaprika.com/streamable-http` for clients that prefer it.
## Option 2: Local server (stdio)
Run the server on your machine and have the client launch it:
```json theme={null}
{
"mcpServers": {
"dexpaprika": {
"command": "npx",
"args": ["-y", "dexpaprika-mcp@latest"]
}
}
}
```
## Where to put the config
The `mcpServers` shape above is what **Claude Desktop, Cursor, VS Code, Cline, and Windsurf** use. The file location differs per client (for example Windsurf keeps it in `~/.codeium/windsurf/mcp_config.json`, Cline in its MCP settings pane), so check your client's MCP docs for the exact path, then paste one of the blocks above.
A few clients use a different shape:
| Client | Config format |
| - | - |
| Claude Desktop, Cursor, VS Code, Cline, Windsurf | `mcpServers` JSON (above) |
| Codex CLI | TOML in `~/.codex/config.toml` (see the [Codex guide](/ai-integration/codex)) |
| Zed | `context_servers` in `settings.json` (Zed's own key), pointing at the same URL or command |
We have step-by-step guides for [Cursor](/ai-integration/cursor-ide-integration), [VS Code](/ai-integration/vscode-ide-integration), [Claude Code](/ai-integration/claude-code-plugin-guide), and [Codex](/ai-integration/codex). For anything else, the config above is all you need.
## What you get
20 tools across networks, pools, tokens, OHLCV, transactions, and cross-chain search. Start with `getCapabilities` for the runtime manifest, or read the [MCP tools reference](/ai-integration/mcp-tools).
## FAQs
> [accordion] My client isn't listed. Will it work?
>
> If it supports MCP, yes. DexPaprika is a standard MCP server. Use the remote `url` config for a hosted connection, or the stdio `command` config to run it locally, in whatever place your client keeps MCP servers.
> [accordion] Remote or local: which should I choose?
>
> Remote (`url`) is simplest: no install, always up to date, keyless. Choose local (stdio) if your client does not support remote MCP servers, or you want to run the server in your own environment.
> [accordion] Do I need an API key?
>
> No. Both the hosted server and the npm package read keyless. The npm package calls the API from your machine, so a [free key](https://console.dexpaprika.com) raises your allowance there; see [rate limits](/knowledge-base/rate-limits). The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server).
# DexPaprika MCP tools reference
Source: https://docs.dexpaprika.com/ai-integration/mcp-tools
Complete reference for all 18 DexPaprika MCP tools: parameters, defaults, pagination, sorting, and return shapes. The machine-readable manifest an AI agent needs to plan calls before connecting.
This page lists every tool the DexPaprika MCP server exposes, with parameters, defaults, and return shapes, so an agent (or a developer) can plan calls before connecting.
> [!NOTE]
>
> **Agents: call `getCapabilities` first.** In one call it returns the workflow patterns, network name synonyms, and common pitfalls below as structured JSON, so the server describes itself at runtime. This page is the human-readable mirror of that manifest.
The server exposes **20 tools** across five groups. All data is read-only; `submitFeedback` is the only write tool and is available on the hosted server only.
## Conventions that apply to every tool
These rules hold across the whole surface. Read them once and the individual tools get much shorter.
| Convention | What to know |
| - | - |
| **`rationale` (required)** | Every read tool takes a `rationale` string (20-500 chars): 1-2 sentences on what triggered the call and how you will use the result. It is logged to improve the server and never shown to end users. |
| **Network ids** | Tools that take a `network` want the canonical slug (`ethereum`, `solana`, `base`). Call `getNetworks` for the list, or `getCapabilities` for the synonym map that resolves `eth`, `matic`, `bnb`, and similar to the right slug. |
| **Pagination** | List tools return rows under `results` with **cursor pagination**: read `has_next_page` and pass `next_cursor` back as `cursor` for the next page. On the npm server, paging needs an API key: keyless, an agent gets the first page and the next call returns `403` with `"param": "cursor"`, so set `DEXPAPRIKA_API_KEY` to a [free key](https://console.dexpaprika.com) to page. The hosted server at `mcp.dexpaprika.com` pages without a key of yours. Two older tools (`getNetworkDexes` and `getPoolTransactions`) use 1-indexed `page` numbers instead. |
| **Sorting** | Over MCP use `sort_by` (a field name) and `sort_dir` (`asc`/`desc`, default `desc`); `order_by`/`sort` are also accepted and mapped. Default sort is `volume_usd_24h`. **Calling the REST API directly? Use `order_by`/`sort`** ([REST reference](/api-reference/introduction)): those are the names it requires. Until 23 November 2026 an unrecognized name is ignored, so a wrong name looks like a working sort while you get the default order; from that date it answers `400`. |
| **Rate limits** | 15 requests/min keyless, 30/min with a [free key](https://console.dexpaprika.com), 500/min on Pro. Over the limit returns HTTP 429; back off and retry after a short pause. See [rate limits](/knowledge-base/rate-limits). |
| **Output** | Every tool returns both `content[0].text` (a JSON string) and `structuredContent` (validated against the tool's output schema). Prefer `structuredContent`. |
***
## Discovery and onboarding
### getCapabilities
Agent onboarding in one call: supported workflows, network name synonyms, common pitfalls, and recommended call sequences. Read it once at the start of a session. Returns static onboarding docs, not live market data.
No parameters beyond `rationale`.
### getNetworks
The full list of blockchain networks DexPaprika indexes, each with 24h volume, transaction counts, and pool counts. Start here (or `getCapabilities`) because every other DEX query needs a valid network slug.
No parameters beyond `rationale`.
### getStats
Platform-wide totals: number of networks, DEXes, pools, and tokens indexed. Ecosystem-wide counts, not per-network figures (use `getNetworks` for the per-chain breakdown).
No parameters beyond `rationale`.
### search
Search across **all** networks at once for tokens, pools, and DEXes by name, symbol, or address. Returns three arrays: `tokens`, `pools`, `dexes`. This is the cross-chain entry point; once you have a network slug, switch to the network-scoped tools.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `query` | yes | string | | Name, symbol, or address (for example `uniswap`, `PEPE`, `0x...`) |
| `limit` | no | number | | Max results per category, applied client-side |
***
## Pools
### getNetworkPools
The top liquidity pools on one network, ranked by 24h volume by default. The primary pool-discovery tool for a whole chain.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug from `getNetworks` |
| `limit` | no | number | 10 | Max 100 |
| `cursor` | no | string | | `next_cursor` from a previous response |
| `sort_by` | no | enum | `volume_usd_24h` | `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `price_usd`, `price_change_percentage_24h`, `price_change_percentage_48h`, `price_change_percentage_6h`, `price_change_percentage_1h`, `price_change_percentage_5m`, `created_at` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
Rows return under `results` with cursor pagination.
### getNetworkPoolsFilter
Pools on one network filtered by exact thresholds for volume, liquidity, transaction count, price change, or creation time. Choose this over `getNetworkPools` when the user gives numeric constraints or a time window.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `limit` | no | number | 50 | Max 100 |
| `cursor` | no | string | | Cursor pagination |
| `volume_24h_min` / `volume_24h_max` | no | number | | 24h volume in USD |
| `volume_7d_min` / `volume_7d_max` | no | number | | 7d volume in USD |
| `liquidity_usd_min` / `liquidity_usd_max` | no | number | | Pool liquidity in USD |
| `txns_24h_min` | no | number | | Minimum 24h transactions |
| `price_change_percentage_24h_min` / `_max` | no | number | | 24h price change, percent |
| `price_change_percentage_48h_min` / `_max` | no | number | | 48h price change, percent |
| `price_change_percentage_6h_min` / `_max` | no | number | | 6h price change, percent |
| `price_change_percentage_1h_min` / `_max` | no | number | | 1h price change, percent |
| `price_change_percentage_5m_min` / `_max` | no | number | | 5m price change, percent |
| `created_after` / `created_before` | no | string | | Creation-time window, both ends included: a relative offset such as `-24h`, Unix seconds, RFC3339 or `YYYY-MM-DD` |
| `sort_by` | no | enum | `volume_usd_24h` | Same fields as `getNetworkPools` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
To find new pools: set `created_after` and sort by `created_at` descending. The hosted server searches like a free key, so pools created in the last hour are left out and a `created_after` window shorter than an hour comes back empty ([search freshness](/knowledge-base/rate-limits#search-freshness)). To find movers, pass a signed percentage bound: `price_change_percentage_1h_max: -20` returns pools down 20 percent or more over the last hour.
### getDexPools
The pools that belong to one specific DEX on one network (for example all Uniswap v3 pools on ethereum). Narrower than `getNetworkPools`.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `dex` | yes | string | | DEX id from `getNetworkDexes`, its `dex_id` field (for example `uniswap_v3`), case-insensitive. A display name (`Uniswap V3`) returns no rows instead of an error |
| `limit` | no | number | 10 | Max 100 |
| `cursor` | no | string | | Cursor pagination |
| `sort_by` | no | enum | `volume_usd_24h` | Same pool sort fields as `getNetworkPools` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
> [!NOTE]
>
> The REST endpoint behind this tool changed. `GET /networks/{network}/dexes/{dex}/pools` was removed and returns `410 Gone`, so the tool now calls `GET /networks/{network}/pools/search` with the `dex_name` filter. Two consequences: there is no `page` parameter any more, and the legacy sort values (`volume_usd`, `transactions`, `last_price_change_usd_24h`) are mapped to their canonical names before the request goes out. Rows arrive under `results` with `has_next_page` and `next_cursor`, and the 24h volume field on each row is `volume_usd_24h`.
### getPoolDetails
Full details for one pool by address: the two tokens, current price, liquidity, 24h volume, and transaction counts. The live snapshot only, use `getPoolOHLCV` for history.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `pool_address` | yes | string | | Pool address |
| `inversed` | no | boolean | false | Invert the price ratio for the other pair perspective |
### getPoolOHLCV
Historical open/high/low/close/volume candles for one pool across a date range and interval. Historical time series, use `getPoolDetails` for the single current price.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `pool_address` | yes | string | | Pool address |
| `start` | yes | string | | A relative offset such as `-24h` or `-7d`, UNIX timestamp, RFC3339, or `yyyy-mm-dd` |
| `end` | no | string | | Same formats as `start` |
| `limit` | no | number | 100 | Max 1000 |
| `interval` | no | enum | `24h` | `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h` |
| `inversed` | no | boolean | false | Invert the price ratio |
### getPoolIndicator
RSI, EMA, MACD, Bollinger Bands or VWAP for one pool, computed by the API from the pool's candles. Use it instead of pulling `getPoolOHLCV` and computing the indicator yourself.
Works on every plan, keyless included, with the same interval and history limits as `getPoolOHLCV` ([limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). Values come oldest first, one per completed candle: `value` for rsi, ema and vwap; `macd`, `signal` and `histogram` for macd; `upper`, `middle` and `lower` for bbands. RSI, EMA and MACD are smoothed, so start well before the first value you rely on. Tutorial: [technical indicators](/tutorials/technical-indicators).
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `pool_address` | yes | string | | Pool address |
| `indicator` | yes | enum | | `rsi`, `ema`, `macd`, `bbands`, `vwap` |
| `interval` | no | enum | | `1m` to `24h`, or `1d`. Pass it every time |
| `start` | no | string | | A relative offset such as `-24h` or `-7d`, Unix seconds, RFC3339 or `yyyy-mm-dd`. Without it you get the last `limit` values |
| `end` | no | string | | Exclusive, same formats as `start` |
| `limit` | no | number | 100 | Max 1000 |
| `cursor` | no | string | | `next_cursor` from the previous page; not with `start` |
| `period` | no | number | | rsi (14), ema (20), bbands (20), vwap (14). Not for macd |
| `fast_period` / `slow_period` / `signal_period` | no | number | 12 / 26 / 9 | macd only |
| `std_dev` | no | number | 2 | bbands only |
A parameter that belongs to another indicator (`fast_period` on `rsi`, say) is refused with a 400.
### getPoolTransactions
The recent individual swap transactions for one pool, newest first. Per-trade records, not aggregated candles.
Needs a Dev, Pro or Enterprise key. On the hosted server it runs on your own key, sent as the `Authorization` header on your connection ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)); without one it returns `DP401_API_KEY_REQUIRED`. With the npm package, set `DEXPAPRIKA_API_KEY` and `DEXPAPRIKA_API_BASE_URL=https://api-pro.dexpaprika.com`. Keyless and free keys cannot call it: `getPoolDetails` gives the pool's transaction counts and volume instead.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `pool_address` | yes | string | | Pool address |
| `page` | no | number | 1 | 1-indexed, up to 100 pages |
| `limit` | no | number | 10 | Max 100 |
| `cursor` | no | string | | Transaction id for cursor pagination |
| `from` / `to` | no | string | | A relative offset such as `-1h`, Unix seconds, RFC3339 or `YYYY-MM-DD`. `from` is inclusive, `to` exclusive. Results are always capped to the last 7 days |
***
## Tokens
### getTokenDetails
Metadata and multi-timeframe price and volume metrics for one token by contract address, including website, Twitter, and Telegram links. If you only have a symbol, call `search` first to resolve the address.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `token_address` | yes | string | | Token contract address |
### getTokenPools
The liquidity pools that contain a specific token on one network. The token filter is network-scoped, so run `search` first if you do not know the network.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `token_address` | yes | string | | An unknown address returns an empty `results` array, not an error |
| `limit` | no | number | 10 | Max 100 |
| `cursor` | no | string | | Cursor pagination |
| `sort_by` | no | enum | `volume_usd_24h` | Same pool sort fields as `getNetworkPools` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
> [!NOTE]
>
> `inversed`/`reorder` and `paired_token_address`/`address` are no longer supported (the underlying endpoint changed). Passing them returns a structured error. To flip a price, compute `1/price` client-side; for pair queries, filter `results[].tokens` client-side.
### getTokenOHLCV
USD candles for one token, volume-weighted across every pool it trades in on the network, with volume summed across those pools. Use it for a token's price history; for one pair's candles use `getPoolOHLCV`.
Needs a Dev, Pro or Enterprise key. On the hosted server it runs on your own key, sent as the `Authorization` header on your connection ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)); without one it returns `DP401_API_KEY_REQUIRED`. With the npm package, set `DEXPAPRIKA_API_KEY` and `DEXPAPRIKA_API_BASE_URL=https://api-pro.dexpaprika.com`. Keyless and free keys cannot call it: fall back to `getPoolOHLCV` on the token's most liquid pool.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `token_address` | yes | string | | Token address |
| `start` | yes | string | | A relative offset such as `-24h`, UNIX timestamp, RFC3339, or `yyyy-mm-dd` |
| `end` | no | string | | Same formats as `start` |
| `limit` | no | number | 10 | Max 1000 |
| `interval` | no | enum | `24h` | `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h` |
### getTokenIndicator
The same indicators computed from a token's USD candles across every pool it trades in. Same parameters as `getPoolIndicator`, with `token_address` in place of `pool_address`.
Needs a Dev, Pro or Enterprise key. On the hosted server it runs on your own key, sent as the `Authorization` header on your connection ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)); without one it returns `DP401_API_KEY_REQUIRED`. With the npm package, set `DEXPAPRIKA_API_KEY` and `DEXPAPRIKA_API_BASE_URL=https://api-pro.dexpaprika.com`. Keyless and free keys cannot call it: fall back to `getPoolIndicator` on the token's most liquid pool.
### getTokenMultiPrices
Current USD prices for up to 10 tokens on the same network in one batched call. Tokens that cannot be priced come back under `missing_tokens` rather than being dropped, so check that list for partial failures.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `tokens` | yes | string\[] | | 1 to 10 token addresses on the same network |
### filterNetworkTokens
Tokens on one network filtered by exact thresholds for volume, liquidity, FDV, transactions, or creation time. Choose this over `getTopTokens` when the user gives numeric constraints.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `limit` | no | number | 50 | Max 100 |
| `cursor` | no | string | | Cursor pagination |
| `volume_24h_min` / `volume_24h_max` | no | number | | 24h volume in USD |
| `liquidity_usd_min` / `liquidity_usd_max` | no | number | | Token liquidity in USD |
| `fdv_min` / `fdv_max` | no | number | | Fully diluted valuation in USD |
| `txns_24h_min` | no | number | | Minimum 24h transactions |
| `created_after` / `created_before` | no | string | | Creation-time window, both ends included: a relative offset such as `-24h`, Unix seconds, RFC3339 or `YYYY-MM-DD` |
| `sort_by` | no | enum | `volume_usd_24h` | `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `fdv_usd`, `price_change_percentage_24h`, `created_at` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
As with pools, tokens created in the last hour are left out on the hosted server.
### getTopTokens
The top tokens on one network ranked by volume, liquidity, transactions, FDV, or 24h price change.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `limit` | no | number | 50 | Max 100 |
| `cursor` | no | string | | Cursor pagination |
| `sort_by` | no | enum | `volume_usd_24h` | Same token sort fields as `filterNetworkTokens` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
Ranking by raw price is not supported and falls back to volume.
***
## DEXes
### getNetworkDexes
The DEXes (exchanges) operating on one specific network, for example Uniswap on ethereum or Raydium on solana. Use the returned `dex_id` with `getDexPools`. Each row carries both `dex_id` and `dex_name`.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `network` | yes | string | | Network slug |
| `page` | no | number | 1 | 1-indexed |
| `limit` | no | number | 10 | Max 100 |
| `sort_by` | no | enum | | Only `pool` |
| `sort_dir` | no | `asc`/`desc` | `desc` | |
***
## Feedback (hosted server only)
### submitFeedback
Report a problem, unexpected response, or missing data back to the DexPaprika team. Available on the hosted server (`mcp.dexpaprika.com`) only; the self-host build does not include it. Unlike the read tools, it takes no `rationale`, the fields below are the context.
| Param | Required | Type | Default | Notes |
| - | - | - | - | - |
| `goal` | yes | string | | What you were trying to accomplish (10-500 chars) |
| `attempted_tools` | no | string\[] | | Tools you tried before getting stuck |
| `blocked_at` | no | string | | Where exactly you got blocked |
| `expected` | no | string | | What you expected to happen |
| `observed` | no | string | | What actually happened |
| `severity` | no | enum | `minor` | `blocker`, `major`, `minor`, `nit` |
***
## Recommended call sequences
Common tasks map to short tool chains. `getCapabilities` returns this list at runtime.
| Task | Sequence |
| - | - |
| Discover supported chains | `getNetworks` |
| Top pools on a chain | `getNetworks` then `getNetworkPools` |
| Pools above a volume/liquidity threshold | `getNetworks` then `getNetworkPoolsFilter` |
| Newly created pools (older than an hour) | `getNetworkPoolsFilter` with `created_after`, sort `created_at` desc |
| Token profile and its venues | `getTokenDetails` then `getTokenPools` |
| Pools on one DEX | `getNetworkDexes` then `getDexPools` with the `dex_id` |
| Batch price snapshot | `getTokenMultiPrices` (max 10 tokens) |
| Top or filtered tokens | `getTopTokens` or `filterNetworkTokens` |
| Historical price chart | `getPoolOHLCV` with `start` and `interval` |
| Token price history across all pools | `getTokenOHLCV` (your Dev or Pro key); without one, `getTokenPools` then `getPoolOHLCV` |
| Technical indicators (RSI, MACD, Bollinger Bands) | `getPoolIndicator` on the pool; `getTokenIndicator` for a token across all its pools (your Dev or Pro key) |
| Raw swap feed | `getPoolTransactions` with `from`/`to` (your Dev or Pro key); without one, `getPoolDetails` for counts |
| Find something across all chains | `search` |
## Common pitfalls
* **List tools return rows under `results`** (not `pools`/`tokens`/`data`) with cursor pagination (`has_next_page` + `next_cursor`), not page numbers. This applies to `getNetworkPools`, `getNetworkPoolsFilter`, `getDexPools`, `getTokenPools`, `getTopTokens`, and `filterNetworkTokens`.
* **`getDexPools` reads a filter, not a path.** The REST endpoint it used to wrap was removed and returns `410 Gone`; the tool now calls pool search with `dex_name`. If you were building the old URL by hand, stop: there is no `page`, and the 24h volume field is `volume_usd_24h`.
* **`getTokenPools` is network-scoped.** The cross-network `search` cannot filter by token. An unknown `token_address` returns empty `results`, not an error. The old pair-flip and second-token parameters were removed and now return a structured error.
* **Sort field names are canonical.** Prefer `volume_usd_24h`, `txns_24h`, `price_change_percentage_24h`, `fdv_usd`. Short legacy names are auto-mapped. Tokens cannot be ordered by raw price.
* **Every price change window but 24h is pool-only.** `price_change_percentage_48h`, `_6h`, `_1h` and `_5m` sort the four tools that return pool rows: `getNetworkPools`, `getNetworkPoolsFilter`, `getDexPools` and `getTokenPools`. Only `getNetworkPoolsFilter` takes them as `_min` / `_max` bounds. The token tools (`getTopTokens`, `filterNetworkTokens`) sort by `price_change_percentage_24h` and no other window, and token rows never include those four fields. The 48h window needs dexpaprika-mcp 2.7.3 or later.
* **`filterNetworkTokens` has no price-change bound.** The REST endpoint behind it, `GET /networks/{network}/tokens/search`, does accept `price_change_percentage_24h_min` / `_max`, and the tool does not surface them. Call the endpoint directly when you need to screen tokens by 24h move.
* **`getTokenMultiPrices` is capped at 10 tokens** per request.
* **`getPoolTransactions` `from`/`to` take a relative offset** such as `-1h`, as well as Unix seconds, RFC3339 or `YYYY-MM-DD`. Results are always capped to the last 7 days.
* **Token addresses must match the network.** Do not send a Solana address to an ethereum query.
## FAQs
> [accordion] How many tools does the DexPaprika MCP server have?
>
> 20: nineteen read-only data tools plus `submitFeedback`, which is available on the hosted server only. Call `getCapabilities` for the live list.
> [accordion] Do I need an API key to call the tools?
>
> For every tool but three, no. `getTokenOHLCV`, `getTokenIndicator` and `getPoolTransactions` need a Dev, Pro or Enterprise key: on the hosted server it is your own key, sent as the `Authorization` header ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)). The npm package calls the API from your machine, so your own plan's limits apply there; see [rate limits](/knowledge-base/rate-limits) and [pricing](https://dexpaprika.com/api/pricing).
> [accordion] What is the rationale field for?
>
> Every read tool requires a short `rationale` string describing why you are calling it. It is logged to improve the server and is never shown to end users. Include no secrets or personal data.
> [accordion] How does pagination work?
>
> Most list tools use cursor pagination: read `has_next_page` and pass `next_cursor` back as `cursor`. `getNetworkDexes` and `getPoolTransactions` are the two that still use 1-indexed `page` numbers.
# Use DexPaprika in n8n
Source: https://docs.dexpaprika.com/ai-integration/n8n
Two ways to use live DEX market data in n8n: the dedicated n8n-nodes-dexpaprika community node with typed operations, or the built-in MCP Client Tool pointed at the keyless hosted MCP server. No API key needed to start.
There are two ways to pull live DexPaprika data into n8n, and both are keyless:
* **The dedicated `n8n-nodes-dexpaprika` community node** gives you typed operations (token prices, pools, OHLCV, search) you can drop straight into a workflow or hand to an AI Agent as a tool.
* **The built-in MCP Client Tool node** connects an AI Agent to all 18 DexPaprika tools over the hosted MCP server with nothing to install.
Use the community node when you want explicit, deterministic steps in a workflow. Use the MCP Client Tool when you want a model to pick from the full tool set on its own.
## Option 1: the DexPaprika community node
`n8n-nodes-dexpaprika` is published on npm and carries the `n8n-community-node-package` tag, so it shows up in n8n's community node search.
### Install
On a self-hosted n8n instance:
1. Go to **Settings > Community Nodes**.
2. Click **Install**.
3. Enter `n8n-nodes-dexpaprika` and confirm.
The **DexPaprika** node then appears in the node panel.
> [!NOTE]
>
> Community nodes install on self-hosted n8n. We are submitting the node to the n8n Creator Portal for the verified badge, which also makes verified nodes available on n8n Cloud.
### Operations
The node covers three resources:
* **Token**: search, get details, get USD prices for up to 10 tokens at once, get top tokens on a network, and, with a Dev, Pro or Enterprise key, token OHLCV and technical indicators.
* **Pool**: get top pools on a network, get pool details, get historical OHLCV candles, get a technical indicator (RSI, EMA, MACD, Bollinger Bands or VWAP) on every plan. Indicators need node version 0.5.0 or later.
* **Network**: list networks, list DEXes on a network, get platform stats.
It is also marked `usableAsTool`, so you can wire it into an **AI Agent** node's **Tool** input and let the agent call these operations directly.
## Option 2: the built-in MCP Client Tool node
If you would rather not install anything, n8n's **MCP Client Tool** node connects an AI Agent to the hosted server and exposes all 20 tools.
1. In your workflow, add an **AI Agent** node (Tools Agent).
2. Add an **MCP Client Tool** node and connect its output into the AI Agent node's **Tool** input.
3. On the MCP Client Tool node, create an MCP credential:
* **Transport:** SSE
* **SSE Endpoint:** `https://mcp.dexpaprika.com/sse`
* **Authentication:** None
4. Set **Tools to Include** to **All**.
The agent can now call any of the 18 DexPaprika tools when it needs live data.
> [!NOTE]
>
> Use the **SSE** transport. n8n also has an HTTP Streamable option, but an open issue (n8n-io/n8n#24967) reports the transport selector being ignored on some builds, so prefer SSE until it is confirmed fixed on your version.
## Tools and the rationale field
The hosted server exposes all 18 DexPaprika tools: networks, pools, tokens, OHLCV, transactions, and cross-chain search. See the [MCP tools reference](/ai-integration/mcp-tools) for the full list.
Every read tool takes a required `rationale` string. It is part of each tool's schema, so the agent model fills it automatically. If you drive the agent with a smaller model and hit validation errors, add an instruction telling it to include a short rationale.
## Example
Wire either node into a Tools Agent and prompt it with, for example, "What are the top 5 pools on Base by 24h volume?" The agent calls the top-pools operation and returns live results, which you can pass to any downstream n8n node (a message, a spreadsheet, a database).
## Resources
* [n8n-nodes-dexpaprika on npm](https://www.npmjs.com/package/n8n-nodes-dexpaprika)
* [n8n community nodes docs](https://docs.n8n.io/integrations/community-nodes/installation/)
* [n8n MCP Client Tool node docs](https://docs.n8n.io)
* [Hosted MCP server](/ai-integration/hosted-mcp-server)
* [MCP tools reference](/ai-integration/mcp-tools)
## FAQs
> [accordion] Do I need an API key?
>
> No. The hosted server and the community node both read keyless. The community node calls the API directly, so a [free key](https://console.dexpaprika.com) in its credential raises your allowance; see [rate limits](/knowledge-base/rate-limits). The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server).
> [accordion] Community node or MCP Client Tool?
>
> The community node gives typed operations you can place directly in a workflow or attach to an AI Agent. The built-in MCP Client Tool needs no install and exposes all 20 tools to an agent. Pick the node for deterministic steps, the MCP Client Tool for open-ended agent use.
> [accordion] How do I install the community node?
>
> On self-hosted n8n, go to Settings > Community Nodes, click Install, and enter `n8n-nodes-dexpaprika`. Verified nodes are also available on n8n Cloud; our Creator Portal submission is in progress.
> [accordion] SSE or HTTP Streamable for the MCP Client Tool?
>
> Use SSE (`https://mcp.dexpaprika.com/sse`) for now. HTTP Streamable exists but has a known transport-selection bug on some n8n builds.
# Install DexPaprika agent skills
Source: https://docs.dexpaprika.com/ai-integration/skills
Add the DexPaprika skill to Claude Code, Cursor, or any compatible AI agent with one command. Gives your agent full knowledge of the DexPaprika REST API, CLI, and streaming service.
## What are agent skills?
Agent skills are reusable instruction files that teach AI agents how to use a specific tool or API. When you install the DexPaprika skill, your AI agent gets a complete reference of every endpoint, CLI command, streaming parameter, and common workflow, so it can make correct API calls without guessing.
> [!NOTE]
>
> Skills work with Claude Code, Cursor, Cline, OpenCode, and [many other AI agents](https://github.com/vercel-labs/skills). One install command, and no API key needed to start.
***
## What's included
The DexPaprika skill installs the following files into your project:
| File | What it provides |
| - | - |
| `SKILL.md` | Full API reference: all REST endpoints, CLI commands, MCP setup, streaming API, SDKs, common workflows, token addresses, pagination, error handling |
| `references/openapi.yml` | Complete OpenAPI 3.1 specification with all schemas, parameters, and response types |
| `references/cli-reference.md` | Every `dexpaprika-cli` command with flags, examples, and output formats |
| `references/streaming-api.md` | SSE streaming documentation: GET/POST endpoints, response fields, connection handling |
Your AI agent reads `SKILL.md` automatically. The reference files are loaded on demand when the agent needs deeper detail (like exact response schemas or CLI flag options).
***
## Install
### One command
```bash theme={null}
npx skills add github.com/coinpaprika/skills/ --skill dexpaprika-api
```
This copies the skill files into `.claude/skills/dexpaprika-api/` in your current project.

> [!TIP]
>
> To install both CoinPaprika and DexPaprika skills at once, drop the `--skill` flag:
>
> ```bash theme={null}
> npx skills add github.com/coinpaprika/skills/
> ```
### What happens
1. The `skills` CLI (by [Vercel Labs](https://github.com/vercel-labs/skills)) fetches the skill from GitHub
2. Files are copied to `.claude/skills/dexpaprika-api/`
3. On next startup, your AI agent auto-discovers and loads the skill
Your project directory should now look like this:
```
.claude/skills/
dexpaprika-api/
SKILL.md
references/
openapi.yml
cli-reference.md
streaming-api.md
```

### Restart your agent
After installing, restart Claude Code (or your AI tool) so it picks up the new skill files.
***
## Verify it works
After restarting, ask your AI agent a DexPaprika question:
```
What blockchain networks does DexPaprika support?
```
The agent should return a list of supported networks (Ethereum, Solana, Base, Arbitrum, Polygon, and more). If it does, the skill is loaded and working.
Try a more specific query:
```
Get the current price of WETH on Ethereum using DexPaprika
```
The agent should call `https://api.dexpaprika.com/networks/ethereum/tokens/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` and return the price.

***
## Example queries
Once the skill is loaded, your agent knows how to use the full DexPaprika stack. Here are some things you can ask:
### REST API queries
```
Show me the top 5 pools on Ethereum by 24h volume
```
```
Get hourly OHLCV for the last day for the USDC/ETH pool on Uniswap V3
```
```
Search for PEPE token across all chains
```
### CLI commands
The skill teaches your agent to use `dexpaprika-cli` if it's installed:
```
Use dexpaprika-cli to stream live prices for WETH on Ethereum
```
```
Run dexpaprika-cli to find newly created pools on Solana
```
### Batch pricing
```
Get prices for WETH, USDC, and DAI on Ethereum in a single request
```
### Streaming
```
Write a Python script that streams real-time WETH prices using DexPaprika's SSE endpoint
```
***
## Skills vs MCP server vs Claude Code plugin
| | Agent Skills | Hosted MCP Server | Claude Code Plugin |
| - | - | - | - |
| **Install** | `npx skills add` | Add URL to config | `/plugin install` |
| **What it gives the agent** | Full API knowledge (endpoints, CLI, streaming docs) | Live tool calls (20 MCP tools) | MCP tools + agents + skills |
| **Agent makes API calls** | Yes, directly via REST or CLI | No, MCP server handles calls | MCP server handles calls |
| **Works offline** | Yes (skill files are local) | No (needs mcp.dexpaprika.com) | No (needs MCP server) |
| **Works with** | Claude Code (default), Cursor, Cline, and more via `--agent` flag | Claude Desktop, Cursor, VS Code | Claude Code only |
| **Best for** | Any agent that can make HTTP calls or run CLI commands | Quick AI IDE setup with managed tools | Claude Code users who want everything bundled |
> [!NOTE]
>
> You can combine approaches. Install the skill for API knowledge **and** connect the MCP server for tool-based access. They complement each other.
***
## Manage skills
### List installed skills
```bash theme={null}
npx skills list
```
### Remove the skill
```bash theme={null}
npx skills remove dexpaprika-api
```
### Update to latest version
```bash theme={null}
npx skills update
```
***
## Troubleshooting
> [accordion] Skill not loading after install
>
> Restart your AI agent (Claude Code, Cursor, etc.). Skills are discovered at startup. If it still doesn't load, check that the files are in the right location:
>
> ```bash theme={null}
> ls .claude/skills/dexpaprika-api/
> ```
>
> You should see `SKILL.md` and a `references/` directory.
> [accordion] npx skills command not found
>
> The `skills` CLI requires Node.js. Make sure you have Node.js 16+ installed:
>
> ```bash theme={null}
> node --version
> ```
>
> If Node.js is installed and it still fails, try running with a fresh npx cache:
>
> ```bash theme={null}
> npx --yes skills add github.com/coinpaprika/skills/ --skill dexpaprika-api
> ```
> [accordion] Agent not using DexPaprika for queries
>
> Be specific in your prompt. Instead of "What's the price of ETH?", try "Using the DexPaprika API, get the price of WETH on Ethereum." The agent should recognize the skill context and use the correct endpoints.
> [accordion] Wrong directory structure
>
> Skills must be direct children of `.claude/skills/`. If the files ended up nested differently (e.g., `.claude/skills/skills/dexpaprika-api/`), move the `dexpaprika-api` folder so it sits directly inside `.claude/skills/`. See the directory tree in the [Install](#install) section for the expected layout.
***
## Next steps
> [card] [CLI guide](/tutorials/cli)
>
> Install dexpaprika-cli for direct terminal access to all endpoints
> [card] [Hosted MCP Server](/ai-integration/hosted-mcp-server)
>
> Add MCP server access to Claude Desktop, Cursor, or VS Code
> [card] [Claude Code Plugin](/ai-integration/claude-code-plugin-guide)
>
> Get the full plugin bundle with MCP tools, agents, and skills
> [card] [REST API Reference](/api-reference/introduction)
>
> Complete endpoint documentation with interactive playground
***
## Get support
> [card] [Join Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support.
> [card] [Give Feedback](mailto:support@coinpaprika.com)
>
> Share your experience and help us improve.
### FAQs
> [accordion] Do I need an API key?
>
> Not to start. Keyless requests work at 10,000 credits per rolling 30 days per IP, and [registering a free key](https://console.dexpaprika.com) raises that to 100,000. The skill teaches your agent to call the API directly either way.
> [accordion] What's the difference between skills and MCP?
>
> Skills give your agent knowledge (API docs, CLI commands, common patterns). MCP gives your agent tools (callable functions that return live data). Skills make your agent smarter about the API; MCP does the calling for it.
> [accordion] Which AI agents support skills?
>
> Claude Code, Cursor, Cline, OpenCode, Aider, and many others. The `skills` CLI auto-detects your agent, or you can target one explicitly with the `--agent` flag. See the [full list of supported agents](https://github.com/vercel-labs/skills).
> [accordion] Can I use skills and MCP together?
>
> Yes. Install the skill for deep API knowledge and connect the MCP server for tool-based access. They complement each other well.
> [accordion] Does installing the skill send data to DexPaprika?
>
> No. The skill files are static reference documents stored locally in your project. Your agent reads them locally. API calls only happen when your agent decides to query the DexPaprika API based on what it learned from the skill.
# Use DexPaprika with the Vercel AI SDK
Source: https://docs.dexpaprika.com/ai-integration/vercel-ai-sdk
Pull all 18 DexPaprika tools into the Vercel AI SDK with createMCPClient and the keyless hosted MCP server, then use them with generateText and streamText. No custom code.
The Vercel AI SDK's MCP client connects to DexPaprika's hosted server and returns all 20 tools as ready-to-use AI SDK tools. Drop them into `generateText` or `streamText`. Keyless, no custom code.
## Install
```bash theme={null}
npm install ai @ai-sdk/mcp @ai-sdk/anthropic
```
> [!NOTE]
>
> The AI SDK moves quickly. These snippets were verified against `ai@7.0.40` and `@ai-sdk/mcp@2.0.18`; pin those versions, or check the current [AI SDK MCP docs](https://ai-sdk.dev) if the API has shifted.
## Connect and get the tools
```ts theme={null}
import { createMCPClient } from '@ai-sdk/mcp';
const mcp = await createMCPClient({
transport: { type: 'http', url: 'https://mcp.dexpaprika.com/streamable-http' },
});
const tools = await mcp.tools(); // all 18 DexPaprika tools
```
## Use them in a generation
```ts theme={null}
import { generateText } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
const { text } = await generateText({
model: anthropic('claude-sonnet-5'),
tools,
maxSteps: 5,
prompt: 'Find the most liquid WETH pool on ethereum and report its 24h volume.',
});
console.log(text);
await mcp.close();
```
Call `mcp.close()` when you are done so the connection is released. Swap in any AI SDK model provider you prefer.
## Tools and the rationale field
The client returns all 18 DexPaprika tools: networks, pools, tokens, OHLCV, transactions, and cross-chain search. See the [MCP tools reference](/ai-integration/mcp-tools) for the full list.
Every read tool takes a required `rationale` string. It is part of each tool's schema, so a capable model fills it automatically. If a smaller model omits it and errors, add a system instruction telling it to include a short rationale.
## Resources
* [Vercel AI SDK docs](https://ai-sdk.dev)
* [Hosted MCP server](/ai-integration/hosted-mcp-server)
* [MCP tools reference](/ai-integration/mcp-tools)
## FAQs
> [accordion] Do I need an API key for DexPaprika?
>
> No. The hosted server is keyless for read access. You still need a key for your model provider (Anthropic, OpenAI, and so on). The hosted server runs tool calls on its own shared capacity, not on a plan of yours, so a key raises no limit there. The exceptions are the tools that need a paid plan, which run on your own Dev, Pro or Enterprise key; see [the hosted server page](/ai-integration/hosted-mcp-server). Limits for direct REST calls are on [rate limits](/knowledge-base/rate-limits).
> [accordion] Which transport does the AI SDK use?
>
> Streamable HTTP: `https://mcp.dexpaprika.com/streamable-http`. The server also serves SSE if you configure the client for it.
> [accordion] Do I have to define the tools myself?
>
> No. `mcp.tools()` discovers all 20 tools from the server and returns them in the AI SDK tool shape.
# Vibe code a crypto dashboard with AI
Source: https://docs.dexpaprika.com/ai-integration/vibe-coding-with-ai
Use Claude Code, Cursor, or any AI-assisted IDE with DexPaprika access to build a crypto dashboard from a natural language prompt. No manual API calls, let the AI do the work.
## What is vibe coding?
Vibe coding means describing what you want in natural language and letting an AI assistant write the code. With DexPaprika connected to your AI tool, the AI can fetch real crypto data while it builds, testing endpoints, checking response shapes, and writing working code from the start.
This tutorial shows the workflow, not a fixed script. Your results will vary based on your AI tool, your prompts, and what you ask for.
***
## Prerequisites
Connect DexPaprika to your AI tool using one of these methods:
| Tool | Setup |
| - | - |
| **Claude Code** | `/plugin marketplace add coinpaprika/claude-marketplace` then `/plugin install dexpaprika` |
| **Cursor** | Add MCP server URL `https://mcp.dexpaprika.com/sse` in Settings → Tools & Integrations |
| **VS Code** | Add MCP server via Copilot Chat settings |
| **Claude Desktop** | Add `"dexpaprika": {"url": "https://mcp.dexpaprika.com/sse"}` to `claude_desktop_config.json` |
See the [AI Integration overview](/ai-integration) for detailed setup instructions.
***
## Example 1: "Build me a token price dashboard"
### The prompt
Give your AI a clear, specific prompt:
```
Build a single-page HTML dashboard that shows:
1. The current price of SOL, ETH, and BTC
2. Their 24h volume and price change percentage
3. Auto-refreshes every 30 seconds
Use the DexPaprika API. No frameworks, just vanilla HTML, CSS, and JavaScript.
The SOL address on Solana is So11111111111111111111111111111111111111112.
Use the search endpoint to find ETH and BTC addresses.
```
### What happens
The AI will:
1. Call the DexPaprika search endpoint to find ETH and BTC token addresses and networks
2. Read the token details endpoint to understand the response format
3. Write HTML/CSS/JS that fetches from the DexPaprika REST API
4. Use `summary.price_usd` for the price, `summary.24h.volume_usd` for volume, and `summary.24h.last_price_usd_change` for the percentage change
5. Add a `setInterval` for auto-refresh
### Tips for better results
* **Be specific about data fields.** "Show the 24h price change" is better than "show some stats"
* **Name the tokens and networks.** Don't assume the AI knows every address
* **Mention the API by name.** Say "Use the DexPaprika API" so the AI uses the MCP tools or REST endpoints
* **Start simple, then iterate.** Get a working version first, then ask for styling, charts, or more features
***
## Example 2: "Find me the hottest new pools"
### The prompt
```
Use DexPaprika to find pools created in the last 24 hours on Solana
that have more than $10,000 in daily volume and at least 100 transactions.
Show them in a table sorted by volume, with the pool address, DEX, volume,
and transaction count.
```
### What the AI does
The AI will use the pool search endpoint:
```
GET /networks/solana/pools/search?created_after=-24h&volume_usd_24h_min=10000&txns_24h_min=100&order_by=volume_usd_24h&sort=desc
```
Then format the results. It might also follow up with pool detail calls to get token pair names.
***
## Example 3: "Build a price comparison tool"
### The prompt
```
Build a Python script that compares the price of WETH across Ethereum,
Arbitrum, and Base networks. Use DexPaprika batch pricing.
Show the price on each network and highlight the highest and lowest.
```
### What the AI does
1. Finds WETH addresses on each network (via search or by knowing common addresses)
2. Makes three batch pricing calls (one per network)
3. Compares results and formats output
***
## Example 4: "Add a live price ticker"
### The prompt
```
Add a live price ticker to the dashboard that streams real-time prices
for SOL and ETH using the DexPaprika streaming API at
streaming.dexpaprika.com. Use Server-Sent Events.
```
### What the AI does
The AI will use the streaming API:
```javascript theme={null}
const evtSource = new EventSource(
"https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=solana&address=So11111111111111111111111111111111111111112"
);
evtSource.addEventListener("token_price", (event) => {
const data = JSON.parse(event.data);
// data.price is the price as a string; parse as decimal for precision
updatePrice(data.chain, data.address, data.price);
});
```
For multiple tokens, the AI should use the POST endpoint with a JSON array.
***
## Iteration tips
Once you have a working first version, iterate with follow-up prompts:
* "Add a chart showing the last 7 days of price history" (AI will use OHLCV endpoint)
* "Show the top 5 pools for each token" (AI will use pool search with the `token_address` filter)
* "Add error handling for when the API is down"
* "Make it responsive for mobile"
* "Add dark mode"
* "Export the data to CSV"
Each iteration builds on the previous code. The AI already has context about which endpoints to use and what the response formats look like.
***
## Common issues
> [accordion] AI doesn't use DexPaprika
>
> Be explicit: "Use the DexPaprika API at api.dexpaprika.com" or "Use the DexPaprika MCP tool." If using an IDE integration, make sure the MCP server is connected and showing as active.
> [accordion] AI uses wrong endpoint or field names
>
> Point the AI to specific documentation: "Check the token endpoint response format at docs.dexpaprika.com" or provide the correct field path directly: "The price is at response.summary.price_usd, not response.price."
> [accordion] CORS errors in browser
>
> The API doesn't send CORS headers to other sites, so a browser blocks direct calls to `api.dexpaprika.com` and `streaming.dexpaprika.com` from your page. Changing the URL won't fix it. Make the call from your backend or a small proxy (a Next.js route handler, a Cloudflare Worker) and have the page call that. Tell the AI exactly that: "Fetch DexPaprika from a server route, not from the browser." [Response headers and CORS](/knowledge-base/response-headers#cors) has the options.
> [accordion] AI hallucinates endpoints that don't exist
>
> If the AI invents endpoints, ground it: "Only use endpoints from the DexPaprika API reference at docs.dexpaprika.com/api-reference/introduction. The available endpoints are: /networks, /search, /networks//pools, /networks//tokens/, /networks//pools//ohlcv, etc."
***
## Next steps
> [card] [AI Integration Setup](/ai-integration)
>
> Connect DexPaprika to your AI tool
> [card] [Common Patterns](/knowledge-base/common-patterns)
>
> Standard API workflows to reference in your prompts
> [card] [Streaming API](/streaming/introduction)
>
> Real-time price streaming for live dashboards
> [card] [Pool Filtering](/tutorials/pool-filtering)
>
> Advanced pool screening with the filter endpoint
# Connect DexPaprika MCP to VS Code
Source: https://docs.dexpaprika.com/ai-integration/vscode-ide-integration
Learn how to integrate DexPaprika documentation and the hosted MCP server directly into VS Code for enhanced AI-assisted workflows.
## Integration overview
Add the hosted MCP server to VS Code’s Copilot Chat and index docs for better AI assistance.
## What is VS Code?
Visual Studio Code is a popular open-source editor with rich AI and extension capabilities. With MCP (Model Context Protocol) support in Copilot Chat, VS Code can access external data sources and documentation to provide more intelligent coding assistance.
## Why integrate DexPaprika with VS Code?
* **Real-time crypto data access** - Live market data, pool information, and token prices while coding
* **Enhanced AI assistance** - Copilot Chat can reference DexPaprika data for better suggestions
* **DeFi development workflow** - Build faster with comprehensive blockchain data
* **Documentation context** - Quickly reference our API docs and tutorials while you work
***
## Step 1: Install with one click
> [card] [Add DexPaprika to VS Code](vscode:mcp/install?%7B%22name%22%3A%22DexPaprika%20API%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.dexpaprika.com%2Fsse%22%7D)
>
> Opens VS Code and pre-fills the DexPaprika MCP server (`https://mcp.dexpaprika.com/sse`) in Copilot Chat. Click **Install**, then restart VS Code if prompted.
Prefer to configure it manually? Follow the steps below.
**1. Confirm the Server URL**
1. The install dialog pre-fills the DexPaprika hosted MCP SSE URL:
```
https://mcp.dexpaprika.com/sse
```
2. Click **Install** to complete the setup
3. Restart VS Code if prompted

**2. Verify MCP Integration**
1. Open **Copilot Chat** in VS Code
2. Ask: "What are the top liquidity pools on Ethereum?"
3. You should see DexPaprika data being retrieved and displayed
4. Ask about specific networks, tokens, or pools to test further

> [!NOTE]
>
> If the button is not visible, copy this URL into the prompt when VS Code asks for the server address: `https://mcp.dexpaprika.com/sse`.
## Available features
Once integrated, you can access comprehensive DexPaprika functionality in Copilot Chat:
### Real-time data access
* **Network information** - Supported blockchain networks
* **DEX data** - Decentralized exchange information and metrics
* **Pool analytics** - Real-time liquidity pool data, volumes, and fees
* **Token information** - Current prices, market data, and token details
* **Search functionality** - Find tokens, pools, and DEXes across networks
### Documentation context
* **API reference** - Complete endpoint docs and examples
* **SDK guides** - Language-specific integration tutorials
* **Best practices** - Coding patterns and optimization tips
* **Troubleshooting** - Common issues and solutions
***
## Usage examples
### Example 1: Building a DeFi dashboard
```
"Help me create a React component that displays the top 5 liquidity pools
on Ethereum using the DexPaprika API. Include volume, TVL, and price data."
```
### Example 2: Token price monitoring
```
"Build a Python script that monitors SOL token prices across different
DEXes and alerts when there are significant price differences."
```
### Example 3: Pool discovery bot
```
"Create a Node.js application that finds newly created liquidity pools
with high trading volume and sends notifications."
```
***
## Troubleshooting
> [accordion] MCP server connection issues
>
> **Symptoms**: Errors or timeouts when connecting.
>
> **Solutions**:
>
> 1. Verify internet connection is stable
> 2. Check the server URL is exactly: `https://mcp.dexpaprika.com/sse`
> 3. Restart VS Code completely
> 4. Remove and re-add the MCP configuration
> 5. Check VS Code output/logs for MCP-related errors
> [accordion] No tools or data showing in chat
>
> **Symptoms**: DexPaprika tools do not appear or responses lack data.
>
> **Solutions**:
>
> 1. Ensure the server is added and enabled in MCP settings
> 2. Try re-adding via the **Connect to VS Code** button
> 3. Ask more specific questions (e.g., network or token names)
> 4. Restart VS Code
> [accordion] Performance issues
>
> **Symptoms**: Slow responses.
>
> **Solutions**:
>
> 1. Check network speed
> 2. Break complex queries into smaller parts
> 3. Use specific network/token names in queries
***
## Need help?
> [card] [Join Our Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community for real-time support and discussions
> [card] [Direct Support](mailto:support@coinpaprika.com)
>
> Contact our team for technical assistance and custom integrations
> [!NOTE]
>
> Share your VS Code + DexPaprika integrations with our community! We love seeing what developers build. [Reach out](mailto:support@coinpaprika.com) to showcase your work.
### FAQs
> [accordion] How do I add the hosted MCP URL manually?
>
> In the MCP prompt, paste `https://mcp.dexpaprika.com/sse`, confirm, and restart VS Code if needed.
> [accordion] Copilot Chat doesn’t show DexPaprika tools?
>
> Re-add the server and retry a scoped prompt (include network or token) to ensure the tools activate.
> [accordion] How to debug connection errors?
>
> Check the Output/Logs panel for MCP errors, verify the URL, and restart VS Code; re-add the server if necessary.
# Pro API: authenticated access on api-pro.dexpaprika.com
Source: https://docs.dexpaprika.com/api-pro/introduction
api-pro.dexpaprika.com serves paid plans only and needs your API key in the Authorization header. What to send, what each error means, and how to move an existing integration across.
`api-pro.dexpaprika.com` serves paid plans only. Every request to it needs your API key in the `Authorization` header, sent as the entire header value with no scheme word in front of it.
If you are keyless or on a free key, this is not your host. Build against `api.dexpaprika.com`, where the same endpoints, paths and parameters answer with the same data, except [token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) and [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages), which need a paid plan. Get or copy your key in [console.dexpaprika.com](https://console.dexpaprika.com), compare plans on [pricing](https://dexpaprika.com/api/pricing), and if you already have a working free-tier integration, [upgrading to Pro](/api-pro/upgrading) is the whole list of changes it needs.
```bash A request that works theme={null}
curl "https://api-pro.dexpaprika.com/networks" \
-H "Authorization: api_YOUR_KEY"
```
## If your request just failed
| What you sent | What comes back |
| - | - |
| No `Authorization` header, on `/` | `401` and JSON: `{"message": "missing or invalid api key"}` |
| No `Authorization` header, on a data path | `403` and an HTML block page from the edge, with no JSON body |
| A key we do not recognise | `401` and JSON: `{"message": "api key verification has failed"}` |
| A free key | `403` and JSON carrying `"error": "wrong_host"`, naming `api.dexpaprika.com` as your host |
The HTML body is the one that surprises people. This host sits behind an edge rule that can reject a request before it reaches the API, and that rule answers with an HTML page rather than the JSON everything else here returns. Treat an HTML body as a prompt to check the header and the base URL first, before you regenerate anything. Every status code and body is listed on [error handling](/knowledge-base/error-handling).
## What Pro changes
Both hosts serve the same data on the same 35 chains, and every free endpoint is here too. What changes is freshness, headroom, OHLCV depth, access to [token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) and [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages), and support. Free-tier responses can be up to 60 seconds behind; Pro is real time. Pro also raises the monthly credit allowance and the per-minute rate, carries a 99.5% SLA, and includes priority support. Current numbers for every tier are on [rate limits](/knowledge-base/rate-limits) and [pricing](https://dexpaprika.com/api/pricing).
Enterprise is this same host and this same API, with the limits set per contract.
***
## Getting started
### 1. Get your API key
Pro is self-serve. You do not need to talk to anyone to start.
**1. Create your account**
Sign up at [console.dexpaprika.com](https://console.dexpaprika.com). No card
is required to create the account.
**2. Subscribe to Pro**
Pick Pro on the [pricing page](https://dexpaprika.com/api/pricing) at
$99/month, or $1,032 billed annually. Enterprise is the same API with limits
agreed per contract; that one does start with a conversation.
**3. Copy your key**
Your key is under **Keys** in the console. Each account has a single API key,
so this is the one you use everywhere.
> [card] [Open the console](https://console.dexpaprika.com)
>
> Create an account, manage your subscription, and read your usage
> [card] [Customer portal](https://console.dexpaprika.com)
>
> Create your API key and track credit usage
Enterprise is the one that goes through us. [Email the team](mailto:support@coinpaprika.com) for custom limits, unmetered streaming and a 99.95% SLA.
> [!NOTE]
>
> Building on the free tier first is the right move: `api.dexpaprika.com` needs
> no key at all and serves the same data. Come here when you hit the ceiling.
### 2. Authentication
All Pro API requests require authentication via the `Authorization` header:
```bash cURL theme={null}
curl "https://api-pro.dexpaprika.com/networks/ethereum/pools/search" \
-H "Authorization: api_YOUR_API_KEY_HERE"
```
```python Python theme={null}
import requests
headers = {
"Authorization": "api_YOUR_API_KEY_HERE"
}
response = requests.get(
"https://api-pro.dexpaprika.com/networks/ethereum/pools/search",
headers=headers
)
print(response.json())
```
```javascript JavaScript theme={null}
const headers = {
'Authorization': 'api_YOUR_API_KEY_HERE'
};
fetch('https://api-pro.dexpaprika.com/networks/ethereum/pools/search', {
headers: headers
})
.then(response => response.json())
.then(data => console.log(data));
```
```go Go theme={null}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-pro.dexpaprika.com/networks/ethereum/pools/search", nil)
req.Header.Set("Authorization", "api_YOUR_API_KEY_HERE")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
```
### 3. API key format
Your API key will follow this format:
```
api_your_personal_api_key
```
Your key already starts with `api_`. Send it exactly as the console shows it, as the entire value of the `Authorization` header, with nothing added in front.
> [!WARNING]
>
> Send the key as the entire `Authorization` header value, nothing before it and nothing
> after it. If your HTTP client only offers a token field that prepends a scheme word, do
> not use it; set a raw header instead. On `api-pro.dexpaprika.com` a request the edge does
> not recognise is answered with a `403` HTML page rather than a JSON error body, so do not
> assume every failure parses as JSON.
***
## Differences from the free API
| Feature | Free API | Pro API |
| - | - | - |
| **Base URL** | `https://api.dexpaprika.com` | `https://api-pro.dexpaprika.com` |
| **Authentication** | None required | API key required |
| **Credits** | 10,000 keyless, 100,000 with a free key, per rolling 30 days | 5,000,000 a month included, then \$20 per additional 1M |
| **Requests per minute** | 15 keyless, 30 with a [free key](https://console.dexpaprika.com) | 500 |
| **Max data delay** | up to 60 seconds | real time |
| **SLA** | best effort | 99.5% |
| **Infrastructure** | Shared | Dedicated |
| **Support** | Community | Priority support |
| **REST endpoints** | All endpoints except pool transactions and token OHLCV | All endpoints, including [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages) and [token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) |
| **Pool transactions** (REST and `/sse/transactions`) | `403` | full access |
| **OHLCV history / candles** | 24 hours and `1h`+ keyless, 7 days and `10m`+ with a free key | no plan limit on history, all intervals, pool and token OHLCV |
| **SSE streaming** | 34 public price streams keyless; prices on any token and reserves, up to 10 concurrent, with a free key | all four feeds, metered, up to 100 concurrent |
Credit detail lives on the [rate limits page](/knowledge-base/rate-limits), and plans on [pricing](https://dexpaprika.com/api/pricing). All 35 chains and every REST endpoint except [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages) and [token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) are available on the free tier as well; what the paid plans change is freshness, allowance, OHLCV depth (see [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)), the [paid-only endpoints](/knowledge-base/rate-limits#paid-only-endpoints) (transactions over REST and SSE, token OHLCV, candle streaming), streaming scope and support. **Enterprise is this same API with the limits raised for your workload**, so everything below applies unchanged.
**Dev sits between the two.** For $30 a month you get 500,000 credits per billing month, 120 requests a minute and up to 30 concurrent streams, on this same host and with the same key format as Pro. Data is real time and support is email; the SLA stays best effort rather than the 99.5% Pro carries, and past the included credits Dev bills at the same $20 per additional 1M. Check [pricing](https://dexpaprika.com/api/pricing) for the current numbers.
> [!TIP]
>
> All REST endpoints available in the free API are also available in the Pro API, plus the paid-only [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages) endpoint. Simply replace the base URL and add authentication.
***
## Quick start example
Let's fetch Solana SOL token data using the Pro API:
**1. Prepare your request**
Replace `YOUR_API_KEY_HERE` with your actual API key:
```bash theme={null}
curl "https://api-pro.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112" \
-H "Authorization: api_YOUR_API_KEY_HERE"
```
**2. Receive the response**
The same data the free API returns, captured live. The `30m`, `15m`, `5m` and `1m` interval
objects and the social links are trimmed here for length; the real response carries them:
```json Response [expandable] theme={null}
{
"id": "So11111111111111111111111111111111111111112",
"name": "Wrapped SOL",
"symbol": "SOL",
"chain": "solana",
"decimals": 9,
"total_supply": 9729104.429281628,
"has_image": true,
"added_at": "2026-08-10T14:20:16Z",
"price_stats": {
"high_24h": 97.72851812469702,
"low_24h": 92.53839547091638,
"ath": 2094.381880389729,
"ath_date": "2025-02-18T22:43:00Z"
},
"summary": {
"chain": "solana",
"id": "So11111111111111111111111111111111111111112",
"price_usd": 95.00021242163845,
"fdv": 924266987.4540582,
"liquidity_usd": 553757948.2095541,
"pools": 79958,
"24h": {
"volume": 55022471.30115615,
"volume_usd": 5215005748.220995,
"sells": 15117657,
"buys": 8886063,
"txns": 24126210,
"buy_usd": 2528611480.8570423,
"sell_usd": 2686394267.3639526,
"last_price_usd_change": 1.36503236687871
},
"6h": {
"volume": 15008105.889129847,
"volume_usd": 1415167906.7786279,
"sells": 3848462,
"buys": 2257851,
"txns": 6135660,
"buy_usd": 686184008.4416271,
"sell_usd": 728983898.3370007,
"last_price_usd_change": 0.8177448219626
},
"1h": {
"volume": 2522513.1508265836,
"volume_usd": 239070465.79418552,
"sells": 694311,
"buys": 363197,
"txns": 1063751,
"buy_usd": 115287924.18944858,
"sell_usd": 123782541.60473694,
"last_price_usd_change": 0.20697823770267
}
},
"last_updated": "2026-08-24T10:33:47.365548003Z"
}
```
***
## Error handling
### Authentication errors
> [accordion] 403 and an HTML page saying you have been blocked
>
> The response is not JSON. The body is an HTML page headed **"Sorry, you have been
> blocked"** with a Cloudflare ray ID.
>
> **What it means:** the request reached this host carrying no `Authorization` header at
> all, so it was stopped at the edge before the API saw it. It is not an IP ban and there
> is no cooldown: the next request with a header is served normally.
>
> **Solution:** send your key in the `Authorization` header. If you are parsing responses
> as JSON, check the content type first, because this one will not parse.
> [accordion] 401 Unauthorized - no key, or a key we do not recognise
>
> **Error response:**
>
> ```json theme={null}
> {
> "message": "api key verification has failed"
> }
> ```
>
> The host root answers `{"message": "missing or invalid api key"}` for the same reason.
>
> **Solution:** the header arrived but its value is not a key we know. Copy the key again
> from [console.dexpaprika.com](https://console.dexpaprika.com). Each account has exactly
> one key and regenerating has no overlap window, so if you regenerated it, every
> integration needs the new value.
> [accordion] 403 Forbidden - the key and the host disagree
>
> A key that is valid for one plan sent to the other plan's host returns a structured
> `wrong_host` body naming the host to use.
>
> **Solution:** match the host to your plan. Keyless traffic and free keys go to
> `api.dexpaprika.com` and `streaming.dexpaprika.com`; paid keys go to
> `api-pro.dexpaprika.com` and `streaming-pro.dexpaprika.com`. Paths, query parameters and
> response shapes are identical, so only the base URL changes. Full detail on
> [403 Forbidden (wrong host)](/knowledge-base/error-handling#403-forbidden-wrong-host),
> and the whole switch is in [upgrading to Pro](/api-pro/upgrading).
### Other errors
All other error codes match the [standard DexPaprika API](/api-reference/introduction):
* `400 Bad Request` - Invalid parameters
* `402 Payment Required` - credit allowance for the billing period exhausted. Retrying does not help. Turn on autoscaling in [console.dexpaprika.com](https://console.dexpaprika.com) to let usage run past the cap at \$20 per additional 1,000,000, up to your spend limit. See [error handling](/knowledge-base/error-handling#402-payment-required)
* `404 Not Found` - Resource not found
* `429 Too Many Requests` - per-minute rate exceeded. Retry after the `Retry-After` header
* `500 Internal Server Error` - Server error
***
## Available endpoints
The Pro API provides access to all DexPaprika endpoints:
> [card] [Tokens](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
>
> Get detailed token information including price, liquidity, and trading volume
> [card] [Pools](/api-reference/pools/get-a-pool-on-a-network)
>
> Access liquidity pool data and trading statistics
> [card] [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks)
>
> List all supported blockchain networks
> [card] [Pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
>
> Query swap transactions, adds, and removes. Dev, Pro and Enterprise
> [card] [Search](/api-reference/search/search-for-tokens-pools-and-dexes)
>
> Search across tokens, pools, and DEXes
> [card] [Batched prices](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network)
>
> Retrieve multiple token prices in a single request
> [!NOTE]
>
> View complete API documentation in the [REST API Reference](/api-reference/introduction) section. All examples use the free API URL - simply replace with `api-pro.dexpaprika.com` and add authentication.
***
## Migration guide
Moving an existing free-tier integration across takes two changes: the base URL, and your
key in the `Authorization` header on every request. The full walkthrough, with before and
after code in four languages, what each failure looks like on the wire, and a checklist to
run before you deploy, is on [upgrading to Pro](/api-pro/upgrading).
***
## Best practices
> [accordion] Secure your API key
>
> **Never expose your API key in client-side code or public repositories.**
>
> * Store API keys in environment variables or secure vaults (e.g., AWS Secrets Manager, HashiCorp Vault)
> * Use `.env` files locally and add them to `.gitignore`
> * Rotate keys periodically as part of security best practices
> * Never hardcode keys in your application source code
>
> ```bash Example .env file theme={null}
> DEXPAPRIKA_PRO_API_KEY=api_your_personal_api_key
> ```
> [accordion] Monitor your API usage
>
> **Track your API usage to optimize performance and identify issues early.**
>
> * Watch credit spend against your allowance in [console.dexpaprika.com](https://console.dexpaprika.com), or call `GET https://api-pro.dexpaprika.com/usage` with your key in the `Authorization` header; `requests_used`, `requests_left` and the period dates come back only for an authenticated call on that host
> * Log all API requests and responses for debugging
> * Set up monitoring dashboards to track request volumes
> * Monitor response times and error rates
> * Alert on unusual patterns or spikes in traffic
> * Review usage patterns to optimize your integration
> [accordion] Implement robust error handling
>
> **Always handle authentication errors gracefully and implement retry logic.**
>
> * Treat 401 and 403 as configuration faults, not key faults: check the header and the base URL before touching the key
> * Implement exponential backoff for transient failures
> * Don't retry on authentication errors; fix the header or the base URL first
> * Log errors with context for easier troubleshooting
> * Provide meaningful error messages to end users
>
> ```javascript Example error handling theme={null}
> try {
> const response = await fetch(url, { headers });
> if (response.status === 403) {
> // On api-pro a 403 means the request was rejected before the API saw it, or the
> // key belongs to the other host. Check that the Authorization header is present
> // and holds the key alone, and that the base URL is api-pro.dexpaprika.com.
> // Do not regenerate the key: there is one key per account, and regenerating it
> // breaks every other integration at once.
> return;
> }
> if (response.status === 401) {
> // The header is missing, or the key was not recognised. Fix the header, do not retry.
> return;
> }
> // Handle other errors with retry logic
> } catch (error) {
> console.error('Request failed:', error);
> }
> ```
> [accordion] Use connection pooling
>
> **Reuse HTTP connections to reduce latency and improve throughput.**
>
> * Configure HTTP clients to reuse connections
> * Set appropriate connection pool sizes (e.g., 10-50 connections)
> * Enable keep-alive headers
> * Use persistent connections for high-volume applications
> * Monitor connection pool metrics
>
> ```python Example with Python requests theme={null}
> import requests
> from requests.adapters import HTTPAdapter
>
> session = requests.Session()
> adapter = HTTPAdapter(pool_connections=20, pool_maxsize=20)
> session.mount('https://', adapter)
>
> # Reuse session for all requests
> response = session.get(url, headers=headers)
> ```
***
## Next steps
> [card] [REST API reference](/api-reference/introduction)
>
> Explore all available endpoints and their parameters
> [card] [Streaming API](/streaming/introduction)
>
> Real-time token price updates over Server-Sent Events. On Pro, connect to streaming-pro.dexpaprika.com.
> [card] [Tutorials](/tutorials/tutorial_intro)
>
> Learn how to build applications with DexPaprika
> [card] [Coverage checker](/tools/coverage-checker)
>
> Check which tokens and pools are available in our database
***
## Get support
> [card] [Enterprise support](mailto:support@coinpaprika.com)
>
> Get priority technical support from our engineering team
> [card] [Join Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community for general questions
***
## FAQs
> [accordion] How do I get a Pro API key?
>
> Sign up at [console.dexpaprika.com](https://console.dexpaprika.com), subscribe to Pro, and copy the key from the Keys page. No sales call and no waiting. Enterprise is the exception: those limits are agreed per contract, so email [support@coinpaprika.com](mailto:support@coinpaprika.com).
> [accordion] Can I use both the free and the Pro API at once?
>
> You can call `api.dexpaprika.com` without a key from the same application, and that keyless
> traffic is metered on free-tier terms. Your paid key belongs on `api-pro.dexpaprika.com`.
> The monthly credit allowance, overage handling, real-time data and the 99.5% SLA are all
> attached to the paid hosts, so paid traffic sent anywhere else is paying for entitlements
> it is not receiving.
> [accordion] What are the Pro limits?
>
> 5,000,000 credits a month included, at up to 500 requests a minute, with \$20 per additional 1M beyond that. One request costs one credit, batch endpoints cost one credit per item, and each streaming update delivered costs one credit. Enterprise raises both numbers to fit your workload. See [rate limits](/knowledge-base/rate-limits) and [pricing](https://dexpaprika.com/api/pricing); these numbers move.
> [accordion] What happens if my API key is compromised?
>
> Regenerate it yourself from the Keys page in the console. Because each account has exactly one key, regenerating replaces the old one immediately, so plan a moment when you can redeploy: every integration using the old key stops working at once. If you cannot get into the account, email [support@coinpaprika.com](mailto:support@coinpaprika.com).
> [accordion] Do you offer dedicated infrastructure or on-premise deployment?
>
> Yes, we can provide custom infrastructure solutions for enterprise customers. Contact our sales team to discuss your specific requirements.
> [accordion] How do I tell whether the problem is me or you?
>
> Two different questions, two different calls. `GET /usage` tells you which plan and which
> host you are really talking to, and it is never served from cache, so it is the one to
> reach for when a key or a base URL is in doubt. Separately, every host answers `GET /health`
> with a plain up or down for the service itself. It takes no key and says nothing about your
> key, your plan or your host, so it only answers "is the service running", never "is my
> request right".
> [accordion] Is the data the same as the free API?
>
> The chains are identical, and so is every endpoint except token OHLCV and pool transactions, which need Dev or Pro. Two more things differ. Freshness: the free tier is served with a delay of up to 60 seconds, Pro is real time. OHLCV depth: the free tier gets 24 hours of `1h`+ candles keyless or 7 days of `10m`+ candles with a key, Pro has no plan limit on history, at every interval, for pool and token OHLCV alike. Pro also adds dedicated infrastructure, a much higher credit allowance, a 99.5% SLA and priority support.
# Upgrading to Pro: switch your base URL to api-pro.dexpaprika.com
Source: https://docs.dexpaprika.com/api-pro/upgrading
Paid DexPaprika plans are served on api-pro.dexpaprika.com and need your API key in the Authorization header. One base URL change, everything else stays the same. Includes the exact errors you see if either half is missing.
Paid plans are served on a different host from the free tier. If you have just
subscribed to Pro and your existing code is failing, this is why, and there are
only two things to change.
**1. Change the base URL**
`https://api.dexpaprika.com` becomes `https://api-pro.dexpaprika.com`
**2. Send your API key on every request**
`Authorization: api_your_personal_api_key`, with the key as the entire header
value. Copy it from [console.dexpaprika.com](https://console.dexpaprika.com).
Nothing else moves. Paths, query parameters, response shapes and your key itself
are identical to the free API, so a find and replace on the hostname plus a header
is the whole migration.
> [!WARNING]
>
> Both halves are required together. Your plan's allowance, real-time data and SLA
> are attached to `api-pro.dexpaprika.com`, so the base URL change is what puts your
> traffic on them. Sending your key to the right host without the header gets you a
> block page from the edge rather than our JSON; see
> [what each error means](#what-each-error-means) below.
## Before and after
```bash cURL theme={null}
# Free tier
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?token_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
# Pro
curl "https://api-pro.dexpaprika.com/networks/ethereum/pools/search?token_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" \
-H "Authorization: api_your_personal_api_key"
```
```python Python theme={null}
import requests
BASE = "https://api-pro.dexpaprika.com" # was https://api.dexpaprika.com
HEADERS = {"Authorization": "api_your_personal_api_key"} # new on Pro
response = requests.get(
f"{BASE}/networks/ethereum/pools/search",
params={"token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"},
headers=HEADERS,
)
response.raise_for_status()
print(response.json())
```
```javascript JavaScript theme={null}
const BASE = 'https://api-pro.dexpaprika.com'; // was https://api.dexpaprika.com
const HEADERS = { Authorization: 'api_your_personal_api_key' }; // new on Pro
const res = await fetch(`${BASE}/networks/ethereum/pools/search?token_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`, {
headers: HEADERS,
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```
```go Go theme={null}
const base = "https://api-pro.dexpaprika.com" // was https://api.dexpaprika.com
req, _ := http.NewRequest("GET", base+"/networks/ethereum/pools/search?token_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", nil)
req.Header.Set("Authorization", "api_your_personal_api_key") // new on Pro
resp, err := http.DefaultClient.Do(req)
```
> [!NOTE]
>
> Send the key as the entire `Authorization` header value, nothing before it and
> nothing after it. If your HTTP client only offers a token field that prepends a
> scheme word for you, do not use it; set a raw header instead.
## If you use our SDKs or the streaming API
> [accordion] SDKs and the CLI
>
> Every official SDK takes the base URL and the key as configuration, so you do
> not have to touch call sites. Set the Pro host and your key once where the
> client is constructed. The [SDK pages](/get-started/sdk-ts) show the option
> name for each language.
> [accordion] Streaming
>
> Streaming has the same split. `streaming.dexpaprika.com` serves the free tier
> and `streaming-pro.dexpaprika.com` serves paid plans, with the same
> `Authorization` header. Moving your REST calls does not move your streams, so
> point every event source at `streaming-pro.dexpaprika.com` as well. Details on
> the [streaming introduction](/streaming/introduction).
> [accordion] MCP servers and AI agents
>
> Anything configured with a DexPaprika base URL needs the same change, including
> MCP server configs and agent tool definitions. See
> [AI integration](/ai-integration/index).
## What each error means
The two hosts fail in different ways, and telling them apart tells you which half
of the change is missing.
| What you see | What it means | What to do |
| - | - | - |
| `403` and an HTML page headed **"Sorry, you have been blocked"** | Your request reached the Pro host with no `Authorization` header at all. It was stopped at the edge before our API saw it, which is why the body is a Cloudflare page and not our JSON. This is not an IP ban. | Add the `Authorization` header. |
| `401` with `{"message":"api key verification has failed"}` | The header arrived, but the value is not a key we recognise. | Copy the key again from [the console](https://console.dexpaprika.com). It has no overlap window, so if you regenerated it, every integration needs the new one. |
| `401` with `{"message":"missing or invalid api key"}` | The same missing or unrecognised key, returned from the host root rather than an endpoint. | As above. |
| `403` with `"error": "wrong_host"` | A free key reached `api-pro.` or `streaming-pro.`, which serve paid plans only. The body names the host to use and links the console, the docs and pricing. | Match the host to your plan. Free and keyless traffic on `api.` and `streaming.`, paid keys on `api-pro.` and `streaming-pro.` |
| `402` | Your monthly credit allowance is spent. Retrying does not help. | Enable overage in the [console](https://console.dexpaprika.com). See [error handling](/knowledge-base/error-handling#402-payment-required). |
| `429` | You are over the per-minute ceiling for your plan. | Back off for the interval in the `Retry-After` header, then raise your throttle to the Pro ceiling on the [rate limits page](/knowledge-base/rate-limits). |
## One check that confirms the upgrade took
`GET /usage` is never served from cache, so it always reflects the plan your request was
actually evaluated against. Run it against the paid host with your key:
```bash theme={null}
curl -s -H "Authorization: api_your_personal_api_key" \
https://api-pro.dexpaprika.com/usage
```
A working Pro setup answers `200` with `plan` set to your paid plan, plus `requests_used` and
`requests_left` for the current billing period. Those two fields are the ones to look for:
they are returned for a key on `api-pro.dexpaprika.com` and omitted otherwise, so seeing them
is how you know your traffic is being counted against the allowance you are paying for.
If `plan` is not the plan you bought, or the credit fields are absent, your requests are not
receiving the Pro entitlements. The monthly allowance, overage handling, real-time data and
the 99.5% SLA are all attached to `api-pro.` and `streaming-pro.`
> [!TIP]
>
> `/usage` is the reliable probe because it is the one path that is never cached, so it
> cannot hand you a stale answer from another caller. Do not confuse it with `GET /health`,
> which every host answers without a key: that one reports whether the service is up and
> tells you nothing about your key, your plan or your host.
## Retune your client
**1. Raise your rate limiter**
Pro's per-minute ceiling is far above the free tier's, so a throttle tuned for
free-tier traffic now leaves most of your allowance unused. Keep the throttle
and the `429` backoff, and raise the threshold to the figure for your plan on
the [rate limits page](/knowledge-base/rate-limits).
**2. Drop the polling you added to work around the delay**
The free tier serves data with a delay; Pro is real time. Anything you built to
re-poll for fresher numbers is now spending credits for nothing.
**3. Watch your credits**
Track spend in the [console](https://console.dexpaprika.com), or call
`GET /usage` from your own code. One request costs one credit, batch endpoints
cost one credit per item, and every streaming update delivered costs one
credit.
**4. Check both environments**
Each account has exactly one API key, so staging and production share a quota.
A test loop spends the same allowance your production traffic depends on.
## Checklist
> [accordion] Before you deploy
>
> * Every `api.dexpaprika.com` in your codebase, config and environment files is now `api-pro.dexpaprika.com`
> * The `Authorization` header is set on every request, not only the first one
> * The key comes from an environment variable or a secret store, never from source
> * Streaming clients point at `streaming-pro.dexpaprika.com`
> * Your rate limiter is set to your plan's ceiling
> * You have handled `402` separately from `429`, because retrying a `402` never succeeds
## Where to go next
> [card] [Pro API introduction](/api-pro/introduction)
>
> What the Pro API includes, endpoint by endpoint
> [card] [Rate limits and credits](/knowledge-base/rate-limits)
>
> Current ceilings and allowances for every plan
> [card] [Error handling](/knowledge-base/error-handling)
>
> Every status code the API returns and how to handle it
> [card] [Console](https://console.dexpaprika.com)
>
> Your key, your usage and your billing
Still stuck after the switch? Email [support@coinpaprika.com](mailto:support@coinpaprika.com)
or ask in [Discord](https://discord.gg/DhJge5TUGM). Plans and prices are on the
[pricing page](https://dexpaprika.com/api/pricing).
# Get a list of available dexes on a network.
Source: https://docs.dexpaprika.com/api-reference/dexes/get-a-list-of-available-dexes-on-a-network
api-reference/openapi.yml GET /networks/{network}/dexes
List all decentralized exchanges available on a specific blockchain network
## Endpoint overview
List decentralized exchanges available on a specific network.
> [!TIP]
>
> See also: [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pools by DEX](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
### FAQs
> [accordion] What does a DEX object contain?
>
> Identifier, display name, and often counts/metrics used to navigate to pools.
> [accordion] How do I fetch pools for one DEX?
>
> Call [`GET /networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
> with `dex_name` set to the `dex_id` from this response, matched case-insensitively.
> Pass the `dex_id`, not the `dex_name` display name: a display name returns an empty
> `results` array rather than an error. The old `/networks/{network}/dexes/{dex}/pools`
> path was removed and returns `410 Gone`.
> [accordion] Are DEX ids stable?
>
> Yes; ids are stable across requests and are used throughout the API.
> [card] [Tutorial: List DEXes on a blockchain network](/tutorials/list-dexes)
>
> DEX market share on a chain and each DEX's busiest pools.
# API reference: endpoints and parameters
Source: https://docs.dexpaprika.com/api-reference/introduction
Every DexPaprika REST endpoint with its parameters, response shape and a runnable example: networks, DEXes, pools, tokens, OHLCV and transactions.
> [!NOTE]
>
> **Need a higher allowance and dedicated infrastructure?** Check out the [Pro API](/api-pro/introduction). Current allowances, rates and prices are on the [pricing page](https://dexpaprika.com/api/pricing).
This is the endpoint reference. If you are new to the API, start at the [DEX API introduction](/introduction), which covers what we index, the networks we cover and a first request.
The DexPaprika DEX API provides near real-time data about tokens, liquidity pools, and decentralized exchanges on 35 blockchains. Below you can find the most popular endpoints that you can use to build your own applications:
> [!TIP]
>
> See also: [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Liquidity pool endpoint](/api-reference/pools/get-a-pool-on-a-network),
> [Swap transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages),
> [Token data](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
**Pool search:** [filter pools](/tutorials/pool-filtering) by volume, liquidity, transactions, and creation date on `/networks/{network}/pools/search`. Plus [batch token prices](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network) in a single request.
### Popular endpoints
> [card] [Tokens](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
>
> Get detailed information about any token on a given network like latest price, liquidity, and trading volume
> [card] [Pools](/api-reference/pools/get-a-pool-on-a-network)
>
> Access liquidity pool data and trading statistics for a given pool address
> [card] [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks)
>
> List supported networks
> [card] [Pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
>
> Fetch swaps/adds/removes. Dev, Pro and Enterprise
## Quick start
We will make a GET request to the [Token](/api-reference/tokens/get-a-tokens-latest-data-on-a-network) endpoint in order to get the latest price in USD of TRUMP. All we need is the [network ID](/api-reference/networks/get-a-list-of-available-blockchain-networks) and the token address.
```bash theme={null}
curl -X GET "https://api.dexpaprika.com/networks/solana/tokens/6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
```
This will return latest data about TRUMP (TRUMP) on Solana:
```json Response [expandable] theme={null}
{
"id": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"name": "OFFICIAL TRUMP",
"symbol": "TRUMP",
"chain": "solana",
"decimals": 6,
"total_supply": 1000000000000000,
"description": "",
"website": "",
"explorer": "",
"added_at": "2025-01-17T23:26:21Z",
"summary": {
"price_usd": 13.14091959123721,
"fdv": 13140919591.23721,
"liquidity_usd": 149423162.71562782,
"24h": {
"volume": 21068441.593753017,
"volume_usd": 281073979.6428536,
"sells": 64806,
"buys": 69661,
"txns": 134467
},
"6h": {
"volume": 3947009.6413350017,
"volume_usd": 51291873.69781224,
"sells": 15636,
"buys": 16434,
"txns": 32070
},
"1h": {
"volume": 412765.81969400006,
"volume_usd": 5443526.242503976,
"sells": 1965,
"buys": 1934,
"txns": 3899
},
"30m": {
"volume": 138223.89740200003,
"volume_usd": 1826042.0489568561,
"sells": 666,
"buys": 942,
"txns": 1608
},
"15m": {
"volume": 102904.73769500002,
"volume_usd": 1356865.0163336615,
"sells": 499,
"buys": 634,
"txns": 1133
},
"5m": {
"volume": 16003.968976,
"volume_usd": 210782.49285099082,
"sells": 77,
"buys": 155,
"txns": 232
}
},
"last_updated": "2025-02-25T13:42:32.093353071Z"
}
```
## Base URL
All API endpoints use the following base URL:
```
https://api.dexpaprika.com/
```
That is the host for keyless calls and for free registered keys. Paid plans call
`https://api-pro.dexpaprika.com` instead, with the key in the `Authorization` header. See
[upgrading to Pro](/api-pro/upgrading).
## Authentication
Requests work with no key at all. To use one, send it as the entire `Authorization` header value:
```bash theme={null}
curl -H "Authorization: api_YOUR_KEY" "https://api.dexpaprika.com/networks"
```
> [!WARNING]
>
> **The key is the entire header value.** Nothing goes in front of it and nothing after it.
> Almost every other API expects a scheme word first, which is why this is the most common
> cause of a failed first authenticated call. If your HTTP client only offers a token field
> that prepends one for you, set a raw header instead. See
> [401 Unauthorized](/knowledge-base/error-handling#401-unauthorized).
Free keys stay on `https://api.dexpaprika.com`. Only [Pro](/api-pro/introduction) moves to
`api-pro.dexpaprika.com`, and sending a free key there returns `403`. Get a key at
[console.dexpaprika.com](https://console.dexpaprika.com).
## Common use cases
Here are some popular ways to use our API:
> [accordion] Track Token Prices
>
> ```bash theme={null}
> # Get USDC price and trading data
> curl -X GET "https://api.dexpaprika.com/networks/solana/tokens/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
> ```
> [accordion] Monitor Liquidity Pools
>
> ```bash theme={null}
> # Get all pools where SOL is traded
> curl -X GET "https://api.dexpaprika.com/networks/solana/pools/search?token_address=So11111111111111111111111111111111111111112"
> ```
> [accordion] Search Tokens
>
> ```bash theme={null}
> # Search for "Jupiter" token across all networks
> curl -X GET "https://api.dexpaprika.com/search?query=jupiter"
> ```
### FAQs
> [accordion] Do I need an API key?
>
> Not to start. No key, no card, no email: a curl works right now. [Registering a free key](https://console.dexpaprika.com) raises both the per-minute rate and the 30-day allowance, and still needs no card. Current figures are on the [pricing page](https://dexpaprika.com/api/pricing) and in [rate limits](/knowledge-base/rate-limits).
> [accordion] What data can I query?
>
> Liquidity pools, swap transactions, token metrics/prices, and network coverage across multiple chains.
> [accordion] How do I find a pool or token identifier?
>
> Use the Coverage Checker tool or the Networks/Token endpoints to locate addresses.
> [accordion] How fast is the data?
>
> Collection is near real-time; responses reflect the latest indexed blocks and events.
## Rate limits
Keyless callers get a rolling 30-day credit allowance and a per-minute rate with no signup at all. A [free key](https://console.dexpaprika.com) raises both, and [Pro](/api-pro/introduction) raises them again. The current figures are on the [pricing page](https://dexpaprika.com/api/pricing). One request costs one credit and batch endpoints cost one credit per item; there are no compute units or per-endpoint weights.
> [!NOTE]
>
> Need higher limits? Pro is self-serve on [pricing](https://dexpaprika.com/api/pricing). For Enterprise, [contact us](mailto:support@coinpaprika.com).
# Get a list of available blockchain networks.
Source: https://docs.dexpaprika.com/api-reference/networks/get-a-list-of-available-blockchain-networks
api-reference/openapi.yml GET /networks
List all supported blockchain networks and their canonical IDs for use in API requests
## Endpoint overview
Enumerate supported blockchain networks and canonical ids for requests.
> [!TIP]
>
> See also: [DEXes on a network](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network),
> [Tokens](/api-reference/tokens/get-a-tokens-latest-data-on-a-network),
> [Pools](/api-reference/pools/get-a-pool-on-a-network)
### FAQs
> [accordion] What does each network object include?
>
> An `id` used in all endpoints plus display metadata and, where available, counts of related entities.
> [accordion] How do I choose the right network id?
>
> Prefer lowercase canonical ids like `ethereum`, `solana`. Use this list as the source of truth.
> [accordion] How to enumerate DEXes for a network?
>
> Call the network DEXes endpoint and then drill into pools for each DEX.
> [card] [Tutorial: List supported blockchain networks](/tutorials/list-networks)
>
> Rank chains by activity, with a working curl and Python script.
# Advanced pool filtering across multiple networks.
Source: https://docs.dexpaprika.com/api-reference/pools/advanced-pool-filtering-across-multiple-networks
api-reference/openapi.yml GET /pools/search
Retrieves a paginated list of pools matching the advanced search criteria across multiple chains.
Supports various filters and cursor-based pagination.
**Keyless and free keys** only see results created at least 1 hour ago; newer ones are
returned on Dev, Pro and Enterprise keys. Metrics of the visible results stay realtime.
> [card] [Tutorial: Filter and screen liquidity pools](/tutorials/pool-filtering)
>
> Every pool filter and sort, with a working curl and Python script.
> [!NOTE]
>
> Keyless requests and free keys do not see pools created in the last hour. Dev, Pro and Enterprise keys on `api-pro.dexpaprika.com` see them as soon as they are indexed. See [search freshness](/knowledge-base/rate-limits#search-freshness).
# Advanced pool filtering on a specific network.
Source: https://docs.dexpaprika.com/api-reference/pools/advanced-pool-filtering-on-a-specific-network
api-reference/openapi.yml GET /networks/{network}/pools/search
Retrieves a paginated list of pools matching the advanced search criteria.
Supports various filters and cursor-based pagination.
**Keyless and free keys** only see results created at least 1 hour ago; newer ones are
returned on Dev, Pro and Enterprise keys. Metrics of the visible results stay realtime.
> [card] [Tutorial: Filter and screen liquidity pools](/tutorials/pool-filtering)
>
> Every pool filter and sort, with a working curl and Python script.
> [!NOTE]
>
> Keyless requests and free keys do not see pools created in the last hour. Dev, Pro and Enterprise keys on `api-pro.dexpaprika.com` see them as soon as they are indexed. See [search freshness](/knowledge-base/rate-limits#search-freshness).
# Get a pool on a network.
Source: https://docs.dexpaprika.com/api-reference/pools/get-a-pool-on-a-network
api-reference/openapi.yml GET /networks/{network}/pools/{pool_address}
Get detailed liquidity, reserves, pricing, and metadata for a specific pool on a blockchain network
## Endpoint overview
Get detailed liquidity, reserves, pricing, and metadata for a specific pool.
> [!TIP]
>
> See also: [Pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages),
> [Token data](/api-reference/tokens/get-a-tokens-latest-data-on-a-network),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks)
### FAQs
> [accordion] Which parameters are required?
>
> Provide both `network` (e.g., `ethereum`, `solana`) and `pool_address` (on-chain pool address). Optional: `inversed` to flip the price ratio.
> [accordion] What does the `inversed` flag do?
>
> It returns prices and ratios from the opposite pair perspective (token1/token0). Leave it `false` for the default token0/token1 view.
> [accordion] How can I find a pool address?
>
> Use the Coverage Checker tool or search a network's pools with `GET /networks/{network}/pools/search?token_address={address}`, then copy the desired pool's `id`.
> [accordion] What units are returned?
>
> Prices are in USD where available; liquidity and volumes include USD fields. Raw token amounts are returned in token units.
> [accordion] How fresh is the data?
>
> Collection is near real-time; responses reflect the latest indexed blocks/events per network.
> [card] [Tutorial: Get liquidity pool data by address](/tutorials/pool-details)
>
> Price, reserves and 5m to 24h activity for one pool, read field by field.
# Get a technical indicator for a pool.
Source: https://docs.dexpaprika.com/api-reference/pools/get-a-technical-indicator-for-a-pool
api-reference/openapi.yml GET /networks/{network}/pools/{pool_address}/indicators
Computed from completed pool OHLCV candles. Every indicator is
available on every plan, with the same interval and history limits
as pool OHLCV:
| Plan | `interval` | History |
|------|------------|---------|
| Keyless | `1h` and up | last 24 hours |
| Free key | `10m` and up | last 7 days |
| Dev | all | last 30 days |
| Pro, Enterprise | all | unlimited |
A finer `interval`, or an `end` or `start` before the window, gets
`403`. A range that only partly overlaps the window, such as the
default range without `start`, is cut to the window; if no candle of
the requested `interval` is left, it gets `403` too. Keyless callers
default to `interval=1h`, since a `24h` candle does not fit their
24-hour window.
Without `start` the response holds the last `limit` candles. When
`limit` cuts the range, `next_cursor` holds the start of the next page.
> [card] [Tutorial: RSI, EMA, MACD, Bollinger Bands and VWAP](/tutorials/technical-indicators)
>
> Which plan unlocks which indicator, a Python screen and the pitfalls.
# Get OHLCV data for a pool pair.
Source: https://docs.dexpaprika.com/api-reference/pools/get-ohlcv-data-for-a-pool-pair
api-reference/openapi.yml GET /networks/{network}/pools/{pool_address}/ohlcv
Retrieve historical OHLCV candles for a pool. Interval and history depth depend on your plan, from 24 hours of 1h candles without a key to unlimited on Pro.
## Endpoint overview
Retrieve historical OHLCV for a pool at granular intervals.
On Dev or Pro you can also chart a token without choosing a pool: [token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) returns USD candles aggregated across every pool the token trades in.
## Plan limits
How far back you can query and how fine the candles can be depends on your plan. A request outside the limits returns `403` with a message naming the plan that lifts it.
| Plan | Candle intervals | History depth |
| - | - | - |
| **Free (no key)** | `1h`, `6h`, `12h`, `24h` | last 24 hours |
| **Free (registered key)** | `10m` and longer | last 7 days |
| **Dev** | all | last 30 days |
| **Pro / Enterprise** | all | unlimited |
`start`, `end` and `count_back` are all checked against the window. A range that starts inside the window but reaches before it is trimmed to the window instead of rejected. Details on the [rate limits page](/knowledge-base/rate-limits#ohlcv-limits-by-plan).
> [!TIP]
>
> See also: [Pool details](/api-reference/pools/get-a-pool-on-a-network),
> [Pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
### FAQs
> [accordion] Which intervals are supported?
>
> `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h` with a max of 1000 points per request. Without a key only `1h` and up are available; a free key adds `10m`, `15m` and `30m`; `1m` and `5m` need Dev or Pro.
> [accordion] How to request a specific time range?
>
> Provide `start`: a relative offset from now (`-24h` for the last 24 hours, `-7d`, `-90m`), an ISO timestamp, a date or Unix seconds. `end` is optional and takes the same formats. The range must fit your plan's history window: 24 hours without a key, 7 days on a free key, 30 days on Dev, unlimited on Pro.
> [accordion] Why do I get 403?
>
> The request asked for more history or finer candles than your plan allows. The `message` in the body says which plan lifts the limit. Fix `start`, `end`, `count_back` or `interval`, or upgrade.
> [accordion] What does `inversed` change?
>
> It flips the price ratio so the series reflects token1/token0 instead of token0/token1.
> [card] [Tutorial: Get pool price history and OHLCV data](/tutorials/retrieve-historical-data)
>
> Pool candles with a working curl and Python script.
# Get transactions of a pool on a network. Paging can be used up to 100 pages.
Source: https://docs.dexpaprika.com/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages
api-reference/openapi.yml GET /networks/{network}/pools/{pool_address}/transactions
List recent swaps, liquidity adds, and removes for a pool with page or cursor-based pagination. Paid plans only: Dev, Pro and Enterprise keys on api-pro.dexpaprika.com.
## Endpoint overview
List recent swaps, adds, and removes for a pool with paging.
## Plan access
This endpoint is available on paid plans only. Call it on `https://api-pro.dexpaprika.com` with a Dev, Pro or Enterprise key in the `Authorization` header. Keyless requests and free keys get `403` with the standard error envelope. `error` is the code to branch on, `tier` is the plan the request was served as (`keyless` or `free`), `required_tier` the lowest plan that unlocks the endpoint:
```json theme={null}
{
"error": "plan_required",
"tier": "keyless",
"required_tier": "dev",
"message": "this endpoint requires a Dev or Pro plan",
"links": {
"register": "https://console.dexpaprika.com",
"pricing": "https://dexpaprika.com/api/pricing",
"docs": "https://docs.dexpaprika.com/",
"coupon": "https://dexpaprika.com/api/pricing?coupon=START10"
}
}
```
A free key gets `"tier": "free"` and the same `required_tier`. A `403` here is not retryable and costs no credits. Plans are on [pricing](https://dexpaprika.com/api/pricing); the host and header changes are in [upgrading to Pro](/api-pro/upgrading). The full list of plan-gated features is on the [rate limits page](/knowledge-base/rate-limits#paid-only-endpoints).
> [!TIP]
>
> See also: [Pool details](/api-reference/pools/get-a-pool-on-a-network),
> [Token data](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
### FAQs
> [accordion] Which pagination parameters are supported?
>
> Use `page`/`limit` or the `cursor` for deep pagination. `cursor` points to a specific transaction id for resume.
> [accordion] Which transaction types are included?
>
> Swaps, liquidity adds, and removes with token amounts, USD values when available, and timestamps.
> [accordion] How to fetch only recent swaps?
>
> Request with `limit` (e.g., 20 to 100) and without `page` to get the latest batch; poll periodically for new entries.
> [accordion] How to get only transactions from a time window?
>
> Pass `from` and `to`. Both take unix seconds, a relative offset from now (`-1h`, `-24h`, `-7d`; units s, m, h, d), RFC3339 or `YYYY-MM-DD`. For example, the last hour of swaps:
>
> ```bash theme={null}
> curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
> "https://api-pro.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?from=-1h&limit=100"
> ```
> [accordion] Is ordering guaranteed?
>
> Results are returned in reverse chronological order (most recent first) per pool.
> [accordion] Why do I get 403 on this endpoint?
>
> Transactions are a paid-plan endpoint. Keyless calls and free keys answer `403` with `"error": "plan_required"` (the `message` reads `this endpoint requires a Dev or Pro plan`). Use a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`.
> [card] [Tutorial: Get swap transactions for a DEX pool](/tutorials/pool-transactions)
>
> Page through a pool's swaps on a Dev, Pro or Enterprise key.
# Search for tokens, pools, and DEXes
Source: https://docs.dexpaprika.com/api-reference/search/search-for-tokens-pools-and-dexes
api-reference/openapi.yml GET /search
Search for tokens, liquidity pools, and DEXes by name, symbol, or contract address
> [!TIP]
>
> See also: [Tokens](/api-reference/tokens/get-a-tokens-latest-data-on-a-network),
> [Pools](/api-reference/pools/get-a-pool-on-a-network),
> [DEXes on a network](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network)
### FAQs
> [accordion] What can I search for?
>
> Tokens, pools, and DEXes by name, symbol, or address/identifier depending on the network.
> [accordion] Is the search case-sensitive?
>
> No; queries are normalized internally.
> [accordion] How do I use results to make requests?
>
> Copy the `network` and `id`/`address` from the result and pass them to the corresponding endpoints.
> [card] [Tutorial: Search tokens, pools and DEXes by name](/tutorials/search)
>
> From a name, symbol or address to the right contract address.
# Stream real-time prices for an asset
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-prices-for-an-asset
streaming/api-streaming.yml GET /sse/prices
Establishes an SSE stream for a single token's price using query parameters.
**Emitted events:** `token_price` · `ping` · `warning` · `error`
> [card] [Tutorial: Your first stream](/streaming/tutorials/quick-start)
>
> Live token prices over SSE in a few minutes, no key for the showcase tokens.
# Stream real-time prices for multiple assets
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-prices-for-multiple-assets
streaming/api-streaming.yml POST /sse/prices
Establishes a multiplexed SSE stream for up to 25 token price subscriptions in a single connection.
**Emitted events:** `token_price` · `ping` · `warning` · `error`
> [card] [Tutorial: Your first stream](/streaming/tutorials/quick-start)
>
> Live token prices over SSE in a few minutes, no key for the showcase tokens.
# Stream real-time reserve updates for a single pool or token
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-reserve-updates-for-a-single-pool-or-token
streaming/api-streaming.yml GET /sse/reserves
Establishes an SSE stream for reserve updates on a specific pool or token using query string parameters.
**Supported Channel Events:** - `pool_reserves`: Per-block reserve update for a pool. Schema matches `PoolReservesResponse`. - `token_reserves`: Aggregated reserve update across all pools for a token. Schema matches `TokenReservesResponse`. - `ping`: Infrastructure keep-alive payload (`PingEvent`). - `warning`: System warning notifications (`WarningEvent`). - `error`: Stream-level operational exceptions (`ErrorEvent`).
> [card] [Tutorial: Real-time pool reserves streaming](/streaming/reserves-streaming)
>
> Subscribe to reserve changes and keep a pool's liquidity current.
# Stream real-time reserve updates for multiple pools or tokens
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-reserve-updates-for-multiple-pools-or-tokens
streaming/api-streaming.yml POST /sse/reserves
Establishes a multiplexed SSE stream for reserve updates across multiple pools or tokens within a single connection.
**Stream Constraints:** Maximum payload array length is **25 subscriptions**.
**Supported Channel Events:** - `pool_reserves`: Per-block reserve update for a pool. Schema matches `PoolReservesResponse`. - `token_reserves`: Aggregated reserve update for a token. Schema matches `TokenReservesResponse`. - `ping`: Infrastructure keep-alive payload (`PingEvent`). - `error`: Stream-level operational exceptions (`ErrorEvent`).
> [card] [Tutorial: Real-time pool reserves streaming](/streaming/reserves-streaming)
>
> Subscribe to reserve changes and keep a pool's liquidity current.
# Stream real-time swap transactions for a single pool or token
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-swap-transactions-for-a-single-pool-or-token-for-paid-plans
streaming/api-streaming.yml GET /sse/transactions
**Paid plans only.** Available on Dev, Pro and Enterprise keys on `https://streaming-pro.dexpaprika.com`; keyless requests and free keys receive HTTP 403.
Establishes an SSE stream for swap transactions on a specific pool or token using query string parameters.
**Resume:** each swap event has an SSE `id`. Send the last one back as `Last-Event-ID` (browsers do this on reconnect), or pass `since`, to get missed swaps first (last 15 minutes, up to 100).
**Supported Channel Events:** - `pool`: Swap transactions for a pool. Schema matches `TransactionResponse`. - `token`: Swap transactions involving a token. Schema matches `TransactionResponse`. - `ping`: Infrastructure keep-alive payload (`PingEvent`). - `warning`: System warning notifications (`WarningEvent`). - `error`: Stream-level operational exceptions (`ErrorEvent`).
> [card] [Tutorial: Real-time swap transactions streaming](/streaming/transactions-streaming)
>
> Live swaps for a pool or token, including resuming after a disconnect.
# Stream real-time swap transactions for multiple pools or tokens
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-swap-transactions-for-multiple-pools-or-tokens-for-paid-plans
streaming/api-streaming.yml POST /sse/transactions
**Paid plans only.** Available on Dev, Pro and Enterprise keys on `https://streaming-pro.dexpaprika.com`; keyless requests and free keys receive HTTP 403.
Establishes a multiplexed SSE stream for swap transactions across multiple pools or tokens within a single connection.
**Stream Constraints:** Maximum payload array length is **25 subscriptions**.
**Resume:** same as GET. One `since` or `Last-Event-ID` covers all subscriptions. Missed swaps are capped at 500 per connection. When subscriptions span several chains, swaps from other chains than the one in `Last-Event-ID` may be sent again; dedupe by `id`.
**Supported Channel Events:** - `pool`: Swap transactions for a pool. Schema matches `TransactionResponse`. - `token`: Swap transactions involving a token. Schema matches `TransactionResponse`. - `ping`: Infrastructure keep-alive payload (`PingEvent`). - `warning`: System warning notifications (`WarningEvent`). - `error`: Stream-level operational exceptions (`ErrorEvent`).
> [card] [Tutorial: Real-time swap transactions streaming](/streaming/transactions-streaming)
>
> Live swaps for a pool or token, including resuming after a disconnect.
# Stream real-time token OHLCV candles for paid plans
Source: https://docs.dexpaprika.com/api-reference/stream-real-time-token-ohlcv-candles-for-paid-plans
streaming/api-streaming.yml GET /sse/ohlcv
Stream real time token candles over SSE for paid plans. Reconnect using Last-Event-ID or backfill with since.
> [card] [Tutorial: Real-time token OHLCV candle streaming](/streaming/ohlcv-streaming)
>
> Live candles for a token, and how sealed candles are republished.
# Advanced token filtering across multiple networks.
Source: https://docs.dexpaprika.com/api-reference/tokens/advanced-token-filtering-across-multiple-networks
api-reference/openapi.yml GET /tokens/search
Retrieves a paginated list of tokens matching the advanced search criteria across multiple chains.
Supports various filters and cursor-based pagination.
**Keyless and free keys** only see results created at least 1 hour ago; newer ones are
returned on Dev, Pro and Enterprise keys. Metrics of the visible results stay realtime.
> [card] [Tutorial: Screen tokens by volume and liquidity](/tutorials/token-screener)
>
> Filter and sort tokens on one chain or many, with a screener script.
> [!NOTE]
>
> Keyless requests and free keys do not see tokens created in the last hour. Dev, Pro and Enterprise keys on `api-pro.dexpaprika.com` see them as soon as they are indexed. See [search freshness](/knowledge-base/rate-limits#search-freshness).
# Advanced token filtering on a specific network.
Source: https://docs.dexpaprika.com/api-reference/tokens/advanced-token-filtering-on-a-specific-network
api-reference/openapi.yml GET /networks/{network}/tokens/search
Retrieves a paginated list of tokens on a specific network matching the advanced search criteria.
Supports various filters and cursor-based pagination.
**Keyless and free keys** only see results created at least 1 hour ago; newer ones are
returned on Dev, Pro and Enterprise keys. Metrics of the visible results stay realtime.
> [card] [Tutorial: Screen tokens by volume and liquidity](/tutorials/token-screener)
>
> Filter and sort tokens on one chain or many, with a screener script.
> [!NOTE]
>
> Keyless requests and free keys do not see tokens created in the last hour. Dev, Pro and Enterprise keys on `api-pro.dexpaprika.com` see them as soon as they are indexed. See [search freshness](/knowledge-base/rate-limits#search-freshness).
# Get a technical indicator for a token.
Source: https://docs.dexpaprika.com/api-reference/tokens/get-a-technical-indicator-for-a-token
api-reference/openapi.yml GET /networks/{network}/tokens/{token_address}/indicators
Computed from completed token OHLCV candles.
**Paid plans only.** Available on Dev, Pro and Enterprise keys.
Keyless requests and free keys receive HTTP 403.
Without `start` the response holds the last `limit` candles. When
`limit` cuts the range, `next_cursor` holds the start of the next page.
> [card] [Tutorial: RSI, EMA, MACD, Bollinger Bands and VWAP](/tutorials/technical-indicators)
>
> Which plan unlocks which indicator, a Python screen and the pitfalls.
# Get a token's latest data on a network.
Source: https://docs.dexpaprika.com/api-reference/tokens/get-a-tokens-latest-data-on-a-network
api-reference/openapi.yml GET /networks/{network}/tokens/{token_address}
Retrieves detailed information about a specific token on the given network,
including latest price, metadata, status, and recent summary metrics such as price changes
and volumes over multiple timeframes. The `token_supply` is a raw integer. To get the actual supply, move the decimal point left by the `decimals` value. Example: supply = `raw_supply` / 10^`decimals`
## Endpoint overview
Fetch token metadata, price, FDV, liquidity summary, and recent metrics.
> [!TIP]
>
> See also: [Pool search](/tutorials/pool-filtering),
> [Pool details](/api-reference/pools/get-a-pool-on-a-network),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks)
### FAQs
> [accordion] Which identifiers are accepted?
>
> Provide `token_address` (contract or canonical address) and `network` (e.g., `ethereum`, `solana`).
> [accordion] How do I interpret supply fields?
>
> `total_supply` is raw; divide by 10^`decimals` to get human-readable supply.
> [accordion] How to discover pools for this token?
>
> Use `GET /networks/{network}/pools/search` with the `token_address` query parameter to list pools that contain this token on the network.
> [accordion] What are the summary timeframes?
>
> Aggregated metrics for 24h, 6h, 1h, 30m, 15m, and 5m where available.
> [card] [Tutorial: Fetch a token's price](/tutorials/fetch-token-price)
>
> A token's price and market data from its contract address.
# Get batched prices for multiple tokens on a network.
Source: https://docs.dexpaprika.com/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network
api-reference/openapi.yml GET /networks/{network}/multi/prices
Fetch current USD prices for up to 10 token addresses in a single request
## Endpoint overview
Fetch current USD prices for multiple token addresses in a single request.
> [!NOTE]
>
> This endpoint needs an API key, and a free key is enough. Send it as the entire `Authorization` header value. A request without a key gets `403` with `"error": "plan_required"` and `"required_tier": "free"`. The key is free: create one at [console.dexpaprika.com](https://console.dexpaprika.com).
> [!TIP]
>
> See also: [Token details](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
### Usage
Pass the `network` path parameter and provide a comma-separated list in the `tokens` query parameter.
```bash theme={null}
curl -X GET -H "Authorization: $DEXPAPRIKA_API_KEY" "https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xdac17f958d2ee523a2206206994597c13d831ec7" | jq
```
Notes:
* Only tokens with available prices are returned (unknown/unpriced tokens are omitted).
* The order of results is not guaranteed.
* If all provided tokens are invalid or unpriced, the response is an empty array with HTTP 200.
* Duplicate input addresses may produce duplicate entries; dedupe client-side if needed.
* Provide tokens as a comma-separated list in a single `tokens` parameter (explode=false).
* Maximum 10 `tokens` per request. More than 10 will return HTTP 400.
* Each address in the batch costs one credit, so ten tokens in one call cost the same ten credits as ten single-token calls. Batching saves round trips, not credits. See [pricing](https://dexpaprika.com/api/pricing) for what each plan includes.
### Response example
```json Response theme={null}
[
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"chain": "ethereum",
"price_usd": 4400.5697112921535
},
{
"id": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chain": "ethereum",
"price_usd": 1.0002529851244053
}
]
```
### FAQs
> [accordion] How do I pass multiple tokens?
>
> Send one `tokens` parameter with the addresses separated by commas (e.g., `?tokens=0x...,0x...`). Repeating the parameter does not work; only the first value is read.
> [accordion] What happens to unknown tokens?
>
> They are ignored and omitted from the response.
> [accordion] Is the result order guaranteed?
>
> No. Do not rely on response order.
> [accordion] What if all tokens are invalid or unpriced?
>
> The endpoint returns HTTP 200 with an empty array.
> [accordion] Are duplicate token addresses deduped?
>
> No. Duplicate inputs may yield duplicate entries; dedupe client-side if required.
> [accordion] Can I send a comma-separated list in one tokens param?
>
> Yes. Provide a single `tokens` parameter with comma-separated addresses.
> [accordion] How many tokens can I request at once?
>
> Up to 10. Requests with more than 10 tokens return HTTP 400.
> [card] [Tutorial: Batch token prices](/tutorials/batch-token-prices)
>
> Many token prices in one request.
# Get OHLCV data for a token
Source: https://docs.dexpaprika.com/api-reference/tokens/get-ohlcv-data-for-a-token
api-reference/openapi.yml GET /networks/{network}/tokens/{token_address}/ohlcv
Historical OHLCV candles for a token in USD, built from a volume-weighted price across every pool the token trades in. Needs a Dev or Pro plan.
## Endpoint overview
One candle series per token, in USD. Where [pool OHLCV](/api-reference/pools/get-ohlcv-data-for-a-pool-pair) gives you the price of one pair in one pool, this endpoint gives you the token's price across every pool it trades in on the network, weighted by volume. You do not have to pick a pool first, and a thin pool with a stray trade does not become your chart.
The candles come from the same token price series as the [real-time OHLCV stream](/streaming/ohlcv-streaming), so you can load history here and continue live on `/sse/ohlcv`.
> [!WARNING]
>
> **Dev, Pro or Enterprise only.** Keyless requests and free keys get `403` with `"error": "plan_required"` (the `message` reads `this endpoint requires a Dev or Pro plan`); see [403 for paid-only endpoints](/knowledge-base/error-handling#403-forbidden-paid-only-endpoint) for the full body. Paid plans call `https://api-pro.dexpaprika.com` with the key as the whole `Authorization` header. Get a key in [console.dexpaprika.com](https://console.dexpaprika.com) and compare plans on [pricing](https://dexpaprika.com/api/pricing).
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api-pro.dexpaprika.com/networks/ethereum/tokens/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/ohlcv?start=-24h&interval=1h&limit=24"
```
## Plan limits
| Plan | Candle intervals | History depth |
| - | - | - |
| **Free (no key or registered key)** | not available | not available |
| **Dev** | all (`1m` to `24h`) | last 30 days |
| **Pro / Enterprise** | all | no plan limit |
`start`, `end` and the number of candles are checked against the window the same way as on pool OHLCV. Details on the [rate limits page](/knowledge-base/rate-limits#ohlcv-limits-by-plan). Each request costs one credit, whatever the number of candles it returns.
## Reading the response
* `open`, `high`, `low` and `close` are USD prices. There is no `inversed` flag here, because a token series has no second token to flip to.
* `volume` is the USD value traded in the token across all its pools during the candle, as a whole number.
* A candle only exists for an interval in which the token traded. On a quiet token a series of `1m` candles has gaps; fill them on your side if your chart needs a continuous axis.
* The latest candle can still be open. Its `time_close` is then earlier than a full interval after `time_open`, and its values change until the interval ends. Re-read it rather than caching it.
> [!TIP]
>
> Walkthrough with charts and code: [Token price history across every pool](/tutorials/token-ohlcv).
> See also: [Pool OHLCV](/api-reference/pools/get-ohlcv-data-for-a-pool-pair),
> [Token details](/api-reference/tokens/get-a-tokens-latest-data-on-a-network),
> [Real-time OHLCV streaming](/streaming/ohlcv-streaming)
### FAQs
> [accordion] How is this different from pool OHLCV?
>
> Pool OHLCV is the price of one pair in one pool, quoted in the other token of that pair unless you flip it with `inversed`. Token OHLCV is the token's USD price across every pool it trades in on the network, weighted by volume, with volume summed across those pools. Use token OHLCV for charts, backtests and valuation; use pool OHLCV when you care about one specific market.
> [accordion] Which plans can call it?
>
> Dev, Pro and Enterprise, on `https://api-pro.dexpaprika.com`. Dev can query the last 30 days; Pro and Enterprise have no plan limit on history. Keyless requests and free keys get `403`. Plans are on [pricing](https://dexpaprika.com/api/pricing).
> [accordion] Which intervals are supported?
>
> `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h`, up to 1000 candles per request. `interval` defaults to `24h` and `limit` to 10, so set both.
> [accordion] How do I request a time range?
>
> `start` is required: a relative offset from now (`-24h`, `-7d`, `-90m`), an RFC3339 timestamp, a date or Unix seconds. `end` is optional and takes the same formats. On Dev the range must fit inside the last 30 days.
> [accordion] Why are some minutes missing?
>
> A candle is only produced for an interval in which the token traded. No trades, no candle. This is expected on less active tokens and on short intervals.
```json 200 theme={null}
[
{
"time_open": "2026-09-27T00:00:00Z",
"time_close": "2026-09-28T00:00:00Z",
"open": 0.3385795783277411,
"high": 0.3740961105857449,
"low": 0.3323047258016061,
"close": 0.372185779287911,
"volume": 7807591
},
{
"time_open": "2026-09-28T00:00:00Z",
"time_close": "2026-09-29T00:00:00Z",
"open": 0.3721839403410761,
"high": 0.3722067508040842,
"low": 0.3197222116990852,
"close": 0.3273354476716349,
"volume": 10731703
}
]
```
> [card] [Tutorial: Token price history across every pool](/tutorials/token-ohlcv)
>
> USD candles for a token, built from every pool it trades in.
# Get your plan and current-period credit usage.
Source: https://docs.dexpaprika.com/api-reference/utils/get-your-plan-and-current-period-credit-usage
api-reference/openapi.yml GET /usage
Returns the plan the request was evaluated against and, for requests
authenticated with an API key on `api-pro.dexpaprika.com`, the account
email plus credits used and remaining in the current billing period.
Without an API key the response carries the plan only; all other
fields are omitted.
> [card] [Tutorial: Check your plan and credit usage](/tutorials/check-credit-usage)
>
> Read your plan and remaining credits, and warn before you run out.
# Retrieve high-level asset statistics
Source: https://docs.dexpaprika.com/api-reference/utils/retrieve-high-level-asset-statistics
api-reference/openapi.yml GET /stats
Get high-level platform statistics including total networks, DEXes, pools, and tokens
## Endpoint overview
Get high-level counts and coverage information across the platform.
> [!TIP]
>
> See also: [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pool search](/tutorials/pool-filtering)
### FAQs
> [accordion] What does the stats endpoint summarize?
>
> High-level counts for networks, DEXes, pools, and tokens available on DexPaprika.
> [accordion] How often does this update?
>
> Stats are rebuilt periodically; values reflect the latest successful aggregation.
> [accordion] Is this suitable for health checks?
>
> Yes. Many users poll it to confirm platform availability and catalog growth.
> [card] [Tutorial: List supported networks and coverage totals](/tutorials/list-networks#coverage-totals-with-stats)
>
> What the four totals count, and how they differ from per-chain counts.
# Changelog
Source: https://docs.dexpaprika.com/changelog/changelog
Track all updates and changes to DexPaprika API
This page contains all significant updates, improvements, and bug fixes for the DexPaprika API. We're committed to making our product better with each release. Check our [API reference](/api-reference) for the latest version.
**2026-11-18**
Batch token prices need an API key: a free key is enough
## Changed
* **`GET /networks/{network}/multi/prices`** no longer answers requests without an API key. They get `403` with `"error": "plan_required"` and `"required_tier": "free"`, before any data is read, so the refusal costs no credits.
* Any key unlocks it, a free one included. Free, Dev, Pro and Enterprise keys work as before, and each token in the batch still costs one credit.
* Single-token prices on `/networks/{network}/tokens/{token_address}` still work without a key.
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
```
A free key takes under a minute at [console.dexpaprika.com](https://console.dexpaprika.com). Send it as the entire `Authorization` header value; paid keys call `https://api-pro.dexpaprika.com` instead. Reference: [batched token prices](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network).
**2026-11-16**
From 23 November, an unknown or misspelled query parameter answers 400 instead of being ignored
## Changed on 23 November 2026
* **Query parameter names are checked.** Today a parameter the endpoint does not know is dropped, and the request returns `200` without the filter, sort or flag you meant to apply. From 23 November 2026 the same request answers `400`, so a typo shows up as an error instead of as data you did not ask for.
* The body names the first rejected parameter in `param`, lists what the endpoint accepts in `allowed`, and lists every rejected parameter in `violations`. For `GET /search?query=weth&limit=5`:
```json theme={null}
{"error":"unknown_param","message":"invalid query parameters: limit (unknown parameter)","param":"limit","allowed":["query"],"violations":[{"in":"query","param":"limit","error":"unknown_param"}]}
```
* The same date brings three more `400` cases: a name in the wrong case, such as `INTERVAL=1h` (`wrong_case_param`, with the right name in `expected`); the same parameter sent twice, such as `chains=ethereum&chains=base` (`repeated_param`; send `chains=ethereum,base`); and more than 100 parameters in one request (`too_many_params`).
* It applies to every REST endpoint on `api.dexpaprika.com` and `api-pro.dexpaprika.com`, on every plan, with or without a key.
## Migration
Check your requests against the [API reference](/api-reference/introduction) before 23 November. Every correct name below works today, so you can switch and test now. The wrong names we see most often:
| Sent today | Endpoint | Send instead |
| - | - | - |
| `sort_by`, `sort_dir`, `order` | pool and token search | `order_by` and `sort` |
| `volume_24h_min`, `min_volume_usd` | pool and token search | `volume_usd_24h_min` |
| `created_at_min`, `created_at_max` | pool and token search | `created_after`, `created_before` |
| `details` | pool and token search | `detailed` |
| `details` | token details | nothing, the endpoint takes no parameters |
| `inverted` | pool details, pool OHLCV | `inversed` |
| `query` | pool search | nothing; text search is `/search?query=` |
| `page` | pool and token search | `cursor`, taken from `next_cursor` |
Paging with `cursor` past the first page needs an API key; a free one is on the [console](https://console.dexpaprika.com). How to read a `400`: [error handling](/knowledge-base/error-handling#400-bad-request). Plans: [pricing](https://dexpaprika.com/api/pricing).
**2026-11-06**
Blast retired: the REST API and the streams no longer serve it
## Removed
* **Blast is no longer indexed.** Requests under `/networks/blast/` answer `404` with `"error": "unsupported_network"`, and the SSE streams answer `400` for `chain=blast`. `/networks` lists 35 networks.
* The Blast showcase stream went with it, so 34 assets now stream prices without a key. The list is on [showcase streams](/streaming/showcase-streams).
Every network we index, with its DEXes: [coverage](/coverage).
**2026-11-05**
Search on the free tiers leaves out pools and tokens created in the last hour
## Changed
* **Free-tier search runs an hour behind on new pools and tokens.** On `/networks/{network}/pools/search`, `/pools/search`, `/networks/{network}/tokens/search` and `/tokens/search`, keyless requests and free keys no longer see pools and tokens created in the last 60 minutes. Everything older comes back as before.
* The request does not fail. Sorting by `created_at` returns the newest rows that are at least an hour old, and a `created_after` window shorter than an hour, such as `created_after=-10m`, returns `200` with an empty `results` array. The response does not mark the cutoff.
* A token's pools and a DEX's pools come from `/networks/{network}/pools/search`, so they follow the same delay. `/search` and the pool and token detail endpoints are unchanged.
* Dev, Pro and Enterprise keys on `api-pro.dexpaprika.com` see new pools and tokens as soon as they are indexed. Send the key in the `Authorization` header, the key on its own.
```bash theme={null}
curl -H "Authorization: YOUR_API_KEY" "https://api-pro.dexpaprika.com/networks/solana/pools/search?order_by=created_at&sort=desc&created_after=-10m"
```
Details: [search freshness](/knowledge-base/rate-limits#search-freshness). Plans: [pricing](https://dexpaprika.com/api/pricing).
**2026-10-30**
OHLCV and the SSE streams accept checksummed EVM addresses
## Fixed
* **OHLCV for a checksummed pool address.** `GET /networks/{network}/pools/{pool_address}/ohlcv` with a mixed-case EVM address returned `200` with no candles. It now returns the same candles as the lowercase address.
* **Checksummed addresses on the SSE streams.** A stream opened with a mixed-case EVM address received no events. It now does, on `GET` and `POST`. Events carry the address in lowercase.
* **A key repeated in one `POST`** subscribed the connection once per copy, so each event arrived several times. Repeats are now dropped.
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640/ohlcv?start=-6h&interval=1h"
```
Details: [historical OHLCV](/tutorials/retrieve-historical-data) and [streaming](/streaming/introduction).
**2026-10-26**
Paging through search results needs an API key past the first page
## Changed
* **Search pages past the first need an API key.** On `/networks/{network}/pools/search`, `/pools/search`, `/networks/{network}/tokens/search` and `/tokens/search`, a request without a key gets the first page: up to 100 rows with `limit=100`.
* A keyless request that carries `cursor` answers `403` with `"error": "plan_required"`, `"required_tier": "free"` and `"param": "cursor"`. It is refused before any data is read and costs no credits.
* Any API key pages without limit, a free one from the [console](https://console.dexpaprika.com) included. Send it in the `Authorization` header, the key on its own.
```bash theme={null}
curl -H "Authorization: YOUR_API_KEY" "https://api.dexpaprika.com/networks/solana/pools/search?limit=100&cursor=NEXT_CURSOR"
```
Since 14 October keyless paging requests carried an `x-api-warning` header; from today they are refused. Details: [pagination rules](/knowledge-base/rate-limits#pagination-rules). Limits by plan: [pricing](https://dexpaprika.com/api/pricing).
**2026-10-21**
Every SDK, the CLI, the MCP server, LangChain and n8n check network ids and addresses before they reach the request path
## Security
* **An id can no longer change which endpoint your key goes to.** The clients placed network ids, pool addresses and token addresses into the request path as given, so an application that passed user input or a model's tool arguments to them could be made to send its API key to a different endpoint, for example with a pool address of `../../../stats`. Each client now refuses such a value before any request is sent. Real ids pass unchanged, including Sui and Aptos type tags with `::` and TON addresses.
* **SDKs:** [TypeScript](/get-started/sdk-ts) [1.14.1](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.14.1) throws a `DexPaprikaError`, [Python](/get-started/sdk-python) [0.14.1](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.14.1) raises `ValueError`, [Go](/get-started/sdk-go) [v1.13.1](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.13.1) returns an error and [PHP](/get-started/sdk-php) [1.13.1](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.13.1) throws a `ValidationException` for a value that is `.` or `..` or contains `/`, `\`, `?`, `#`, `%`, whitespace or a control character. TypeScript, Python and PHP also refuse an empty value.
* **MCP server, `dexpaprika-mcp` [2.9.2](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.9.2).** `network` must match `[a-z0-9_-]` and addresses `[A-Za-z0-9:_-]`; anything else returns `DP400_INVALID_NETWORK` or `DP400_INVALID_ADDRESS`. A redirect from the API is followed only to the same host and a path that passes the same check, otherwise the tool returns `DP502_REDIRECT_REFUSED`.
* **[CLI](/tutorials/cli) [0.12.0](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.12.0).** Ids are checked the same way, terminal output drops control characters that on-chain token names could carry, and the CLI warns before sending a key to a host outside dexpaprika.com. `config set-key` without an argument prompts for the key, and `--api-key-file` or `DEXPAPRIKA_API_KEY_FILE` keep it out of your shell history. The install script checks each download against the release's `SHA256SUMS`.
* **[`langchain-dexpaprika`](https://github.com/coinpaprika/langchain-dexpaprika/releases/tag/v0.5.1) 0.5.1 and [`n8n-nodes-dexpaprika`](/ai-integration/n8n) [0.5.1](https://github.com/coinpaprika/n8n-nodes-dexpaprika/releases/tag/v0.5.1)** refuse the same values in their tool and node fields.
## Fixed
* **Response caches in the SDKs are bounded.** TypeScript [1.14.2](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.14.2) skips the cache for a request whose cache key is longer than 2,048 characters. Python [0.14.2](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.14.2) keeps at most `max_cache_entries` responses per service (256 by default) and evicts the least recently used.
* **PHP [1.13.2](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.13.2): `FilesystemCache` is private to your user.** The default directory used to be shared by every account on the host. It is now `dexpaprika_cache_` with mode `0700`, entries are JSON with an HMAC check instead of `serialize()`, and a directory owned by someone else is refused. A directory you pass yourself is held to the same check.
If your application passes user input or model output to one of these clients, upgrade. Install commands for every client: [tools](/tools/all-tools).
**2026-10-16**
SDKs and CLI: the 48h price-change window on pool search, a clear error when a key is refused before it reaches the API, and 429 retries that wait as long as the server asks
## Added
* **48h price-change window on pool search** in [TypeScript](/get-started/sdk-ts) [1.14.0](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.14.0), [Python](/get-started/sdk-python) [0.14.0](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.14.0), [Go](/get-started/sdk-go) [v1.13.0](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.13.0), [PHP](/get-started/sdk-php) [1.13.0](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.13.0) and the [CLI](/tutorials/cli) [0.11.0](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.11.0). Sort by `price_change_percentage_48h` and bound it with `priceChange48hMin` / `priceChange48hMax` (TypeScript), `price_change_percentage_48h_min` / `_max` (Python), `PriceChange48hMin` / `PriceChange48hMax` (Go), `priceChangePercentage48hMin` / `Max` (PHP) or `--price-change-48h-min` / `--price-change-48h-max` (CLI).
* Pool results in TypeScript, Python and Go carry the `price_change_percentage_48h` field. Token search is unchanged and sorts and filters on the 24h window only.
## Fixed
* **A 48h sort no longer turns into a different sort.** The four SDKs were missing `price_change_percentage_48h` from their list of pool sort fields and silently fell back to the default sort, so asking for the 48h window returned pools in another order with no warning.
* **A key refused before it reaches the API now says so.** When the `Authorization` header does not carry the key in the form it was issued, `api-pro.dexpaprika.com` answers with a `403` HTML page instead of our JSON error, and the SDKs reported it as an unknown error or a bare `403 Forbidden`. The SDKs and the CLI now say the key was refused before it reached the API and ask you to check that the whole key is in `Authorization` with nothing in front of it. Python raises `KeyRefusedError`. A `403` with a JSON body, such as `plan_required`, is handled as before.
* **A `429` retry waits as long as the server asks**, in TypeScript and PHP. The SDK reads the `Retry-After` header first, then the `retry_after` field in the body, and caps the wait at 60 seconds. Other `4xx` responses are still not retried.
Keys: [console.dexpaprika.com](https://console.dexpaprika.com). Plans: [pricing](https://dexpaprika.com/api/pricing).
**2026-10-14**
Technical indicators in the MCP servers, the SDKs, the CLI, LangChain and n8n
## Added
* **MCP server, `dexpaprika-mcp` [2.8.0](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.8.0), and hosted MCP 2.10.0 at `mcp.dexpaprika.com`.** Two new tools, 20 in total: `getPoolIndicator` on every plan and `getTokenIndicator` on your own Dev, Pro or Enterprise key. See the [MCP tools reference](/ai-integration/mcp-tools).
* **SDKs.** `pools.getIndicator` and `tokens.getIndicator` in [TypeScript](/get-started/sdk-ts) 1.13.0, `get_indicator` in [Python](/get-started/sdk-python) 0.13.0, `GetIndicator` in [Go](/get-started/sdk-go) v1.12.0, and `getPoolIndicator` / `getTokenIndicator` in [PHP](/get-started/sdk-php) 1.12.0.
* **CLI 0.10.0.** `pool-indicator` and `token-indicator` commands; see the [CLI guide](/tutorials/cli).
* **LangChain 0.5.0 and n8n 0.5.0.** Pool and token indicator tools in `langchain-dexpaprika`, and a Get Indicator operation for pools and tokens in [`n8n-nodes-dexpaprika`](/ai-integration/n8n).
Pool indicators work without a key, with the same interval and history limits as pool OHLCV; token indicators need a Dev, Pro or Enterprise key. See the [technical indicators tutorial](/tutorials/technical-indicators).
**2026-10-13**
Technical indicators move to one endpoint per pool and per token, and every pool indicator opens on every plan; a tutorial for every endpoint
## Added
* **Seven new tutorials**, each with a working curl and Python script for the free tier and for paid keys: [list networks](/tutorials/list-networks), [list DEXes](/tutorials/list-dexes), [search](/tutorials/search), [screen tokens](/tutorials/token-screener), [pool details](/tutorials/pool-details), [pool transactions](/tutorials/pool-transactions) and [check your credit usage](/tutorials/check-credit-usage).
* **Every API reference page links its tutorial**, in the same place on each page, REST and streaming alike.
* **[Feed an AI trading agent with technical indicators](/tutorials/agent-trading-signals)**: a paper-trading agent that reads RSI, MACD and Bollinger Bands for a watchlist of pools every hour and asks a model for buy, sell or hold. Runs without a key.
## Changed
* **The ten indicator endpoints are now two.** Pools use `GET /networks/{network}/pools/{pool_address}/indicators` and tokens use `GET /networks/{network}/tokens/{token_address}/indicators`, with the indicator in the required `indicator` query parameter: `rsi`, `ema`, `macd`, `bbands` or `vwap`.
* The old paths, such as `/indicators/rsi`, answer `404`.
* The parameters per indicator and the response are unchanged.
* **All five pool indicators work on every plan**, Bollinger Bands and VWAP included, with the same interval and history limits as pool OHLCV: without a key `1h` and up over the last 24 hours, with a free key `10m` and up over 7 days, on Dev every interval over 30 days, on Pro and Enterprise no limit. See [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan). Without `interval`, a keyless request now defaults to `1h`.
* Token indicators still need a Dev, Pro or Enterprise key on `https://api-pro.dexpaprika.com`.
* A request without `indicator` answers `400` with `"error":"missing_param"`, and a parameter that belongs to another indicator, such as `fast_period` with `indicator=rsi`, answers `400` with `"error":"invalid_param"`.
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/indicators?indicator=rsi&interval=1h&start=-24h"
```
## Migration
* Move the indicator name from the path into the query: `/indicators/macd?interval=1h` becomes `/indicators?indicator=macd&interval=1h`.
Walkthrough: [Technical indicators](/tutorials/technical-indicators). Reference: [pool indicators](/api-reference/pools/get-a-technical-indicator-for-a-pool) and [token indicators](/api-reference/tokens/get-a-technical-indicator-for-a-token).
**2026-10-12**
Curve pools on Ethereum and Base move to their own DEX ids; 48h price-change sorting and filtering in both MCP servers
## Changed
* **Curve pools have their own DEX ids.** Pools from Curve's StableSwap factory on Ethereum and Base now report `curve_stableswap`, and pools from its TriCrypto factory on Base report `curve_tricrypto`. Existing pools moved too, so they no longer come back under `dex_name=curve`. Other Curve pools keep `curve`.
* **MCP server, `dexpaprika-mcp` [2.7.3](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.7.3).** The pool tools accept `sort_by=price_change_percentage_48h`, and `getNetworkPoolsFilter` takes `price_change_percentage_48h_min` and `_max`. Before this release the 48h sort failed the tool's own validation.
* **Hosted MCP, `mcp.dexpaprika.com` 2.9.2, live.** The same 48h sort and bounds, on the MCP tools and on the ChatGPT app.
## Migration
* If you filter on `dex_name=curve` on Ethereum or Base, run the same search with `dex_name=curve_stableswap` and, on Base, `dex_name=curve_tricrypto`, or those pools drop out of your results.
```bash theme={null}
curl "https://api.dexpaprika.com/networks/base/pools/search?dex_name=curve_tricrypto&limit=5"
```
Details: [Filter and screen liquidity pools](/tutorials/pool-filtering).
**2026-10-07**
Technical indicators: RSI, EMA, MACD, Bollinger Bands and VWAP for pools and tokens, computed from OHLCV candles
## Added
* **Ten indicator endpoints** return RSI, EMA, MACD, Bollinger Bands and rolling VWAP computed from OHLCV candles, so you no longer download candles and run the maths yourself. Pools use `GET /networks/{network}/pools/{pool_address}/indicators/{name}`, tokens use `GET /networks/{network}/tokens/{token_address}/indicators/{name}`, with `rsi`, `ema`, `macd`, `bbands` or `vwap` as the name.
* Same range parameters as OHLCV: `interval` from `1m` to `24h`, `start` and `end` (relative offsets such as `-24h` work), up to 1000 values per request and a `next_cursor` to page. Each indicator takes its own window parameters, such as `period` for RSI or `fast_period`, `slow_period` and `signal_period` for MACD.
* Pool RSI, EMA and MACD work on every plan. Keyless callers and free keys get candles of `10m` and up and the last 7 days. Pool Bollinger Bands and VWAP, and all five token indicators, need a Dev, Pro or Enterprise plan on `https://api-pro.dexpaprika.com`; without one they answer `403` with `"error":"plan_required"`.
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/indicators?indicator=rsi&interval=1h&start=-24h"
```
Walkthrough: [Technical indicators](/tutorials/technical-indicators). Reference: [pool indicators](/api-reference/pools/get-a-technical-indicator-for-a-pool) and [token indicators](/api-reference/tokens/get-a-technical-indicator-for-a-token). The paths changed on 13 October, see above. Plans: [pricing](https://dexpaprika.com/api/pricing). Keys: [console.dexpaprika.com](https://console.dexpaprika.com).
**2026-10-05**
The transactions stream replays the swaps you missed after a reconnect, up to 15 minutes back
## Added
* **Resume on `/sse/transactions`.** Every swap event now carries an SSE `id:`. Reconnect with that id in the `Last-Event-ID` header, which `EventSource` does by itself, or with `since` in Unix seconds, and the stream replays the swaps you missed before it continues live.
* The replay reaches back 15 minutes. A `GET` replays up to 100 swaps and a `POST` up to 500 across its subscriptions; past the cap you get the most recent ones. The replay starts with the swap you named, so deduplicate.
```bash theme={null}
curl --http1.1 -N -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://streaming-pro.dexpaprika.com/sse/transactions?method=pool&chain=ethereum&address=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&since=$(( $(date +%s) - 600 ))"
```
Details and a consumer that resumes: [Transactions streaming](/streaming/transactions-streaming#resume-after-a-disconnect). Dev, Pro and Enterprise plans, as before.
**2026-10-02**
Pool search sorts and filters on the 48h price change; MCP server 2.7.2 says what to do when a tool needs a paid plan
## Added
* **`price_change_percentage_48h` on pool search.** Both `GET /networks/{network}/pools/search` and `GET /pools/search` take it as an `order_by` value and as `price_change_percentage_48h_min` / `_max` bounds, next to the 24h, 6h, 1h and 5m windows. Pool rows carry the field.
* Token search is unchanged: it sorts and filters on the 24h window only, rejects `order_by=price_change_percentage_48h` with a `400`, and drops the 48h bounds.
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?price_change_percentage_48h_min=100&order_by=volume_usd_24h&limit=10"
```
Details: [Filter and screen liquidity pools](/tutorials/pool-filtering).
## Changed
* **MCP server, `dexpaprika-mcp` [2.7.2](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.7.2).** `getPoolTransactions` no longer describes itself as keyless. When a tool hits a paid-only endpoint without a paid key, it returns `DP403_PLAN_REQUIRED` with the plan it needs, the `https://api-pro.dexpaprika.com` host to set with `DEXPAPRIKA_API_BASE_URL`, and `console_url`, `docs_url` and `pricing_url` fields, instead of a bare `403`.
**2026-09-30**
Pool transactions are paid-only: the REST endpoint and the /sse/transactions stream need a Dev, Pro or Enterprise plan; API errors now carry an error code
## Changed
* **`GET /networks/{network}/pools/{pool_address}/transactions`** answers only Dev, Pro and Enterprise keys, on `https://api-pro.dexpaprika.com`. Keyless requests and free keys get `403` with `"error":"plan_required"` and `"required_tier":"dev"`.
* **`/sse/transactions`** (GET and POST) needs the same plans, on `https://streaming-pro.dexpaprika.com`. Keyless callers and free keys get the same `403` before a stream opens.
* `/sse/ohlcv` refusals now carry the same body, with `"error":"plan_required"`. The gate itself is unchanged: Dev, Pro and Enterprise keys pass it, as before.
* REST error bodies carry an `error` code next to `message`, and a field naming what failed where there is one: `invalid_param` with `param`, `not_found` with `resource`, `unsupported_network`, `plan_required` with `required_tier`. `message` is still there, so code that reads it keeps working; branch on `error` from now on, since message text can change. Examples on [error handling](/knowledge-base/error-handling).
* Unchanged: prices stream keyless on the [showcase assets](/streaming/showcase-streams) and with any key on any token, and reserves stream with any key, free ones included.
On the free tier, [pool details](/api-reference/pools/get-a-pool-on-a-network) still carry each pool's transaction counts and volume, and [pool search](/tutorials/pool-filtering) filters on them.
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api-pro.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?limit=20"
```
The hosted MCP server runs `getPoolTransactions` on your own key, the same way as `getTokenOHLCV`: set it as the `Authorization` header on your connection ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)). Without one the tool answers `DP401_API_KEY_REQUIRED`. Reference: [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages), [transactions streaming](/streaming/transactions-streaming). Plans: [pricing](https://dexpaprika.com/api/pricing). Keys: [console.dexpaprika.com](https://console.dexpaprika.com).
**2026-09-29**
Token OHLCV: USD candles for a token across every pool it trades in, on Dev and Pro, in the API and our clients
## Added
* **`GET /networks/{network}/tokens/{token_address}/ohlcv`** returns OHLCV candles for a token instead of a pool. Prices are a volume-weighted USD price across every pool the token trades in on the network, and `volume` is the USD traded across all of them. You no longer have to pick a pool or convert a pair price to dollars to chart a token.
* Same parameters as pool OHLCV: `start` (relative offsets such as `-24h` work), `end`, `interval` from `1m` to `24h`, and up to 1000 candles per request.
* The candles come from the same series as the [`/sse/ohlcv` stream](/streaming/ohlcv-streaming), so history from REST and live candles from the stream line up.
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api-pro.dexpaprika.com/networks/ethereum/tokens/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/ohlcv?start=-24h&interval=1h&limit=24"
```
Available on Dev (last 30 days of history), Pro and Enterprise, on `https://api-pro.dexpaprika.com`. Keyless requests and free keys get `403` with a message naming the plan. Walkthrough: [Token price history across every pool](/tutorials/token-ohlcv). Reference: [Get OHLCV data for a token](/api-reference/tokens/get-ohlcv-data-for-a-token). Plans: [pricing](https://dexpaprika.com/api/pricing).
Our clients call it too. Point them at `https://api-pro.dexpaprika.com` with a Dev or Pro key:
| Package | Release | How to call it |
| - | - | - |
| TypeScript SDK, `dexpaprika-sdk` on npm | [1.12.0](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.12.0) | `client.tokens.getOHLCV(network, address, { start, interval, limit })` |
| Python SDK, `dexpaprika-sdk` on PyPI | [0.12.1](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.12.1) | `client.tokens.get_ohlcv(network, address, start=..., interval=...)` |
| PHP SDK, `coinpaprika/dexpaprika-sdk` | [1.11.0](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.11.0) | `$client->tokens->getTokenOHLCV($network, $address, $start, $options)` |
| Go SDK | [1.11.0](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.11.0) | `client.Tokens.GetOHLCV(ctx, network, address, &dexpaprika.TokenOHLCVOptions{...})` |
| CLI, `dexpaprika-cli` | [0.9.0](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.9.0) | `dexpaprika-cli token-ohlcv --start -24h --interval 1h`. Set the host with `--base-url` or `DEXPAPRIKA_API_BASE_URL`. |
| MCP server, `dexpaprika-mcp` on npm | [2.7.0](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.7.0) | `getTokenOHLCV` tool. Set `DEXPAPRIKA_API_KEY` and `DEXPAPRIKA_API_BASE_URL`. |
| n8n node, `n8n-nodes-dexpaprika` | [0.4.0](https://github.com/coinpaprika/n8n-nodes-dexpaprika/releases/tag/v0.4.0) | **Get Token OHLCV** on the Token resource, with the DexPaprika API credential attached |
| Hosted MCP, `mcp.dexpaprika.com` | 2.7.0, live | `getTokenOHLCV` tool, on your own key: set it as the `Authorization` header on your connection ([setup](/ai-integration/hosted-mcp-server#your-own-api-key-for-token-ohlcv-and-pool-transactions)). Every other tool still needs no key. |
**2026-09-28**
Relative times on transaction and search filters, in the API and every client; SDKs, CLI and MCP server updated for the OHLCV plan limits
## Added
* **`from` and `to` on `GET /networks/{network}/pools/{pool_address}/transactions`** accept a relative offset from now (`-1h`, `-24h`, `-7d`), RFC3339 or `YYYY-MM-DD`, next to unix seconds. `from=-1h` returns the last hour of transactions.
* **`created_after` and `created_before` on the four search endpoints** (`/pools/search`, `/networks/{network}/pools/search`, `/tokens/search`, `/networks/{network}/tokens/search`) accept the same shapes. `created_after=-24h` returns what was created in the last day.
* Unix seconds keep working unchanged. The `query` block of a search response shows the resolved unix timestamp.
Every client we publish takes the new shapes:
| Package | Release | What changed for time filters |
| - | - | - |
| TypeScript SDK, `dexpaprika-sdk` on npm | [1.11.0](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.11.0) | `from` and `to` in the `pools.getTransactions()` options take a string such as `'-1h'` as well as a number. |
| Python SDK, `dexpaprika-sdk` on PyPI | [0.11.0](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.11.0) | `from_timestamp` and `to_timestamp` on `pools.get_transactions()` take a string such as `"-1h"` as well as an int. |
| PHP SDK, `coinpaprika/dexpaprika-sdk` | [1.10.0](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.10.0) | `$client->pools->getPoolTransactions()` now sends `from` and `to`. Earlier releases dropped both, so a time filter set through the client returned the latest transactions. |
| Go SDK | [1.10.0](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.10.0) | `WithFrom` and `WithTo` take a string such as `"-1h"`, next to `WithFromTimestamp` and `WithToTimestamp`. |
| CLI, `dexpaprika-cli` | [0.8.0](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.8.0) | `--from` and `--to` on `transactions`, and `--created-after` and `--created-before` on `pool-filter` and `filter-tokens`, accept `-1h`. Earlier releases refused it. |
| MCP server, `dexpaprika-mcp` on npm | [2.6.0](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.6.0) | `from`, `to`, `created_after` and `created_before` accept `-24h`. Earlier releases rejected it before the call left. |
The hosted MCP server at `https://mcp.dexpaprika.com` accepts the same values.
## Changed
Every client we publish now follows the two OHLCV changes below. Examples ask for `start=-24h`, which every plan can query, keyless included; the per-plan history window is documented where you call OHLCV; and client-side `limit` caps match the API maximum of 1000 candles.
| Package | Release | What changed for OHLCV |
| - | - | - |
| TypeScript SDK, `dexpaprika-sdk` on npm | [1.10.1](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.10.1) | Examples and doc comments use `-24h` and describe the plan window. No API change. |
| Python SDK, `dexpaprika-sdk` on PyPI | [0.10.0](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.10.0) | `limit` up to 1000 (was 366). `HTTPError` text now carries the API's message, so a `403` says which plan lifts the limit. |
| PHP SDK, `coinpaprika/dexpaprika-sdk` | [1.9.0](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.9.0) | `limit` up to 1000 (was 366). Examples use hourly candles over `-24h`. |
| Go SDK | [1.9.0](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.9.0) | `Limit` above 366 is no longer cut to 366 without an error; the cap is 1000. |
| CLI, `dexpaprika-cli` | [0.7.0](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.7.0) | `pool-ohlcv --start -24h` works; earlier releases refused it. The help lists the window per plan. |
| MCP server, `dexpaprika-mcp` on npm | [2.5.2](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.5.2) | `getPoolOHLCV` leads with `-24h`, `limit` up to 1000, and a `403` returns the API's message instead of a bare status. |
| LangChain, `langchain-dexpaprika` | [0.3.0](https://github.com/coinpaprika/langchain-dexpaprika/releases/tag/v0.3.0) | `limit` up to 1000 (was 366), and a `403` reaches the agent with the API's message. |
| n8n, `n8n-nodes-dexpaprika` | [0.3.0](https://github.com/coinpaprika/n8n-nodes-dexpaprika/releases/tag/v0.3.0) | `10 Minutes` interval added, up to 1000 candles (was 100), Start defaults to `-24h`. |
The hosted MCP server at `https://mcp.dexpaprika.com` carries the same `getPoolOHLCV` guidance.
## Fixed
| Package | Release | What changed |
| - | - | - |
| TypeScript SDK, `dexpaprika-sdk` on npm | [1.11.1](https://github.com/coinpaprika/dexpaprika-sdk-ts/releases/tag/v1.11.1) | `pools.getTransactions()` is typed: it returns `{ transactions, page_info }` instead of `unknown`. Each transaction carries `created_at`, the token symbols, `volume_0`/`volume_1` and USD prices, and `tokens.getMultiPrices()` rows carry `last_updated`. |
| Python SDK, `dexpaprika-sdk` on PyPI | [0.11.1](https://github.com/coinpaprika/dexpaprika-sdk-python/releases/tag/v0.11.1) | Transaction rows keep `created_at`, the token symbols, volumes and USD prices, and multi-price rows keep `last_updated`. Earlier releases dropped them. |
| PHP SDK, `coinpaprika/dexpaprika-sdk` | [1.10.1](https://github.com/coinpaprika/dexpaprika-sdk-php/releases/tag/v1.10.1) | `$client->networks->getNetworkDexes()`, `findNetwork()` and `findDex()` work. Earlier releases failed on the first and always returned `null` from the other two. |
| Go SDK | [1.10.1](https://github.com/coinpaprika/dexpaprika-sdk-go/releases/tag/v1.10.1) | `Transaction` carries `CreatedAt`, the token symbols, volumes and USD prices, and `TokenPrice` carries `LastUpdated`. Earlier releases dropped them. |
| CLI, `dexpaprika-cli` | [0.8.1](https://github.com/coinpaprika/dexpaprika-cli/releases/tag/v0.8.1) | Streaming without a key on a token or feed that needs one says how to add a free key, instead of printing a bare `403`. |
| MCP server, `dexpaprika-mcp` on npm | [2.6.1](https://github.com/coinpaprika/dexpaprika-mcp/releases/tag/v2.6.1) | `getCapabilities` reports 36 networks and the server's real version. |
## Migration
* Upgrading is optional. `start` is passed through as a string in every SDK, so `-24h` works on older releases too. Two exceptions: the CLI before 0.7.0 refuses `-24h`, and the Go SDK before 1.9.0 lowers any `Limit` above 366 to 366.
* Relative times on transactions and search need the CLI 0.8.0 or later and the MCP server 2.6.0 or later; older releases refuse them. On the PHP SDK before 1.10.0, `from` and `to` set through `$client->pools` never reach the API. The search filters `created_after` and `created_before` already passed strings through in every SDK, so they work on older releases.
* A `403` from OHLCV is a plan limit, not a transient failure, so do not retry it unchanged. See [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan), or [register a free key](https://console.dexpaprika.com) for 7 days at `10m` and longer.
**2026-09-25**
OHLCV history depth and candle size now depend on your plan; start and end accept offsets such as -24h
## Changed
* **`GET /networks/{network}/pools/{pool_address}/ohlcv` is limited per plan.** How far back you can query and how fine the candles can be now depends on the plan behind the request:
| Plan | Candle intervals | History depth |
| - | - | - |
| Free (no key) | `1h`, `6h`, `12h`, `24h` | last 24 hours |
| Free (registered key) | `10m` and longer | last 7 days |
| Dev | all | last 30 days |
| Pro / Enterprise | all | unlimited |
* `start`, `end` and `count_back` are all checked against the window. A range that starts inside the window but reaches before it is trimmed to the window; a range that lies entirely before it is rejected.
* A request outside the plan's limits returns `403` with `{"message": "..."}`. The message names the plan that lifts the limit, for example `OHLCV history beyond the last 7 days requires a Dev plan (30 days) or a Pro plan (unlimited)`. The interval check runs before the history check.
## Added
* **`start` and `end` on `GET /networks/{network}/pools/{pool_address}/ohlcv` accept a relative offset from now:** `-24h`, `-7d`, `-90m`, `-30s`. `start=-24h` always selects the last 24 hours, which every plan may query. `start` stays required.
* `limit` defaults to 10 candles (was 1).
## Fixed
* A missing or malformed `start` or `end` returns `400` again instead of `403` on the free tiers.
## Migration
* Keyless integrations that pull sub-hour candles or more than 24 hours of history: [register a free key](https://console.dexpaprika.com) for `10m`+ candles over 7 days, or move to Dev / Pro for `1m` and `5m` candles and deeper history.
* Treat `403` on this endpoint as a parameter error, not a transient failure: do not retry it with backoff. Full details on the [rate limits page](/knowledge-base/rate-limits#ohlcv-limits-by-plan).
**2026-09-23**
Keyless credit allowance lowered to 10,000 per rolling 30 days
## Changed
* **Keyless requests get 10,000 credits per IP per rolling 30 days**, down from 30,000. The per-minute rate (15) and everything else about the keyless tier are unchanged. Both REST and streaming draw from the same per-IP budget.
## Migration
* Anything that ran keyless above 10,000 credits a month should [register a free key](https://console.dexpaprika.com): 100,000 credits per rolling 30 days at 30 requests a minute, no card. See [rate limits](/knowledge-base/rate-limits).
**2026-09-15**
Pricing v2.0: Dev plan, new rate limits and credit quotas on every tier
## Added
* **Dev plan**, \$30 a month: 120 requests per minute, 500,000 credits per billing period, 30 concurrent streams, real-time data. Same hosts and key format as Pro: `https://api-pro.dexpaprika.com` for REST and `https://streaming-pro.dexpaprika.com` for SSE.
## Changed
* Free key: 30 requests per minute and 100,000 credits, down from 50 and 300,000. Keyless: 15 requests per minute per IP and 30,000 credits per IP, down from 50,000.
* Keyless and free keys now count usage over a rolling 30-day window instead of a calendar month. There is no reset date, and their `402` bodies carry no `resets_at`. Dev and Pro reset with the billing period.
* Pro: 500 requests per minute, up from 300. Credits stay at 5,000,000 per billing period.
* Overage on Dev and Pro: \$20 per additional 1,000,000 records, capped by the limit you set in the console.
* Bulk credit packs are no longer sold. Packs already purchased keep draining.
## Migration
* An integration sized against the old free-key limits will start seeing `429`. Read `ratelimit-limit` and `x-credits-remaining` on every response, or move to Dev. Current figures are always on [pricing](https://dexpaprika.com/api/pricing); limits by tier are on [rate limits](/knowledge-base/rate-limits).
**2026-09-10**
Token OHLCV streaming over SSE for paid plans
## Added
* `GET /sse/ohlcv` on `https://streaming-pro.dexpaprika.com` streams sealed token candles for any indexed token on every chain we index, at `1s`, `5s` or `60s`. The event type is `token_ohlcv`.
* Resume a dropped connection with `Last-Event-ID`, or backfill the last 15 minutes with `since`. Each candle, backfilled ones included, is one credit; pings are free.
* Available on Dev, Pro and Enterprise keys. Keyless and free keys get `403`. Full guide in [OHLCV streaming](/streaming/ohlcv-streaming), parameters at [GET /sse/ohlcv](/streaming/stream-real-time-ohlcv-for-a-single-asset).
**2026-08-07**
Paid plans launched, served from api-pro.dexpaprika.com
## Added
* Pro and Enterprise now authenticate against `https://api-pro.dexpaprika.com`, and `https://streaming-pro.dexpaprika.com` for SSE, with the API key sent as the entire `Authorization` header value.
* Keys, usage and billing live in [console.dexpaprika.com](https://console.dexpaprika.com). Each account has one active key.
## Unchanged
* Keyless and free registered keys keep calling `api.dexpaprika.com` and `streaming.dexpaprika.com`. Endpoints, paths, parameters and response shapes are identical on every host.
## Migration
* Only the base URL changes, plus the `Authorization` header. A key sent to the host that does not match its plan returns `403` with `"error": "wrong_host"`, and the body names the host to use. Full steps in [upgrading to Pro](/api-pro/upgrading), plans on [pricing](https://dexpaprika.com/api/pricing).
**2026-08-05**
DEX pools endpoint replaced by the pool search dex_name filter
## Removed
* `GET /networks/{network}/dexes/{dex}/pools` has been removed and now returns `410 Gone`. Use `GET /networks/{network}/pools/search` with the `dex_name` query parameter instead. The whole route is gone, so an unknown DEX slug returns the same 410 rather than a 404.
## Migration
* The DEX moves out of the path and into a query parameter: `/networks/ethereum/dexes/curve/pools` becomes `/networks/ethereum/pools/search?dex_name=curve`.
* `dex_name` takes the DEX id, the `dex_id` field from `GET /networks/{network}/dexes`, matched case-insensitively. Passing that response's `dex_name` field instead, a display name like `Uniswap V3`, returns an empty `results` array rather than an error.
* Pagination is cursor-based. Read `has_next_page` and `next_cursor` from the response and pass `next_cursor` back as `cursor`, instead of using `page`. There is no `page_info` object on the replacement.
* Rows arrive in a `results` array rather than `pools`.
* The 24h volume field is `volume_usd_24h`. There is no bare `volume_usd`, and `order_by=volume_usd` is rejected with a `400`, so sort with `order_by=volume_usd_24h`.
* `dex_name` also applies on the cross-network `GET /pools/search`, which the removed endpoint had no equivalent for. Combine it with `chains` to scope the result, for example `?dex_name=uniswap_v3&chains=base`.
**2026-07-15**
Token pools endpoint replaced by the pool search token_address filter
## Removed
* `GET /networks/{network}/tokens/{token_address}/pools` has been removed and now returns `410 Gone`. Use `GET /networks/{network}/pools/search` with the new `token_address` query parameter instead.
## Added
* **`token_address` filter on pool search.** `GET /networks/{network}/pools/search` now accepts `token_address` to restrict results to pools that contain the token on the given network. It combines with all existing search filters and sorting (`order_by`, default `volume_usd_24h`).
## Migration
* The filter is network-scoped only. The cross-network `GET /pools/search` accepts `token_address` but silently ignores it, so use the per-network path when filtering by token.
* `token_address` takes a single token. Repeating the parameter does not act as a pair filter; the API uses only one of the values (not guaranteed by order). The old `address` (second-token pair filter) and `reorder` (pair-perspective flip) parameters have no equivalent on pool search.
* Pagination is cursor-based (`has_next_page` + `next_cursor`), rows are in a `results` array, and sorting uses `order_by=volume_usd_24h` instead of the old `order_by=volume_usd`.
* An unknown `token_address` returns HTTP 200 with an empty `results` array, not an error.
**2026-06-30**
Pool and token list/filter endpoints replaced by search
## Removed
The legacy pool and token list/filter endpoints have been removed and now return `410 Gone`. Each is replaced by a unified search endpoint:
* `GET /networks/{network}/pools` and `GET /networks/{network}/pools/filter` are replaced by `GET /networks/{network}/pools/search`
* `GET /pools` is replaced by `GET /pools/search`
* `GET /networks/{network}/tokens/filter` and `GET /networks/{network}/tokens/top` are replaced by `GET /networks/{network}/tokens/search`
* Need results across several networks in one call? Use `GET /pools/search` and `GET /tokens/search` with a `chains` filter (for example `chains=ethereum,base,solana`).
## Added
* **Richer filtering on the search endpoints.** Min/max ranges for `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `price_usd`, and `price_change_percentage_24h`; `created_after` / `created_before`; `dex_name` (pools); `fdv_usd_min` / `fdv_usd_max` (tokens). The `volume_7d`, `volume_30d`, and `liquidity_usd` filters now work, which they did not on the old filter endpoint.
## Migration
* Parameter renames: `volume_24h_min` becomes `volume_usd_24h_min`, `sort_by` becomes `order_by`, `sort_dir` becomes `sort`.
* Pagination is now cursor-based. Read `has_next_page` and `next_cursor` from the response and pass `next_cursor` back as `cursor`, instead of using `page`.
* Response rows are in a `results` array. Each pool row uses `id` (the pool address) and `transactions_24h`.
## Deprecated
* The legacy `/stream` price endpoint is deprecated and scheduled for removal in 2027. Migrate to `/sse/prices`. The `t_p` event is replaced by `token_price`.
**2026-06-03**
Reserves stream restructure + request_id correlation
## Changed
* **Reserves stream restructure.** The `/sse/reserves` feed no longer emits a single shared `reserve_update` event. Each subscription method now has its own event name, so you match on the method you asked for:
* `method=pool_reserves` emits a `pool_reserves` event with the full pool snapshot. That means the `tokens` array with per-token reserve and delta, plus two new fields: `timestamp` and `block_timestamp`.
* `method=token_reserves` emits a `token_reserves` event flattened to the subscribed token's reserve state in the affected pool, plus two new fields: `updated_at` and `timestamp`.
* If you were matching on `reserve_update`, stop. Switch your handler to the method-named event or you will receive nothing.
## Added
* **`request_id` correlation on streams.** Every SSE endpoint (`/sse/prices` and `/sse/reserves`, both GET and POST) now takes an optional `request_id` query parameter, and the POST body accepts it per asset. The server echoes it back on data events as an SSE `request_id:` line, which is what you want when several subscriptions share one multiplexed POST connection. It is omitted from `ping`, `warning`, and `error` events. The value has to be a non-negative integer (`0` to `4294967295`); send anything non-numeric and the request is rejected with `{"message": "invalid query parameters: request_id (must be a number)"}`. On the POST body the default is the asset's array index.
## Notes
* Stream `error` events always carry a single `{"message": "..."}` payload. That is now stated explicitly in the streaming reference.
**2026-05-15**
MCP v2.0.0
Hosted MCP server (`mcp.dexpaprika.com`) refactored end-to-end. All 17 tools now emit `structuredContent` (MCP 2025-06-18+), declare `outputSchema`, and ship with read-only/idempotent annotations so well-behaved clients stop safe-prompting every call.
## Breaking changes
* **`getTokenMultiPrices` response shape.** Previously returned a bare array of price entries; now returns an object `{ prices: [...], missing_tokens: [...] }`. Tokens that upstream cannot price (invalid address, no liquidity, unknown contract) are surfaced in `missing_tokens` rather than silently dropped.
* **Migration:** replace `response.map(...)` with `response.prices.map(...)`. Check `response.missing_tokens.length > 0` to detect partial failures.
* **`search` response `pools[].dex_id` renamed to `factory_id`.** In `search.pools[]`, upstream emits the DEX factory contract address under `dex_id`, while `getNetworkPools` emits the slug under the same key. The MCP layer now renames this to `factory_id` in search responses, matching `getPoolDetails` and `getPoolTransactions` which already use `factory_id` for this concept.
* **Migration:** if you read `search.pools[].dex_id` expecting a slug, read `dex_name` (human-readable) or look up `factory_id` against `getNetworkDexes`.
## Added
* **Network synonym resolution.** Common alternate names (`eth`, `matic`, `avax`, `bnb`, `sol`, `arb`, `op`, `pol`, `cro`, `mnt`, `ftm`, `trx`, etc.) now resolve to their canonical network IDs at the wire layer. `getCapabilities.network_synonyms` advertised these previously; now the upstream actually honors them on every endpoint that takes a `network` parameter.
* **`search` optional `limit` parameter.** Caps items returned per category (tokens, pools, dexes). Applies independently to each category: `limit=3` returns up to 3 hits in each of the 5 categories.
* **`getCapabilities.tools_count`** field exposing the canonical 17-tool count.
* **`getTokenMultiPrices.missing_tokens`** array surfacing tokens upstream could not price.
* **`getPoolOHLCV.interval`** now accepts `1m` and `10m` (in addition to existing `5m`/`15m`/`30m`/`1h`/`6h`/`12h`/`24h`).
* **Canonical alias parameters** added alongside legacy names. Both accepted; canonical is recommended for new code:
* `sort_dir` (canonical) / `sort` (legacy alias): sort direction
* `sort_by` (canonical) / `order_by` (legacy alias): sort field
* `paired_token_address` (canonical) / `address` (legacy alias): second-token filter on `getTokenPools`
* `inversed` (canonical) / `reorder` (legacy alias): pair-perspective flip on `getTokenPools` and `getPoolDetails`
* **`outputSchema`** declared on every tool. Strict-validating MCP clients (Cursor, Claude Desktop) now validate responses against documented shapes.
* **`structuredContent`** emitted on every tool result (MCP spec 2025-06-18+). Agents can consume parsed objects directly instead of re-parsing `content[0].text`.
* **Tool annotations** (`readOnlyHint`, `idempotentHint`, `destructiveHint`, `openWorldHint`) on every tool so hosts stop safe-prompting reads.
* **Server-level `instructions`** field in the MCP `initialize` response, a curated onboarding doc for agents.
## Fixed
* **`getNetworkDexes` `limit` parameter.** Upstream `/networks/{network}/dexes` silently ignored `limit` and always reported `page_info.total_items=0, total_pages=0`. The MCP layer now slices client-side to the requested limit and patches `page_info` to reflect the real total count.
* **`getTokenDetails` strict-validation rejection.** Previously failed on strict-validating MCP clients with `-32602 "data must NOT have additional properties"` when upstream returned fields beyond the declared schema. Outer `outputSchema` is now permissive (`additionalProperties: true`) while declared fields remain typed. Same fix applied across all single-item-object tools (`getTokenDetails`, `getPoolDetails`, etc.).
## Changed
* **`server.version`** bumped from `1.4.0` to `2.0.0`.
* **JSON Schema dialect on `/json-rpc`** transport upgraded from `draft-07` to `2020-12`, aligning with the underlying OpenAPI 3.1 contract. SDK-managed `/sse` and `/streamable-http` transports still emit `draft-07` (Zod v3 limitation); full 2020-12 alignment pending a future Zod v4 Mini migration.
* **Rationale boilerplate** in tool descriptions shortened from 506 to 249 characters to reduce input-token cost on every tool registration.
* **`submitFeedback`** field descriptions now document the 500-character caps on `expected` and `observed` (exceeding triggers `-32602` input validation).
## Known limitations
* `liquidity_usd` values returned by `getNetworkPoolsFilter`, `getTopTokens`, and `getTokenDetails.summary` are currently unreliable upstream: filter results may be empty and reported values may be incorrect. Upstream fix pending.
* `total_supply` decimal handling differs across endpoints (raw units in pool listings, decimal-adjusted in `getTokenDetails`). Upstream consistency pending.
* `getTopTokens` reports `fdv: 0` for some major stablecoins (USDT, DAI). Upstream data quality fix pending.
* Field naming varies across endpoints (`id` vs `address` for token references; `fdv` vs `fdv_usd`; response wrappers `pools`/`results`/`tokens`). Naming alignment is on the roadmap.
**2026-04-14**
v1.7.0
## Added
* `GET /networks/{network}/pools/{pool_address}/transactions`: new optional `from` and `to` query parameters (UNIX timestamps, int64) to filter transactions by time range.
* `from` is inclusive, `to` is exclusive. Results are always capped to the last 7 days.
* Token schema: new `telegram` and `twitter` string fields for official social links.
**2026-03-27**
v1.6.0
## Added
* New endpoint: `GET /networks/{network}/tokens/filter` for advanced token filtering. Removed since; use `GET /networks/{network}/tokens/search`.
* Filter tokens by volume (`volume_24h`, `volume_7d`, `volume_30d`), liquidity (`liquidity_usd`), FDV (`fdv_min`, `fdv_max`), transaction count (`txns_24h_min`), and creation date (`created_after`, `created_before`).
* Sort by `volume_24h`, `volume_7d`, `volume_30d`, `liquidity_usd`, `txns_24h`, `created_at`, or `fdv`.
* Paginated response with `page_info`.
* New endpoint: `GET /networks/{network}/tokens/top` for top tokens on a network. Removed since; use `GET /networks/{network}/tokens/search`.
* Ranked token list with enriched metadata and multi-timeframe metrics (24h, 1h, 5m).
* Order by `volume_24h`, `price_usd`, `liquidity_usd`, `txns`, or `price_change`.
* Each token includes buy/sell counts, volume, and price change per interval.
* New schemas: `TokenFilterResponse`, `TokenSearchResult`, `TopTokenResponse`, `TopTokenItem`, `TopTokenTimeData`.
## Changed
* `GET /networks` response schema updated from `Network` to `NetworkMetrics` with new fields: `volume_usd_24h`, `txns_24h`, `pools_count`.
* `GET /networks/{network}/dexes` response enriched with `dex_id`, `volume_usd_24h`, `txns_24h`, `pools_count` per DEX.
* `GET /networks/{network}/pools/filter`: `PoolSearchResult` now extends `PoolWithPrices` via `allOf`, adding `volume_usd_7d` and `liquidity_usd`.
* Pool filter parameters `volume_7d_min`, `liquidity_usd_min`, and `liquidity_usd_max` are now functional.
* New pool filter parameters: `volume_7d_max`, `volume_30d_max`.
## Known limitations
* `volume_30d_min` and `volume_30d_max` parameters on pool and token filter endpoints are documented but not yet functional.
**2026-03-02**
v1.5.0
## Added
* New endpoint: `GET /networks/{network}/pools/filter` for advanced pool filtering.
* Filter pools by 24h volume range (`volume_24h_min`, `volume_24h_max`), transaction count (`txns_24h_min`), and creation date (`created_after`, `created_before`).
* Sort by `volume_24h`, `volume_7d`, `volume_30d`, `liquidity`, `txns_24h`, or `created_at` with `asc`/`desc` direction.
* Paginated response with `page_info` including `total_items` and `total_pages`.
* New schemas: `PoolFilterResponse` and `PoolSearchResult`.
## Known limitations
* `volume_7d_min`, `volume_30d_min`, `liquidity_usd_min`, and `liquidity_usd_max` parameters are documented but not yet functional. These will be enabled in a future update.
**2025-10-16**
v1.4.1
## Changed
* `GET /networks/{network}/multi/prices`: requests are now limited to a maximum of 10 `tokens` per call.
* Parameter encoding updated to a single comma-separated `tokens` list (`explode=false`).
## Error handling
* Requests with more than 10 tokens return `400 Bad Request`.
* Requests with zero tokens still return `400 Bad Request` (unchanged).
## Docs
* Updated API reference, tutorial, and MCP notes to reflect the cap, edge-case behavior, and comma-separated encoding.
**2025-10-14**
v1.4.0
## Added
* New endpoint: `GET /networks/{network}/multi/prices` for batch token price retrieval on a network.
* Request: repeatable `tokens` query parameter (e.g., `?tokens=0x...&tokens=0x...`).
* Response: array of `{ id, chain, price_usd }` objects for tokens with available prices; unknown/unpriced tokens are omitted.
## Changed
* `AssetPrice` schema added and documented in OpenAPI.
* Internals: performance optimization to fetch token summaries conditionally.
## Compatibility
* Certain price-related fields now use `omitempty` semantics in responses. If you previously relied on nulls for absent values, note these keys may now be omitted when data is unavailable.
## Docs
* New API page: [Get batched token prices on a network](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network).
* Updated tutorials and references to include batch pricing guidance.
**2025-06-17**
v1.3.1
## Enhanced
* **Transaction Schema:**
* Added `token_0_symbol` and `token_1_symbol` fields to transaction objects for explicit token symbol tracking.
* Added `price_0`, `price_1`, `price_0_usd`, and `price_1_usd` fields to transaction objects for detailed price reporting.
* Added `created_at` field to transaction objects for precise transaction timestamping.
## Migration/Compatibility
* No breaking changes to existing endpoints, but clients parsing transaction objects should update their models to support the new fields for full compatibility.
### FAQs
> [accordion] How often is the API updated?
>
> We ship changes continuously. Breaking changes are called out explicitly with migration guidance.
> [accordion] Where do I find migration paths?
>
> Each breaking change section includes steps and replacement endpoints when applicable.
> [accordion] How can I stay notified?
>
> Watch this changelog and our Discord announcements; major updates are posted there.
**2025-01-27**
v1.3.0
## Deprecated
* **BREAKING**: The `/pools` endpoint has been permanently deprecated and now returns `410 Gone`
* Users should migrate to `/networks/{network}/pools` to get top pools for each specific network
## Changed
* Enhanced deprecation messaging with clear migration paths for affected endpoints
## Migration guide
Instead of using the deprecated global pools endpoint:
```
GET /pools
```
Use the network-specific pools endpoint for each blockchain:
```
GET /networks/ethereum/pools
GET /networks/solana/pools
GET /networks/fantom/pools
```
This change provides better performance and more relevant results by focusing on network-specific data.
**2025-05-12**
v1.2.1
## Added
* Introduced the optional `reorder` query parameter to the `/networks/{network}/tokens/{token_address}/pools` endpoint. This allows clients to reorder pool data so the specified token becomes the primary token for all metrics and calculations.
**2025-04-10**
v1.2.0
## Added
* Added operation IDs to all endpoints for better client code generation
* Added fully diluted valuation (`fdv`) field to token responses
* Added detailed license information and contact details in API specification
* Added `buy_usd` and `sell_usd` fields to provide monetary values for trades
* Added `last_price_usd_change` field to all time intervals (24h, 6h, 1h, 30m, 15m, 5m, 1m)
* Added organized API tags with descriptions for better navigation
## Changed
* Updated OpenAPI specification from 3.0.3 to 3.1.0 for improved documentation
* Changed [OHLCV endpoint](/api-reference/pools/get-ohlcv-data-for-a-pool-pair) response format from wrapped object to direct array of records (Breaking Change)
* Renamed `buy`/`sell` fields to `buys`/`sells` for consistency (Breaking Change)
* Changed [network](/api-reference/networks) response format from object to array for cleaner consumption
* Updated network schema with improved field naming (`display_name` instead of just `name`)
* Standardized ID field in Network schema to use string identifiers instead of numeric IDs
* Enhanced token schema with additional fields: chain, total_supply, added_at, last_updated
* Improved parameter documentation with examples and clearer descriptions
## Fixed
* Improved consistency in representing null values in responses
* Updated example responses to more accurately reflect actual API behavior
* Fixed formatting inconsistencies in API documentation
## Improved
* Enhanced OHLCV schema with time_open and time_close fields to clearly define candlestick periods
* Improved validation for time intervals and limits in OHLCV endpoint
* Added explicit error response documentation for the /stats endpoint
* Enhanced descriptions for all endpoints and parameters
**2025-03-15**
v1.1.0
## Added
* Support for buy/sell volume metrics across all time intervals
* Added transaction counts to pool details
* Added initial support for price tracking
## Changed
* Improved error messaging with more specific error codes
* Enhanced documentation with more descriptive examples
## Fixed
* Corrected timestamp format inconsistencies across endpoints
* Fixed incorrect price calculations in some edge cases
**2025-02-01**
v1.0.0
## Added
* Initial public beta release
* Support for Solana network
* Basic endpoints for [networks](/api-reference/networks), [DEXes](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network), [pools](/api-reference/pools/get-a-pool-on-a-network), and [tokens](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
* [Search functionality](/api-reference/search/search-for-tokens-pools-and-dexes) across tokens, pools, and DEXes
* OHLCV data for historical price tracking
* Transaction history for pools
**2025-01-15**
v0.9.0
## Added
* Pool and token details endpoints
* Initial version of search functionality
## Changed
* Improved error handling and response formats
* Enhanced documentation with examples
**2024-12-01**
v0.8.0
## Added
* Initial development release
* Preliminary endpoints for pools and DEXes
# Coverage
Source: https://docs.dexpaprika.com/coverage
Which blockchain networks, DEXes, liquidity pools and tokens the DexPaprika API covers, generated from the live API.
This is the canonical record of what DexPaprika covers. If you are citing our coverage anywhere,
cite this page: it is regenerated from the live API every day rather than written by hand, so it
does not drift.
> [card] 35 chains
> [card] 42M+ tokens
> [card] 46M+ pools
> [card] 251 DEXes
*Figures below were generated from the live API on 2026-11-18.*
## Networks
Every chain DexPaprika covers, ordered by 24 hour trading volume. The `network` column is the
value the API expects wherever an endpoint takes a network.
| Chain | `network` value | DEXes | Actively traded pools | 24h volume | 24h transactions |
| - | - | -: | -: | -: | -: |
| Solana | `solana` | 11 | 111,999 | \$2.36B | 31,048,735 |
| Ethereum | `ethereum` | 22 | 8,455 | \$1.62B | 311,720 |
| Binance Smart Chain | `bsc` | 13 | 21,819 | \$1.44B | 4,145,403 |
| Base | `base` | 21 | 13,314 | \$1.19B | 2,044,181 |
| Robinhood Chain | `robinhood` | 4 | 8,254 | \$569.1M | 1,386,811 |
| Arbitrum | `arbitrum` | 17 | 1,256 | \$114.0M | 204,643 |
| HyperEVM | `hyperevm` | 10 | 414 | \$85.0M | 116,954 |
| Tron | `tron` | 2 | 56 | \$49.3M | 7,644 |
| Polygon | `polygon` | 10 | 2,497 | \$41.0M | 276,722 |
| Avalanche | `avalanche` | 8 | 441 | \$33.8M | 60,345 |
| x Layer | `x_layer` | 4 | 180 | \$27.4M | 204,436 |
| Monad | `monad` | 6 | 241 | \$16.6M | 383,410 |
| Arc | `arc` | 3 | 3,329 | \$16.4M | 116,529 |
| Unichain | `unichain` | 3 | 203 | \$13.3M | 72,176 |
| Sui | `sui` | 3 | 815 | \$8.6M | 244,727 |
| Sei | `sei` | 1 | 23 | \$7.3M | 14,383 |
| Optimism | `optimism` | 7 | 859 | \$5.2M | 151,785 |
| Mantle | `mantle` | 3 | 65 | \$1.7M | 7,494 |
| Plasma | `plasma` | 6 | 29 | \$1.7M | 34,113 |
| Berachain | `berachain` | 3 | 164 | \$1.6M | 18,202 |
| Cronos | `cronos` | 2 | 691 | \$1.5M | 28,294 |
| Celo | `celo` | 4 | 96 | \$1.0M | 38,557 |
| Sonic | `sonic` | 13 | 329 | \$979K | 28,586 |
| Ronin | `ronin` | 2 | 309 | \$445K | 17,160 |
| MegaETH | `megaeth` | 3 | 23 | \$414K | 6,232 |
| Ton | `ton` | 1 | 342 | \$364K | 7,688 |
| ZkSync | `zksync` | 3 | 74 | \$328K | 2,563 |
| Katana | `katana` | 2 | 32 | \$312K | 2,579 |
| Aptos | `aptos` | 5 | 181 | \$293K | 40,399 |
| Tempo | `tempo` | 4 | 15 | \$256K | 429 |
| Linea | `linea` | 8 | 106 | \$248K | 3,025 |
| Flow EVM | `flow_evm` | 6 | 34 | \$198K | 3,623 |
| Scroll | `scroll` | 3 | 17 | \$14K | 568 |
| BOB Network | `bob_network` | 1 | 12 | \$244 | 58 |
| Fantom | `fantom` | 2 | 22 | \$0 | 92 |
## What these numbers mean
The two pool figures count different things, and both are accurate.
**46M+ pools** and **42M+ tokens** are total database coverage:
everything DexPaprika has recorded across all 35 chains.
**Actively traded pools** in the table above counts pools with recent trading activity, which is the
set pool search returns. It is a much smaller and faster moving number, because most pools ever
created stop trading. Indexing is not instantaneous, so a brand new pool reaches the database before
it appears in the active set.
Which one you want depends on the question. For "how much of the DEX market does this cover", use the
totals. For "how many pools can I query on Base right now", use the table.
The DEX columns differ for a similar reason. **251 DEXes** counts every DEX recognised
across all chains, while the table lists the 216 currently
returned by the per-chain DEXes endpoint.
## Check a specific asset
The numbers above answer "how much does DexPaprika cover". To answer "do you have this particular
token or pool", use the [coverage checker](/tools/coverage-checker), which searches the live dataset
by contract address, name or symbol.
## Get these figures yourself
Both endpoints answer keyless requests, so you can run these now and [register a free key](https://console.dexpaprika.com) later for a bigger allowance.
```bash theme={null}
# Platform totals
curl "https://api.dexpaprika.com/stats"
# Every network, with its API value and pool count
curl "https://api.dexpaprika.com/networks"
# DEXes on one network
curl "https://api.dexpaprika.com/networks/ethereum/dexes"
```
Polling `/stats` is also a reasonable liveness check: it costs one credit and reflects the latest successful
aggregation.
## Requesting a chain
If a network you need is missing, tell us at [support@coinpaprika.com](mailto:support@coinpaprika.com)
or in [Discord](https://discord.gg/DhJge5TUGM). Volume and the availability of a reliable node are
what usually decide the order we add chains in, so it helps to say what you are building.
# DexPaprika DEX API Go SDK: on-chain liquidity and swap data client
Source: https://docs.dexpaprika.com/get-started/sdk-go
The official Go client library for the DexPaprika API, providing easy access to decentralized exchange data across multiple blockchain networks
> [!TIP]
>
> See also: [REST intro](/api-reference/introduction),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pools](/api-reference/pools/get-a-pool-on-a-network)
## Installation
```bash theme={null}
go get github.com/coinpaprika/dexpaprika-sdk-go
```
## Prerequisites
* Go 1.24 or higher
* Connection to the internet to access the DexPaprika API
* No API key needed to start
## Quick example: get token price
```go theme={null}
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
func main() {
// Create client
client := dexpaprika.NewClient()
// Create context with timeout
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
// Get WETH token details on Ethereum
token, err := client.Tokens.GetDetails(ctx, "ethereum", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2")
if err != nil {
log.Fatalf("Error getting token details: %v", err)
}
if token.Summary != nil {
fmt.Printf("%s: $%.2f\n", token.Name, token.Summary.PriceUSD)
}
// Output: Wrapped Ether: $3245.67
}
```
## Using an API key (optional)
The SDK works without a key, and that is the default. A [free key](https://console.dexpaprika.com)
raises both the per-minute request limit and the credit allowance. Current figures are on the [rate limits page](/knowledge-base/rate-limits).
Requires v1.8.0 or later.
```go theme={null}
// Explicit
client := dexpaprika.NewClient(dexpaprika.WithAPIKey("api_your_key_here"))
// Or leave it out and set DEXPAPRIKA_API_KEY in the environment
client := dexpaprika.NewClient()
```
An explicit key beats the environment variable, and no key at all keeps the keyless behaviour
unchanged. The host is never inferred from the key: free keys are served from the default base URL,
and [Dev, Pro and Enterprise](/api-pro/introduction) keys move to `api-pro.dexpaprika.com`.
> [!WARNING]
>
> The key is sent as the entire `Authorization` header value. **Nothing goes in front of it**,
> no scheme word of any kind. The SDK writes the header for you, so this matters when you are
> debugging what went out or calling the API directly. See
> [401 Unauthorized](/knowledge-base/error-handling#401-unauthorized).
## API methods reference
> [!NOTE]
>
> Parameters marked with an asterisk (\*) are required.
**Networks** `category`
**methods**
### client.Networks.List(ctx)
**Endpoint:** [GET `/networks`](/api-reference/networks/get-a-list-of-available-blockchain-networks)
Gets all supported blockchain networks including Ethereum, Solana, etc.
**Parameters:**
* `ctx`\* - Context for API request
**Returns:** Network IDs, names, and related information. [Response Structure](/api-reference/networks/get-a-list-of-available-blockchain-networks).
```go theme={null}
networks, err := client.Networks.List(ctx)
```
**DEXes** `category`
**methods**
### client.Networks.ListDexes(ctx, networkId, page, limit)
**Endpoint:** [GET `/networks/{network}/dexes`](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network)
Gets all DEXes on a specific network.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network (e.g., 'ethereum', 'solana')
* `page` - Page number for pagination (0 leaves it to the API default)
* `limit` - Number of results per page (0 leaves it to the API default)
**Returns:** DEX IDs, names, pool counts, and volume information. [Response Structure](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network).
```go theme={null}
dexes, err := client.Networks.ListDexes(ctx, "ethereum", 0, 10)
```
**Pools** `category`
**methods**
### client.Pools.List(ctx, options)
> [!WARNING]
>
> **The `GET /pools` endpoint was removed and returns `410 Gone`.** Whatever this
> method does locally, the request cannot succeed. Use the network-scoped method
> below and pass a network, or call `GET /pools/search` with a `chains` filter
> directly. See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** GET `/pools` (removed, `410 Gone`)
Gets top pools across all networks with pagination.
**Parameters:**
* `ctx`\* - Context for API request
* `options` - ListOptions containing pagination and sorting parameters:
* `Page` - Page number for pagination (starts at 0)
* `Limit` - Number of results per page
* `Sort` - Sort direction ('asc' or 'desc')
* `OrderBy` - Field to sort by ('volume_usd', 'liquidity_usd', etc.)
***
### client.Pools.ListByNetwork(ctx, networkId, options)
**Endpoint:** [GET `/networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific network with pagination and sorting options.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `options` - `ListOptions`. The endpoint is cursor-paginated, so page forward with `Cursor` taken from the previous response's `NextCursor` (paging needs an API key; a free key is enough); `Page` is not sent. Legacy sort values are mapped, so `OrderBy: "volume_usd"` is sent as `order_by=volume_usd_24h`, and REST rejects the legacy spelling with `400`
**Returns:** Cursor-paginated pools for the given network: a `results` array plus `has_next_page` and `next_cursor`. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```go theme={null}
options := &dexpaprika.ListOptions{
Limit: 5,
OrderBy: "volume_usd_24h",
Sort: "desc",
}
pools, err := client.Pools.ListByNetwork(ctx, "ethereum", options)
```
***
### client.Pools.ListByDex(ctx, networkId, dexId, options)
> [!WARNING]
>
> **`GET /networks/{network}/dexes/{dex}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?dex_name=...` instead. The DEX id
> moved out of the path and into a filter, so `Page` is gone and the response shape changed.
> See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?dex_name=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific DEX within a network.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `dexId`\* - ID of the DEX, the `dex_id` field from `client.Networks.ListDexes`, case-insensitive (a display name like `Uniswap V3` returns no rows instead of an error)
* `options` - ListOptions containing `Limit`, `OrderBy`, `Sort`, and `Cursor`
> [!NOTE]
>
> `ListOptions.Page` is not sent for this call any more. Page through with `Cursor`, taking the
> value from `NextCursor` on the previous response. The SDK normalizes legacy sort values, so
> `volume_usd` goes out as `order_by=volume_usd_24h`; REST rejects the legacy spelling with a
> `400` that lists the values it will take.
**Returns:** Cursor-paginated pools for the given DEX: a `results` array plus `has_next_page` and `next_cursor`. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```go theme={null}
options := &dexpaprika.ListOptions{
Limit: 10,
OrderBy: "volume_usd_24h",
Sort: "desc",
}
pools, err := client.Pools.ListByDex(ctx, "ethereum", "uniswap_v3", options)
```
***
### client.Pools.GetDetails(ctx, networkId, poolAddress, inversed)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}`](/api-reference/pools/get-a-pool-on-a-network)
Gets detailed information about a specific pool.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Detailed pool information including tokens, volumes, liquidity, and more. [Response Structure](/api-reference/pools/get-a-pool-on-a-network).
```go theme={null}
poolDetails, err := client.Pools.GetDetails(ctx, "ethereum", "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc", false)
```
***
### client.Pools.GetTransactions(ctx, networkId, poolAddress, page, limit, cursor, opts...)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/transactions`](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
Gets transaction history for a specific pool with pagination.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL since 30 September 2026; keyless and free keys get `403`. See [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `page`, `limit` - Pagination
* `cursor` - Transaction ID for cursor-based pagination, or `""`
* `opts` - Optional time window: `dexpaprika.WithFrom("-1h")` and `dexpaprika.WithTo(...)` take a relative offset, Unix seconds, RFC3339 or `YYYY-MM-DD` (1.10.0 and later); `WithFromTimestamp` and `WithToTimestamp` take Unix seconds. `from` is inclusive, `to` exclusive; results go back 7 days at most
**Returns:** List of transactions with details about tokens, amounts, and timestamps. [Response Structure](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
```go theme={null}
// Latest 20 transactions
transactions, err := client.Pools.GetTransactions(ctx, "ethereum", "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc", 0, 20, "")
// Only the last hour
lastHour, err := client.Pools.GetTransactions(ctx, "ethereum", "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc", 0, 20, "",
dexpaprika.WithFrom("-1h"))
```
***
### client.Pools.GetOHLCV(ctx, networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/ohlcv`](/api-reference/pools/get-ohlcv-data-for-a-pool-pair)
Gets OHLCV (Open, High, Low, Close, Volume) chart data for a pool.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options` - OHLCVOptions containing:
* `Start`\* - Start time as a string (a relative offset such as `-24h`, RFC 3339, `YYYY-MM-DD` or Unix seconds), inside your plan's [history window](/knowledge-base/rate-limits#ohlcv-limits-by-plan)
* `End` - End time (optional)
* `Limit` - Number of data points to return
* `Interval` - Time interval ('1h', '6h', '24h', etc.; finer intervals need a key or a paid plan)
* `Inversed` - Whether to invert the price ratio (boolean)
**Returns:** Array of OHLCV data points for the specified time range and interval. [Response Structure](/api-reference/pools/get-ohlcv-data-for-a-pool-pair).
```go theme={null}
// Hourly candles for the last 24 hours, which works without a key
options := &dexpaprika.OHLCVOptions{
Start: "-24h",
Limit: 24,
Interval: "1h",
Inversed: false,
}
ohlcv, err := client.Pools.GetOHLCV(ctx, "ethereum", "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc", options)
```
***
### client.Pools.GetIndicator(ctx, networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/indicators`](/api-reference/pools/get-a-technical-indicator-for-a-pool)
Computes RSI, EMA, MACD, Bollinger Bands or VWAP from a pool's candles. Requires SDK v1.12.0 or later.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options`\* - IndicatorOptions containing:
* `Indicator`\* - `dexpaprika.IndicatorRSI`, `IndicatorEMA`, `IndicatorMACD`, `IndicatorBBands` or `IndicatorVWAP`
* `Interval` - Candle interval (`"1m"` to `"24h"`, or `"1d"`); pass it every time
* `Start`, `End`, `Limit`, `Cursor` - Range and paging, same formats as OHLCV
* `Period` - rsi, ema, bbands and vwap
* `FastPeriod`, `SlowPeriod`, `SignalPeriod` - macd only
* `StdDev` - bbands only
Only the fields you set are sent. A parameter that belongs to another indicator, such as `FastPeriod` with rsi, returns a 400 whose `APIError.Param` names it.
**Returns:** `*IndicatorResponse`. `Data` is oldest first, one `IndicatorDataPoint` per completed candle with `Value` for rsi, ema and vwap; `MACD`, `Signal` and `Histogram` for macd; `Upper`, `Middle` and `Lower` for bbands (all pointers). `Parameters` echoes the settings used, and `HasNextPage`/`NextCursor` page through longer ranges. [Response Structure](/api-reference/pools/get-a-technical-indicator-for-a-pool).
Works on every plan, keyless included, with the same interval and history limits as pool OHLCV ([limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). Tutorial: [technical indicators](/tutorials/technical-indicators).
```go theme={null}
// Hourly RSI over the last 24 hours, which works without a key
rsi, err := client.Pools.GetIndicator(ctx, "ethereum", "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", &dexpaprika.IndicatorOptions{
Indicator: dexpaprika.IndicatorRSI,
Interval: "1h",
Start: "-24h",
})
if err != nil {
log.Fatal(err)
}
last := rsi.Data[len(rsi.Data)-1]
fmt.Printf("RSI %.1f at %s\n", *last.Value, last.Timestamp)
```
**Tokens** `category`
**methods**
### client.Tokens.GetDetails(ctx, networkId, tokenAddress)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}`](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
Gets comprehensive token information.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token contract address
**Returns:** Token details including price, market cap, volume, and metadata. [Response Structure](/api-reference/tokens/get-a-tokens-latest-data-on-a-network).
```go theme={null}
token, err := client.Tokens.GetDetails(ctx, "ethereum", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2")
```
***
### client.Tokens.GetPools(ctx, networkId, tokenAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/search?token_address=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools containing a specific token.
**Parameters:**
* `ctx`\* - Context for API request
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token contract address
* `options` - `*TokenPoolsOptions`, which embeds `*ListOptions` for `Limit`, `Sort`, `OrderBy` and `Cursor`. `Page` is not sent upstream: the endpoint is cursor-paginated, so page forward with `Cursor` taken from the previous response's `NextCursor` (paging needs an API key; a free key is enough)
* `options.AdditionalTokenAddress` - deprecated and no longer sent. `GET /networks/{network}/pools/search` accepts one `token_address` only. Repeating it does not filter for the pair, and from 23 November 2026 it answers `400` (`repeated_param`). Filter `results[].tokens` yourself if you need a specific pair
* `options.Reorder` - deprecated and no longer sent; the search endpoint has no equivalent
> [!NOTE]
>
> The SDK normalizes legacy sort values before they go on the wire, so `OrderBy: "volume_usd"` is sent as `order_by=volume_usd_24h`. REST rejects the legacy spelling with `400`, so use the canonical value when you call the API directly.
**Returns:** List of pools where the queried token is found. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```go theme={null}
options := &dexpaprika.TokenPoolsOptions{
ListOptions: &dexpaprika.ListOptions{
Limit: 10,
OrderBy: "volume_usd_24h",
Sort: "desc",
},
}
// Get the busiest WETH pools on Ethereum
pools, err := client.Tokens.GetPools(
ctx,
"ethereum",
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // WETH
options,
)
```
***
### client.Tokens.GetIndicator(ctx, networkId, tokenAddress, options)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}/indicators`](/api-reference/tokens/get-a-technical-indicator-for-a-token)
The same indicators computed from the token's USD candles across every pool it trades in. Same `IndicatorOptions` and response shape as `client.Pools.GetIndicator`, with `TokenAddress` set instead of `PoolAddress`. Requires SDK v1.12.0 or later.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL; keyless and free keys get `403`, which matches `errors.Is(err, dexpaprika.ErrForbidden)`, with `APIError.RequiredTier` naming the plan.
```go theme={null}
macd, err := client.Tokens.GetIndicator(ctx, "ethereum", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", &dexpaprika.IndicatorOptions{
Indicator: dexpaprika.IndicatorMACD,
Interval: "1h",
Start: "-7d",
})
```
**Search** `category`
**methods**
### client.Search.Search(ctx, query)
**Endpoint:** [GET `/search`](/api-reference/search/search-for-tokens-pools-and-dexes)
Searches across tokens, pools, and DEXes using a query string.
**Parameters:**
* `ctx`\* - Context for API request
* `query`\* - Search query string
**Returns:** Matching entities from all categories (tokens, pools, DEXes). [Response Structure](/api-reference/search/search-for-tokens-pools-and-dexes).
```go theme={null}
results, err := client.Search.Search(ctx, "ethereum")
```
**Utils** `category`
**methods**
### client.Utils.GetStats(ctx)
**Endpoint:** [GET `/stats`](/api-reference/utils/retrieve-high-level-asset-statistics)
Gets platform-wide statistics.
**Parameters:**
* `ctx`\* - Context for API request
**Returns:** Counts of chains, DEXes, pools, and tokens indexed. [Response Structure](/api-reference/utils/retrieve-high-level-asset-statistics).
```go theme={null}
stats, err := client.Utils.GetStats(ctx)
```
## Complete example
**example**
```go theme={null}
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
const (
weth = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
usdc = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
)
func main() {
client := dexpaprika.NewClient()
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
// Networks come back as a slice of Network{ID, DisplayName}
networks, err := client.Networks.List(ctx)
if err != nil {
log.Fatalf("Error fetching networks: %v", err)
}
for _, network := range networks {
if network.ID == "ethereum" {
fmt.Printf("%s is one of %d networks\n", network.DisplayName, len(networks))
}
}
// Price lives under Summary
token, err := client.Tokens.GetDetails(ctx, "ethereum", weth)
if err != nil {
log.Fatalf("Error fetching token details: %v", err)
}
fmt.Printf("%s price: $%.2f\n", token.Name, token.Summary.PriceUSD)
// Pools for a token are served by pool search. The SDK copies the rows
// into Pools and fills VolumeUSD from volume_usd_24h. There is no pair
// filter, so match the second token client-side.
pools, err := client.Tokens.GetPools(ctx, "ethereum", weth, &dexpaprika.TokenPoolsOptions{
ListOptions: &dexpaprika.ListOptions{Limit: 20, OrderBy: "volume_usd_24h", Sort: "desc"},
})
if err != nil {
log.Fatalf("Error fetching pools: %v", err)
}
fmt.Println("Top WETH/USDC pools:")
shown := 0
for _, pool := range pools.Pools {
for _, t := range pool.Tokens {
if t.ID == usdc && shown < 5 {
fmt.Printf("%s: $%.2f 24h volume\n", pool.DexName, pool.VolumeUSD)
shown++
}
}
}
}
```
## Advanced features
### Error handling
**error handling**
```go theme={null}
import (
"context"
"errors"
"fmt"
"log"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
func handleAPIErrors() {
client := dexpaprika.NewClient()
ctx := context.Background()
// Attempt to get a token with an invalid address
_, err := client.Tokens.GetDetails(ctx, "ethereum", "0xinvalidaddress")
if err != nil {
// Check for specific error types
var apiErr *dexpaprika.APIError
if errors.As(err, &apiErr) {
switch apiErr.StatusCode {
case 404:
fmt.Println("Token not found")
case 429:
fmt.Println("Rate limit exceeded, retry after a delay")
case 500:
fmt.Println("Server error, retry may succeed")
default:
fmt.Printf("API error: %s\n", apiErr.Message)
}
} else {
// Handle non-API errors (like network issues)
fmt.Printf("Non-API error: %v\n", err)
}
// Check if error is retryable
if dexpaprika.IsRetryable(err) {
fmt.Println("This error is retryable")
}
}
}
```
### Caching
**caching**
```go theme={null}
import (
"context"
"fmt"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
func useCaching() {
// Create a regular client
client := dexpaprika.NewClient()
// Create a cached client with 5-minute TTL
cachedClient := dexpaprika.NewCachedClient(client, nil, 5*time.Minute)
// Create context
ctx := context.Background()
// First call - hits the API
startTime := time.Now()
networks, err := cachedClient.GetNetworks(ctx)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Printf("First call (API): %d networks, took %v\n", len(networks), time.Since(startTime))
// Second call - served from cache (much faster)
startTime = time.Now()
networks, err = cachedClient.GetNetworks(ctx)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Printf("Second call (cached): %d networks, took %v\n", len(networks), time.Since(startTime))
}
```
### Pagination helpers
Paging past the first page of a search endpoint needs an API key. `NewClient()` reads it from `DEXPAPRIKA_API_KEY`; a [free key](https://console.dexpaprika.com) pages without limit. Without a key the second page returns `403` with `"param": "cursor"`. `dexpaprika.IsKeyRequiredForPaging(err)` detects that case.
**pagination**
```go theme={null}
import (
"context"
"fmt"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
func usePagination() {
client := dexpaprika.NewClient()
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
// Create a paginator for Ethereum pools with 50 items per page
options := &dexpaprika.ListOptions{
Limit: 50,
OrderBy: "volume_usd_24h",
Sort: "desc",
}
paginator := dexpaprika.NewPoolsPaginator(client, options).ForNetwork("ethereum")
// Count total pools processed
totalPools := 0
// Process first 3 pages (or fewer if there aren't that many)
for i := 0; i < 3 && paginator.HasNextPage(); i++ {
// Get next page of results
if err := paginator.GetNextPage(ctx); err != nil {
fmt.Printf("Error getting page: %v\n", err)
break
}
// Process current page
pools := paginator.GetCurrentPage()
totalPools += len(pools)
// Process first few pools in each page
fmt.Printf("=== Page %d ===\n", i+1)
for j, pool := range pools {
if j >= 3 {
fmt.Printf("...and %d more pools\n", len(pools)-3)
break
}
var vol float64
if pool.VolumeUSD24h != nil {
vol = *pool.VolumeUSD24h
}
fmt.Printf("%s: $%.2f 24h volume\n", pool.DexName, vol)
}
}
fmt.Printf("Processed %d pools total\n", totalPools)
}
```
### Custom configuration
**configuration**
```go theme={null}
import (
"net/http"
"time"
"github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)
func configureClient() *dexpaprika.Client {
// Create a client with custom configuration
client := dexpaprika.NewClient(
// Custom HTTP client with longer timeout
dexpaprika.WithHTTPClient(&http.Client{
Timeout: 60 * time.Second,
}),
// Custom retry configuration (5 retries with backoff)
dexpaprika.WithRetryConfig(5, 2*time.Second, 30*time.Second),
// Rate limiting to 3 requests per second
dexpaprika.WithRateLimit(3.0),
// Custom user agent
dexpaprika.WithUserAgent("MyApp/1.0 DexPaprikaClient"),
)
return client
}
```
## Resources
* [GitHub Repository](https://github.com/coinpaprika/dexpaprika-sdk-go)
* [DexPaprika Website](https://dexpaprika.com)
* [API Reference](/api-reference/introduction)
## API status
The DexPaprika API provides consistent data with stable endpoints. Requests are answered without an API key on the free tier, and a free key raises the credit allowance. We aim to maintain backward compatibility and provide notice of any significant changes.
### FAQs
> [accordion] Do I need an API key with this SDK?
>
> Not to start. Keyless requests work at 10,000 credits per rolling 30 days per IP, and a [free registered key](https://console.dexpaprika.com/dashboard) raises that to 100,000 with no card.
> [accordion] How do I find identifiers?
>
> Use Coverage Checker or list Networks and query Tokens/Pools to discover addresses.
> [accordion] How do I get historical or transactions data?
>
> Use pools/transactions endpoints with `pool_address`, `network`, and time/paging params as documented. Transactions need a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`.
> [accordion] What about rate limiting?
>
> 15 requests a minute keyless, 30 with a [free key](https://console.dexpaprika.com) and 500 on Pro, against 10,000 credits keyless and 100,000 with a free key over a rolling 30 days, or 5,000,000 a month on Pro. Retry transient HTTP errors with backoff. See [rate limits](/knowledge-base/rate-limits) for how the counters work, and [Pro pricing](https://dexpaprika.com/api/pricing) for what the 5,000,000 credit tier costs.
# DexPaprika DEX API PHP SDK: on-chain liquidity and swap data client
Source: https://docs.dexpaprika.com/get-started/sdk-php
The official PHP client library for the DexPaprika API, providing easy access to decentralized exchange data across multiple blockchain networks
> [!TIP]
>
> See also: [REST intro](/api-reference/introduction),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pools](/api-reference/pools/get-a-pool-on-a-network)
## Installation
```bash theme={null}
# Using Composer
composer require coinpaprika/dexpaprika-sdk
# From source
git clone https://github.com/coinpaprika/dexpaprika-sdk-php
cd dexpaprika-sdk-php
composer install
```
## Prerequisites
* PHP 7.4 or higher
* [Composer](https://getcomposer.org/)
* `ext-json` PHP extension
* Connection to the internet to access the DexPaprika API
* No API key needed to start
## PHP SDK quickstart
```php theme={null}
tokens->getTokenDetails('ethereum', '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2');
echo "{$weth['name']}: \${$weth['summary']['price_usd']}";
// Output: Wrapped Ether: $3245.67
```
## Using an API key (optional)
The SDK works without a key, and that is the default. A [free key](https://console.dexpaprika.com)
raises both the per-minute request limit and the credit allowance. Current figures are on the [rate limits page](/knowledge-base/rate-limits).
Requires v1.8.0 or later.
```php theme={null}
use DexPaprika\Client;
use DexPaprika\Config;
// Explicit
$config = (new Config())->setApiKey('api_your_key_here');
$client = new Client(null, null, false, $config);
// Or leave it out and set DEXPAPRIKA_API_KEY in the environment
$client = new Client();
```
An explicit key beats the environment variable, and no key at all keeps the keyless behaviour
unchanged. The host is never inferred from the key: free keys are served from the default base URL,
and [Dev, Pro and Enterprise](/api-pro/introduction) keys move to `api-pro.dexpaprika.com`.
> [!WARNING]
>
> The key is sent as the entire `Authorization` header value. **Nothing goes in front of it**,
> no scheme word of any kind. The SDK writes the header for you, so this matters when you are
> debugging what went out or calling the API directly. See
> [401 Unauthorized](/knowledge-base/error-handling#401-unauthorized).
## API methods reference
> [!NOTE]
>
> Parameters marked with an asterisk (\*) are required.
**Networks** `category`
**methods**
### client->networks->getNetworks()
**Endpoint:** [GET `/networks`](/api-reference/networks/get-a-list-of-available-blockchain-networks)
Gets all supported blockchain networks including Ethereum, Solana, etc.
**Parameters:** None
**Returns:** Network IDs, names, and related information. [Response Structure](/api-reference/networks/get-a-list-of-available-blockchain-networks).
```php theme={null}
// Get all networks
$networks = $client->networks->getNetworks();
echo "Found " . count($networks) . " networks";
```
### Finding a network by id
`getNetworks()` returns a plain list of networks, so look one up by its `id`.
```php theme={null}
// Find Ethereum in the network list
foreach ($client->networks->getNetworks() as $network) {
if ($network['id'] === 'ethereum') {
echo "Found network: {$network['display_name']}";
}
}
```
**DEXes** `category`
**methods**
### client->dexes->getNetworkDexes(networkId, options)
**Endpoint:** [GET `/networks/{network}/dexes`](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network)
Gets all DEXes on a specific network.
**Parameters:**
* `networkId`\* - ID of the network (e.g., 'ethereum', 'solana')
* `options` - Additional options:
* `page` - Page number for pagination (starts at 0)
* `limit` - Number of results per page
**Returns:** DEX IDs, names, pool counts, and volume information. [Response Structure](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network).
```php theme={null}
// Get all DEXes on Ethereum
$dexes = $client->dexes->getNetworkDexes('ethereum');
echo "Found " . count($dexes['dexes']) . " DEXes on Ethereum";
```
### Finding a DEX by id
Match on `dex_id`, the value `getDexPools` expects. `dex_name` is the display name.
```php theme={null}
// Find Uniswap V3 on Ethereum
$dexes = $client->dexes->getNetworkDexes('ethereum');
foreach ($dexes['dexes'] as $dex) {
if ($dex['dex_id'] === 'uniswap_v3') {
echo "Found DEX: {$dex['dex_name']}";
}
}
```
**Pools** `category`
**methods**
### client->pools->getTopPools(options)
> [!WARNING]
>
> **The `GET /pools` endpoint was removed and returns `410 Gone`.** Whatever this
> method does locally, the request cannot succeed. Use the network-scoped method
> below and pass a network, or call `GET /pools/search` with a `chains` filter
> directly. See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** GET `/pools` (removed, `410 Gone`)
Gets top pools across all networks with pagination.
**Parameters:**
* `options` - Additional options:
* `page` - Page number for pagination (starts at 0)
* `limit` - Number of results per page
* `orderBy` - Field to sort by ('volume_usd', 'liquidity_usd', etc.)
* `sort` - Sort direction ('asc' or 'desc')
### client->pools->getNetworkPools(networkId, options)
**Endpoint:** [GET `/networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific network with pagination and sorting options.
**Parameters:**
* `networkId`\* - ID of the network
* `options` - Additional options:
* `limit` - Number of results per page
* `orderBy` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list). Legacy values are mapped, so `volume_usd` is sent as `order_by=volume_usd_24h`, and REST rejects the legacy spelling with `400`
* `sort` - Sort direction ('asc' or 'desc')
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough). There is no `page` option: the endpoint is cursor-paginated
**Returns:** Cursor-paginated pools for the given network: a `results` array plus `has_next_page` and `next_cursor`. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```php theme={null}
// Get top 5 pools on Ethereum by volume
$pools = $client->pools->getNetworkPools('ethereum', [
'limit' => 5,
'orderBy' => 'volume_usd_24h',
'sort' => 'desc'
]);
echo "Found " . count($pools['results']) . " pools on Ethereum";
```
### client->dexes->getDexPools(networkId, dexId, options)
> [!WARNING]
>
> **`GET /networks/{network}/dexes/{dex}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?dex_name=...` instead. The DEX id
> moved out of the path and into a filter, so `page` is gone and the response shape changed.
> See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?dex_name=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific DEX within a network.
**Parameters:**
* `networkId`\* - ID of the network
* `dexId`\* - ID of the DEX, the `dex_id` field from `getNetworkDexes`, case-insensitive (a display name like `Uniswap V3` returns no rows instead of an error)
* `options` - Additional options:
* `limit` - Number of results per page (max 100)
* `orderBy` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list)
* `sort` - Sort direction ('asc' or 'desc')
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
> [!NOTE]
>
> There is no `page` option any more. The SDK normalizes legacy sort values, so `volume_usd` is
> sent as `order_by=volume_usd_24h`; REST rejects the legacy spelling with a `400` that lists the
> values it will take.
**Returns:** A `results` array plus `has_next_page` and `next_cursor` for cursor pagination. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```php theme={null}
// Get the busiest Uniswap V3 pools on Ethereum
$uniswapPools = $client->dexes->getDexPools('ethereum', 'uniswap_v3', [
'limit' => 10,
'orderBy' => 'volume_usd_24h',
'sort' => 'desc'
]);
foreach ($uniswapPools['results'] as $pool) {
echo "{$pool['dex_name']}: $" . number_format($pool['volume_usd_24h'], 2) . " 24h volume\n";
}
```
### client->pools->getPoolDetails(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}`](/api-reference/pools/get-a-pool-on-a-network)
Gets detailed information about a specific pool.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options` - Additional options:
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Detailed pool information including tokens, volumes, liquidity, and more. [Response Structure](/api-reference/pools/get-a-pool-on-a-network).
```php theme={null}
// Get details for a specific pool (WETH/USDC on Uniswap V2)
$pool = $client->pools->getPoolDetails(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
['inversed' => false]
);
echo "Pool: {$pool['tokens'][0]['symbol']}/{$pool['tokens'][1]['symbol']}";
```
### client->pools->getPoolTransactions(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/transactions`](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
Gets transaction history for a specific pool with pagination.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL since 30 September 2026; keyless and free keys get `403`. See [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options` - Additional options:
* `page` - Page number for pagination
* `limit` - Number of transactions per page
* `cursor` - Transaction ID used for cursor-based pagination
* `from` / `to` - Time window: a relative offset such as `'-1h'`, Unix seconds, RFC3339 or `YYYY-MM-DD`. `from` is inclusive, `to` exclusive; results go back 7 days at most. Needs 1.10.0 or later: earlier releases did not send these two options
**Returns:** List of transactions with details about tokens, amounts, and timestamps. [Response Structure](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
```php theme={null}
// Get the latest 20 transactions for a pool
$transactions = $client->pools->getPoolTransactions(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
['limit' => 20]
);
$latest = $transactions['transactions'][0];
echo "Latest transaction: {$latest['id']} at {$latest['created_at']}";
// Only the last hour
$lastHour = $client->pools->getPoolTransactions(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
['limit' => 20, 'from' => '-1h']
);
```
### client->pools->getPoolOHLCV(networkId, poolAddress, start, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/ohlcv`](/api-reference/pools/get-ohlcv-data-for-a-pool-pair)
Gets OHLCV (Open, High, Low, Close, Volume) chart data for a pool.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `start`\* - Start time (relative offset such as `-24h`, ISO date string, YYYY-MM-DD, or Unix timestamp), inside your plan's [history window](/knowledge-base/rate-limits#ohlcv-limits-by-plan)
* `options` - Additional options:
* `end` - End time (optional)
* `limit` - Number of data points to return
* `interval` - Time interval ('1m', '5m', '10m', '15m', '30m', '1h', '6h', '12h', '24h'); without a key only '1h' and up
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Array of OHLCV data points for the specified time range and interval. [Response Structure](/api-reference/pools/get-ohlcv-data-for-a-pool-pair).
```php theme={null}
// Hourly candles for the last 24 hours, which works without a key
$ohlcv = $client->pools->getPoolOHLCV(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
'-24h',
[
'interval' => '1h',
'limit' => 24
]
);
echo "Received " . count($ohlcv) . " OHLCV data points";
```
***
### client->pools->getPoolIndicator(networkId, poolAddress, indicator, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/indicators`](/api-reference/pools/get-a-technical-indicator-for-a-pool)
Computes RSI, EMA, MACD, Bollinger Bands or VWAP from a pool's candles. Requires SDK 1.12.0 or later.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `indicator`\* - `'rsi'`, `'ema'`, `'macd'`, `'bbands'` or `'vwap'`
* `options` - Additional options:
* `interval` - Candle interval (`'1m'` to `'24h'`, or `'1d'`); pass it every time
* `start`, `end`, `limit`, `cursor` - Range and paging, same formats as OHLCV
* `period` - rsi, ema, bbands and vwap
* `fast_period`, `slow_period`, `signal_period` - macd only
* `std_dev` - bbands only
Set only the options the chosen indicator uses: one that belongs to another indicator is refused by the API with a 400.
**Returns:** `data`, oldest first, one point per completed candle: `value` for rsi, ema and vwap; `macd`, `signal` and `histogram` for macd; `upper`, `middle` and `lower` for bbands. `parameters` echoes the settings used, defaults included, and `has_next_page`/`next_cursor` page through longer ranges. [Response Structure](/api-reference/pools/get-a-technical-indicator-for-a-pool).
Works on every plan, keyless included, with the same interval and history limits as pool OHLCV ([limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). Tutorial: [technical indicators](/tutorials/technical-indicators).
```php theme={null}
// Hourly RSI over the last 24 hours, which works without a key
$rsi = $client->pools->getPoolIndicator(
'ethereum',
'0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
'rsi',
['interval' => '1h', 'start' => '-24h']
);
$last = end($rsi['data']);
echo "RSI {$last['value']} at {$last['timestamp']}";
```
**Tokens** `category`
**methods**
### client->tokens->getTokenDetails(networkId, tokenAddress)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}`](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
Gets comprehensive token information.
**Parameters:**
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token contract address
**Returns:** Token details including price, market cap, volume, and metadata. [Response Structure](/api-reference/tokens/get-a-tokens-latest-data-on-a-network).
```php theme={null}
// Get WETH token details
$weth = $client->tokens->getTokenDetails(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
);
echo "{$weth['name']} price: \${$weth['summary']['price_usd']}";
```
### client->tokens->getTokenPools(networkId, tokenAddress, options)
> [!WARNING]
>
> **`GET /networks/{network}/tokens/{token_address}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?token_address=...` instead. The old
> second-token `address` pair filter and the `reorder` flag have no replacement and are not sent.
> See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?token_address=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools containing a specific token.
**Parameters:**
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token contract address
* `options` - Additional options:
* `limit` - Number of results per page (max 100)
* `sort` - Sort direction ('asc' or 'desc')
* `orderBy` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list)
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
> [!NOTE]
>
> There is no `page` option and no second-token `address` option. The endpoint is cursor-paginated,
> and `GET /networks/{network}/pools/search` has no pair filter, so anything you pass under those
> names is dropped before the request goes out. Filter `results[].tokens` yourself to match a pair.
> The SDK also normalizes legacy sort values, so `volume_usd` is sent as `order_by=volume_usd_24h`;
> REST rejects the legacy spelling with `400`.
**Returns:** A `results` array plus `has_next_page` and `next_cursor` for cursor pagination. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```php theme={null}
// Get the busiest WETH pools on Ethereum
$pools = $client->tokens->getTokenPools(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
[
'limit' => 5,
'orderBy' => 'volume_usd_24h',
'sort' => 'desc'
]
);
foreach ($pools['results'] as $pool) {
echo "{$pool['dex_name']}: $" . number_format($pool['volume_usd_24h'], 2) . " 24h volume\n";
}
```
### client->tokens->findToken(networkId, tokenAddress)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}`](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
Same call as `getTokenDetails`, wrapped so a missing token raises
`NotFoundException` instead of handing you an empty payload to check.
**Parameters:**
* `networkId`\* - ID of the network
* `tokenAddress`\* - Contract address of the token
* `asObject` - Return an object instead of an array (default: `false`)
**Returns:** Token details, the same shape as `getTokenDetails`.
```php theme={null}
// Find WETH by its contract address
try {
$token = $client->tokens->findToken(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
);
echo "Found {$token['name']} at {$token['id']}";
} catch (DexPaprika\Exception\NotFoundException $e) {
echo "Token not found";
}
```
***
### client->tokens->getTokenIndicator(networkId, tokenAddress, indicator, options)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}/indicators`](/api-reference/tokens/get-a-technical-indicator-for-a-token)
The same indicators computed from the token's USD candles across every pool it trades in. Same options and response shape as `getPoolIndicator`. Requires SDK 1.12.0 or later.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL; keyless and free keys get `403`, thrown as a `ClientException` whose `getErrorData()['required_tier']` names the plan.
```php theme={null}
$macd = $client->tokens->getTokenIndicator(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
'macd',
['interval' => '1h', 'start' => '-7d']
);
```
**Search** `category`
**methods**
### client->search->search(query)
**Endpoint:** [GET `/search`](/api-reference/search/search-for-tokens-pools-and-dexes)
Searches across tokens, pools, and DEXes using a query string.
**Parameters:**
* `query`\* - Search query string
**Returns:** Matching entities from all categories (tokens, pools, DEXes). [Response Structure](/api-reference/search/search-for-tokens-pools-and-dexes).
```php theme={null}
// Search for "ethereum" across all entities
$results = $client->search->search("ethereum");
echo "Found " . count($results['tokens']) . " tokens\n";
echo "Found " . count($results['pools']) . " pools\n";
echo "Found " . count($results['dexes']) . " dexes\n";
```
**Stats** `category`
**methods**
### client->stats->getStats()
**Endpoint:** [GET `/stats`](/api-reference/utils/retrieve-high-level-asset-statistics)
Gets platform-wide statistics.
**Parameters:** None
**Returns:** Counts of chains, DEXes, pools, and tokens indexed. [Response Structure](/api-reference/utils/retrieve-high-level-asset-statistics).
```php theme={null}
// Get platform statistics
$stats = $client->stats->getStats();
echo "Total chains: {$stats['chains']}\n";
echo "Total DEX factories: {$stats['factories']}\n";
echo "Total pools: {$stats['pools']}\n";
echo "Total tokens: {$stats['tokens']}\n";
```
## Complete example
**example**
```php theme={null}
..., 'display_name' => ...]
$networks = $client->networks->getNetworks();
foreach ($networks as $network) {
if ($network['id'] === 'ethereum') {
echo "{$network['display_name']} is one of " . count($networks) . " networks\n";
}
}
// Price lives under summary
$weth = $client->tokens->getTokenDetails('ethereum', WETH);
echo "{$weth['name']} price: $" . number_format($weth['summary']['price_usd'], 2) . "\n";
// Pools for a token are served by pool search. Rows sit under results,
// sorted by volume_usd_24h. There is no pair filter, so match the second
// token client-side.
$pools = $client->tokens->getTokenPools('ethereum', WETH, [
'limit' => 20,
'orderBy' => 'volume_usd_24h',
'sort' => 'desc',
]);
echo "Top WETH/USDC pools:\n";
$shown = 0;
foreach ($pools['results'] as $pool) {
$ids = array_column($pool['tokens'], 'id');
if (in_array(USDC, $ids, true) && $shown < 5) {
echo "{$pool['dex_name']}: $" . number_format($pool['volume_usd_24h'], 2) . " 24h volume\n";
$shown++;
}
}
} catch (DexPaprikaApiException $e) {
echo "API Error: {$e->getMessage()}\n";
}
}
main();
```
## Advanced features
### Error handling
**error handling**
```php theme={null}
tokens->getTokenDetails('ethereum', '0xinvalidaddress');
} catch (NotFoundException $e) {
echo "Token not found: {$e->getMessage()}\n";
} catch (RateLimitException $e) {
echo "Rate limit exceeded: {$e->getMessage()}\n";
} catch (ServerException $e) {
echo "Server error occurred: {$e->getMessage()}\n";
} catch (NetworkException $e) {
echo "Network error: {$e->getMessage()}\n";
} catch (DexPaprikaApiException $e) {
echo "API error: {$e->getMessage()} (Code: {$e->getCode()})\n";
} catch (Exception $e) {
echo "General error: {$e->getMessage()}\n";
}
// The SDK automatically retries 429 (Too Many Requests), any 5xx
// (server errors) and connection failures
// Custom retry configuration
use DexPaprika\Config;
$config = new Config();
$config->setMaxRetries(4); // Number of retry attempts (default: 5)
$config->setRetryDelays([100, 500, 1000, 5000]); // Delay in milliseconds
$client = new Client(null, null, false, $config);
// All API requests will now use these retry settings
try {
$networks = $client->networks->getNetworks();
} catch (Exception $e) {
echo "Failed after multiple retries: {$e->getMessage()}\n";
}
```
### Caching system
**caching**
```php theme={null}
setupCache();
// First call - hits the API
$startTime = microtime(true);
$networks = $client->networks->getNetworks();
$firstCallTime = microtime(true) - $startTime;
echo "First call (API): " . count($networks) . " networks, took {$firstCallTime} s\n";
// Second call - served from cache (much faster)
$startTime = microtime(true);
$networks = $client->networks->getNetworks();
$secondCallTime = microtime(true) - $startTime;
echo "Second call (cached): " . count($networks) . " networks, took {$secondCallTime} s\n";
echo "Cache speedup: " . ($firstCallTime / $secondCallTime) . "x\n";
// You can skip the cache when you need fresh data
$client->getConfig()->setCacheEnabled(false);
$freshNetworks = $client->networks->getNetworks();
$client->getConfig()->setCacheEnabled(true);
// Custom cache configuration
$cache = new FilesystemCache('/path/to/custom/cache');
$client->setupCache($cache, 300); // 5 minutes TTL
// Clear the entire cache
$client->getConfig()->getCache()->clear();
```
### Pagination helper
Paging past the first page of a search endpoint needs an API key. The client below reads it from `DEXPAPRIKA_API_KEY`; a [free key](https://console.dexpaprika.com) pages without limit. Without a key the second page returns `403` with `"param": "cursor"`.
**pagination**
```php theme={null}
$limit,
'sort' => 'desc',
'orderBy' => 'volume_usd_24h'
];
if ($cursor !== null) {
$options['cursor'] = $cursor;
}
$response = $client->pools->getNetworkPools($networkId, $options);
$allPools = array_merge($allPools, $response['results']);
// The search endpoint is cursor-paginated, not page-numbered
if (empty($response['has_next_page']) || empty($response['next_cursor'])) {
break;
}
$cursor = $response['next_cursor'];
// Pause between pages to stay under your per-minute limit:
// https://docs.dexpaprika.com/knowledge-base/rate-limits
sleep(4);
}
echo "Fetched a total of " . count($allPools) . " pools on {$networkId}\n";
return $allPools;
}
// Alternative approach using built-in paginator
function fetchAllPoolsWithPaginator($networkId) {
$client = new Client();
$allPools = [];
// Create a paginator for network pools. Arguments are keyed by the
// method's parameter names; whatever is left becomes the options array.
$paginator = $client->createPaginator(
$client->pools,
'getNetworkPools',
[
'networkId' => $networkId,
'limit' => 50,
'orderBy' => 'volume_usd_24h',
'sort' => 'desc'
]
);
// Paginator is not Traversable and has no setMaxPages(), so walk it explicitly.
$page = 0;
while ($paginator->hasNextPage() && $page < 10) {
$response = $paginator->getNextPage();
$allPools = array_merge($allPools, $response['results']);
echo "Processed page {$page}, got " . count($response['results']) . " pools\n";
$page++;
}
echo "Fetched a total of " . count($allPools) . " pools on {$networkId}\n";
return $allPools;
}
// Usage example
$ethereumPools = fetchAllPools('ethereum');
// or
$ethereumPools = fetchAllPoolsWithPaginator('ethereum');
```
### Working with objects
**objects**
```php theme={null}
true to get an object instead of an array
$pool = $client->pools->getPoolDetails(
'ethereum',
'0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', // USDC/WETH Uniswap v3 pool
['asObject' => true]
);
// Access pool properties as object properties
echo "Pool: {$pool->tokens[0]->symbol}/{$pool->tokens[1]->symbol}\n";
echo "Price: \${$pool->last_price_usd}\n";
// Time windows are keyed '24h', '6h', '1h', '30m', '15m' and '5m', so use
// the brace syntax to read them
echo "Volume (24h): \${$pool->{'24h'}->volume_usd}\n";
echo "Transactions (24h): {$pool->{'24h'}->txns}\n";
echo "1h price change: {$pool->{'1h'}->last_price_usd_change}%\n";
echo "24h price change: {$pool->{'24h'}->last_price_usd_change}%\n";
// Calls without the option keep returning arrays
$networks = $client->networks->getNetworks();
$token = $client->tokens->getTokenDetails(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
['asObject' => true]
);
echo "{$token->name} price: \${$token->summary->price_usd}\n";
```
## Resources
* [GitHub Repository](https://github.com/coinpaprika/dexpaprika-sdk-php)
* [DexPaprika Website](https://dexpaprika.com)
* [API Reference](/api-reference/introduction)
* [Discord Community](https://discord.gg/DhJge5TUGM)
## API status
The DexPaprika API provides consistent data with stable endpoints. Requests are answered without an API key on the free tier, and a free key raises the credit allowance. We aim to maintain backward compatibility and provide notice of any significant changes.
### FAQs
> [accordion] Do I need an API key with this SDK?
>
> Not to start. Keyless requests work at 10,000 credits per rolling 30 days per IP, and a [free registered key](https://console.dexpaprika.com/dashboard) raises that to 100,000 with no card.
> [accordion] How do I find identifiers?
>
> Use Coverage Checker or list Networks and query Tokens/Pools to discover addresses.
> [accordion] How do I get historical or transactions data?
>
> Use pools/transactions endpoints with `pool_address`, `network`, and time/paging params as documented. Transactions need a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`.
> [accordion] What about rate limiting?
>
> 15 requests a minute keyless, 30 with a [free key](https://console.dexpaprika.com) and 500 on Pro, against 10,000 credits keyless and 100,000 with a free key over a rolling 30 days, or 5,000,000 a month on Pro. Retry transient HTTP errors with backoff. See [rate limits](/knowledge-base/rate-limits) for how the counters work, and [Pro pricing](https://dexpaprika.com/api/pricing) for what the 5,000,000 credit tier costs.
# DexPaprika DEX API Python SDK: on-chain liquidity and swap data client
Source: https://docs.dexpaprika.com/get-started/sdk-python
The official Python client library for the DexPaprika API, providing easy access to decentralized exchange data across multiple blockchain networks
> [!TIP]
>
> See also: [REST intro](/api-reference/introduction),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pools](/api-reference/pools/get-a-pool-on-a-network)
## Installation
```bash theme={null}
# Using pip
pip install dexpaprika-sdk
# Using poetry
poetry add dexpaprika-sdk
# From source
git clone https://github.com/coinpaprika/dexpaprika-sdk-python
cd dexpaprika-sdk-python
pip install -e .
```
## Prerequisites
* Python 3.8 or higher
* Connection to the internet to access the DexPaprika API
* No API key needed to start
## Quick example: get token price
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
from dexpaprika_sdk.models import TokenDetails # Type hint example
# Create client and get WETH price on Ethereum
client = DexPaprikaClient()
token: TokenDetails = client.tokens.get_details("ethereum", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2")
print(f"{token.name}: ${token.summary.price_usd:.2f}")
# Output: Wrapped Ether: $3245.67
```
## Using an API key (optional)
The SDK works without a key, and that is the default. A [free key](https://console.dexpaprika.com)
raises both the per-minute request limit and the credit allowance. Current figures are on the [rate limits page](/knowledge-base/rate-limits).
Requires 0.9.0 or later.
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
# Explicit
client = DexPaprikaClient(api_key="api_your_key_here")
# Or leave it out and set DEXPAPRIKA_API_KEY in the environment
client = DexPaprikaClient()
```
An explicit key beats the environment variable, and no key at all keeps the keyless behaviour
unchanged. The host is never inferred from the key: free keys are served from the default base URL,
and [Dev, Pro and Enterprise](/api-pro/introduction) keys move to `api-pro.dexpaprika.com`.
> [!WARNING]
>
> The key is sent as the entire `Authorization` header value. **Nothing goes in front of it**,
> no scheme word of any kind. The SDK writes the header for you, so this matters when you are
> debugging what went out or calling the API directly. See
> [401 Unauthorized](/knowledge-base/error-handling#401-unauthorized).
## API methods reference
> [!NOTE]
>
> Parameters marked with an asterisk (\*) are required.
**Networks** `category`
**methods**
### client.networks.list()
**Endpoint:** [GET `/networks`](/api-reference/networks/get-a-list-of-available-blockchain-networks)
Gets all supported blockchain networks including Ethereum, Solana, etc.
**Parameters:** None
**Returns:** Network IDs, names, and related information. [Response Structure](/api-reference/networks/get-a-list-of-available-blockchain-networks).
```python theme={null}
# Get all networks
networks = client.networks.list()
print(f"Found {len(networks)} networks")
```
**DEXes** `category`
**methods**
### client.dexes.list(network, page, limit)
**Endpoint:** [GET `/networks/{network}/dexes`](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network)
Gets all DEXes on a specific network.
**Parameters:**
* `network`\* - ID of the network (e.g., 'ethereum', 'solana')
* `page` - Page number for pagination (starts at 0)
* `limit` - Number of results per page
**Returns:** DEX IDs, names, pool counts, and volume information. [Response Structure](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network).
```python theme={null}
# Get all DEXes on Ethereum
dexes = client.dexes.list("ethereum")
print(f"Found {len(dexes.dexes)} DEXes on Ethereum")
```
**Pools** `category`
**methods**
### client.pools.list(page, limit, sort, order_by)
> [!WARNING]
>
> **The `GET /pools` endpoint was removed and returns `410 Gone`.** Whatever this
> method does locally, the request cannot succeed. Use the network-scoped method
> below and pass a network, or call `GET /pools/search` with a `chains` filter
> directly. See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** GET `/pools` (removed, `410 Gone`)
Gets top pools across all networks with pagination.
**Parameters:**
* `page` - Page number for pagination (starts at 0)
* `limit` - Number of results per page
* `sort` - Sort direction ('asc' or 'desc')
* `order_by` - Field to sort by ('volume_usd', 'liquidity_usd', etc.)
***
### client.pools.list_by_network(network_id, page, limit, sort, order_by)
**Endpoint:** [GET `/networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific network with pagination and sorting options.
**Parameters:**
* `network_id`\* - ID of the network
* `limit` - Number of results per page
* `sort` - Sort direction ('asc' or 'desc')
* `order_by` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list). Legacy values are mapped, so `volume_usd` is sent as `order_by=volume_usd_24h`, and REST rejects the legacy spelling with `400`
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough). `page` is validated but never sent: the endpoint is cursor-paginated
**Returns:** Cursor-paginated pools for the given network: a `results` array plus `has_next_page` and `next_cursor`. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```python theme={null}
# Get top 5 pools on Ethereum by volume
pools = client.pools.list_by_network(
network_id="ethereum",
limit=5,
order_by="volume_usd_24h",
sort="desc"
)
print(f"Found {len(pools.results)} pools on Ethereum")
```
***
### client.pools.list_by_dex(network_id, dex_id, limit, sort, order_by, cursor)
> [!WARNING]
>
> **`GET /networks/{network}/dexes/{dex}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?dex_name=...` instead. The DEX id
> moved out of the path and into a filter, so `page` is gone and the response shape changed.
> See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?dex_name=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific DEX within a network.
**Parameters:**
* `network_id`\* - ID of the network
* `dex_id`\* - ID of the DEX, the `dex_id` field from `client.dexes.list_by_network()`, case-insensitive (a display name like `Uniswap V3` returns no rows instead of an error)
* `limit` - Number of results per page (max 100)
* `sort` - Sort direction ('asc' or 'desc')
* `order_by` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list)
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
> [!NOTE]
>
> There is no `page` argument any more. The SDK normalizes legacy sort values, so `volume_usd` is
> sent as `order_by=volume_usd_24h`; REST rejects the legacy spelling with a `400` that lists the
> values it will take.
**Returns:** A `results` list plus `has_next_page` and `next_cursor` for cursor pagination. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```python theme={null}
# Get the busiest Uniswap V3 pools on Ethereum
uniswap_pools = client.pools.list_by_dex(
network_id="ethereum",
dex_id="uniswap_v3",
limit=10,
order_by="volume_usd_24h",
sort="desc"
)
for pool in uniswap_pools.results:
print(f"{pool.dex_name}: ${pool.volume_usd_24h:,.2f} 24h volume")
```
***
### client.pools.get_details(network_id, pool_address, inversed)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}`](/api-reference/pools/get-a-pool-on-a-network)
Gets detailed information about a specific pool.
**Parameters:**
* `network_id`\* - ID of the network
* `pool_address`\* - On-chain address of the pool
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Detailed pool information including tokens, volumes, liquidity, and more. [Response Structure](/api-reference/pools/get-a-pool-on-a-network).
```python theme={null}
from dexpaprika_sdk.models import PoolDetails # Type hint example
# Get details for a specific pool (WETH/USDC on Uniswap V2)
pool: PoolDetails = client.pools.get_details(
network_id="ethereum",
pool_address="0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
inversed=False
)
print(f"Pool: {pool.tokens[0].symbol}/{pool.tokens[1].symbol}")
```
***
### client.pools.get_transactions(network_id, pool_address, page, limit, cursor, from_timestamp, to_timestamp)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/transactions`](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
Gets transaction history for a specific pool with pagination.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL since 30 September 2026; keyless and free keys get `403`. See [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
**Parameters:**
* `network_id`\* - ID of the network
* `pool_address`\* - On-chain address of the pool
* `page` - Page number for pagination
* `limit` - Number of transactions per page
* `cursor` - Transaction ID for cursor-based pagination
* `from_timestamp` / `to_timestamp` - Time window: a relative offset such as `"-1h"`, Unix seconds, RFC3339 or `YYYY-MM-DD`. `from_timestamp` is inclusive, `to_timestamp` exclusive; results go back 7 days at most
**Returns:** List of transactions with details about tokens, amounts, and timestamps. [Response Structure](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
```python theme={null}
# Get the latest 20 transactions for a pool
transactions = client.pools.get_transactions(
network_id="ethereum",
pool_address="0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
limit=20
)
latest = transactions.transactions[0]
print(f"Latest transaction: {latest.id} in block {latest.created_at_block_number}")
# Only the last hour
last_hour = client.pools.get_transactions(
network_id="ethereum",
pool_address="0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
limit=20,
from_timestamp="-1h"
)
```
***
### client.pools.get_ohlcv(network_id, pool_address, start, end, limit, interval, inversed)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/ohlcv`](/api-reference/pools/get-ohlcv-data-for-a-pool-pair)
Gets OHLCV (Open, High, Low, Close, Volume) chart data for a pool.
**Parameters:**
* `network_id`\* - ID of the network
* `pool_address`\* - On-chain address of the pool
* `start`\* - Start time (relative offset such as `-24h`, ISO date string, YYYY-MM-DD, or Unix timestamp), inside your plan's [history window](/knowledge-base/rate-limits#ohlcv-limits-by-plan)
* `end` - End time (optional)
* `limit` - Number of data points to return
* `interval` - Time interval ('1m', '5m', '10m', '15m', '30m', '1h', '6h', '12h', '24h'); without a key only '1h' and up
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Array of OHLCV data points for the specified time range and interval. [Response Structure](/api-reference/pools/get-ohlcv-data-for-a-pool-pair).
```python theme={null}
# Hourly candles for the last 24 hours, which works without a key
ohlcv = client.pools.get_ohlcv(
network_id="ethereum",
pool_address="0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
start="-24h",
interval="1h",
limit=24
)
print(f"Received {len(ohlcv)} OHLCV data points")
```
***
### client.pools.get_indicator(network_id, pool_address, indicator, interval, start, end, limit, cursor, period, fast_period, slow_period, signal_period, std_dev)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/indicators`](/api-reference/pools/get-a-technical-indicator-for-a-pool)
Computes RSI, EMA, MACD, Bollinger Bands or VWAP from a pool's candles. Requires SDK 0.13.0 or later.
**Parameters:**
* `network_id`\* - ID of the network
* `pool_address`\* - On-chain address of the pool
* `indicator`\* - `'rsi'`, `'ema'`, `'macd'`, `'bbands'` or `'vwap'`
* `interval` - Candle interval (`'1m'` to `'24h'`, or `'1d'`); pass it every time
* `start`, `end`, `limit`, `cursor` - Range and paging, same formats as OHLCV
* `period` - rsi, ema, bbands and vwap
* `fast_period`, `slow_period`, `signal_period` - macd only
* `std_dev` - bbands only
Only the parameters you pass are sent. One that belongs to another indicator, such as `fast_period` with `indicator="rsi"`, raises `requests.HTTPError` with status 400.
**Returns:** `data`, oldest first, one point per completed candle: `value` for rsi, ema and vwap; `macd`, `signal` and `histogram` for macd; `upper`, `middle` and `lower` for bbands. `parameters` echoes the settings used, defaults included, and `has_next_page`/`next_cursor` page through longer ranges. [Response Structure](/api-reference/pools/get-a-technical-indicator-for-a-pool).
Works on every plan, keyless included, with the same interval and history limits as pool OHLCV ([limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). Tutorial: [technical indicators](/tutorials/technical-indicators).
```python theme={null}
# Hourly RSI over the last 24 hours, which works without a key
rsi = client.pools.get_indicator(
network_id="ethereum",
pool_address="0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
indicator="rsi",
interval="1h",
start="-24h",
)
last = rsi.data[-1]
print(f"RSI {last.value:.1f} at {last.timestamp}")
```
**Tokens** `category`
**methods**
### client.tokens.get_details(network_id, token_address)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}`](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
Gets comprehensive token information.
**Parameters:**
* `network_id`\* - ID of the network
* `token_address`\* - Token contract address
**Returns:** Token details including price, market cap, volume, and metadata. [Response Structure](/api-reference/tokens/get-a-tokens-latest-data-on-a-network).
```python theme={null}
# Get WETH token details
weth = client.tokens.get_details(
network_id="ethereum",
token_address="0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
)
print(f"{weth.name} price: ${weth.summary.price_usd:,.2f}")
```
***
### client.tokens.get_pools(network_id, token_address, limit, sort, order_by, cursor)
> [!WARNING]
>
> **`GET /networks/{network}/tokens/{token_address}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?token_address=...` instead, so it still
> works. The old second-token `address` pair filter and the `reorder` flag have no replacement: pass
> either and the SDK raises a `DeprecationWarning` and drops it. See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?token_address=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools containing a specific token.
**Parameters:**
* `network_id`\* - ID of the network
* `token_address`\* - Token contract address
* `limit` - Number of results per page (1 to 100)
* `sort` - Sort direction ('asc' or 'desc')
* `order_by` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list). Legacy values are mapped, so `volume_usd` is sent as `order_by=volume_usd_24h`; REST rejects the legacy spelling with `400`
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough). `page` is validated but never sent: the endpoint is cursor-paginated
* `address`, `reorder` - deprecated and ignored
**Returns:** A `PoolSearchResponse` with `results`, `has_next_page` and `next_cursor`. [Response Structure](/api-reference/pools/advanced-pool-filtering-on-a-specific-network).
```python theme={null}
# Get the busiest WETH pools on Ethereum
pools = client.tokens.get_pools(
network_id="ethereum",
token_address="0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", # WETH
limit=5,
order_by="volume_usd_24h",
sort="desc",
)
for pool in pools.results:
print(f"{pool.dex_name}: ${pool.volume_usd_24h:,.2f} 24h volume")
```
***
### client.tokens.get_indicator(network_id, token_address, indicator, ...)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}/indicators`](/api-reference/tokens/get-a-technical-indicator-for-a-token)
The same indicators computed from the token's USD candles across every pool it trades in. Same parameters and response shape as `client.pools.get_indicator`. Requires SDK 0.13.0 or later.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL; keyless and free keys get `403` with the required plan named in the message.
```python theme={null}
macd = client.tokens.get_indicator(
network_id="ethereum",
token_address="0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", # WETH
indicator="macd",
interval="1h",
start="-7d",
)
last = macd.data[-1]
print(last.macd, last.signal, last.histogram)
```
**Search** `category`
**methods**
### client.search.search(query)
**Endpoint:** [GET `/search`](/api-reference/search/search-for-tokens-pools-and-dexes)
Searches across tokens, pools, and DEXes using a query string.
**Parameters:**
* `query`\* - Search query string
**Returns:** Matching entities from all categories (tokens, pools, DEXes). [Response Structure](/api-reference/search/search-for-tokens-pools-and-dexes).
```python theme={null}
# Search for "ethereum" across all entities
results = client.search.search("ethereum")
print(f"Found {len(results.tokens)} tokens")
print(f"Found {len(results.pools)} pools")
print(f"Found {len(results.dexes)} dexes")
```
**Utils** `category`
**methods**
### client.utils.get_stats()
**Endpoint:** [GET `/stats`](/api-reference/utils/retrieve-high-level-asset-statistics)
Gets platform-wide statistics.
**Parameters:** None
**Returns:** Counts of chains, DEXes, pools, and tokens indexed. [Response Structure](/api-reference/utils/retrieve-high-level-asset-statistics).
```python theme={null}
# Get platform statistics
stats = client.utils.get_stats()
print(f"Total chains: {stats.chains}")
print(f"Total DEX factories: {stats.factories}")
print(f"Total pools: {stats.pools}")
print(f"Total tokens: {stats.tokens}")
```
## Complete example
**example**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
WETH = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
USDC = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
def main():
client = DexPaprikaClient()
# Networks come back as a list of Network(id, display_name)
networks = client.networks.list()
ethereum = next(n for n in networks if n.id == "ethereum")
print(f"{ethereum.display_name} is one of {len(networks)} networks")
# Price lives under summary
weth = client.tokens.get_details(network_id="ethereum", token_address=WETH)
print(f"{weth.name} price: ${weth.summary.price_usd:,.2f}")
# Pools for a token are served by pool search. Rows sit under results,
# sorted by volume_usd_24h. There is no pair filter, so match the second
# token client-side.
pools = client.tokens.get_pools(
network_id="ethereum",
token_address=WETH,
limit=20,
order_by="volume_usd_24h",
sort="desc",
)
weth_usdc = [p for p in pools.results if any(t.id == USDC for t in p.tokens)]
print("Top WETH/USDC pools:")
for pool in weth_usdc[:5]:
print(f"{pool.dex_name}: ${pool.volume_usd_24h:,.2f} 24h volume")
if __name__ == "__main__":
main()
```
## Advanced features
### Error handling
**error handling**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
import requests
# Basic error handling
try:
client = DexPaprikaClient()
token = client.tokens.get_details("ethereum", "0xinvalidaddress")
except Exception as e:
if "404" in str(e):
print("Token not found")
elif "429" in str(e):
print("Rate limit exceeded")
else:
print(f"An error occurred: {e}")
# The SDK automatically retries 429 (Too Many Requests), any 5xx
# (server errors), connection errors and timeouts. On a 429 it waits
# as long as the API's Retry-After header asks.
# Custom retry configuration
client = DexPaprikaClient(
max_retries=4, # Number of retry attempts (default: 4)
backoff_times=[0.1, 0.5, 1.0, 5.0] # Backoff times in seconds
)
# All API requests will now use these retry settings
try:
networks = client.networks.list()
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
```
### Caching system
**caching**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
import time
# The SDK includes built-in caching by default
# Demonstration of cache behavior
# Create a regular client with default cache (5 minutes TTL)
client = DexPaprikaClient()
# First call - hits the API
start_time = time.time()
networks = client.networks.list()
first_call_time = time.time() - start_time
print(f"First call (API): {len(networks)} networks, took {first_call_time:.4f}s")
# Second call - served from cache (much faster)
start_time = time.time()
networks = client.networks.list()
second_call_time = time.time() - start_time
print(f"Second call (cached): {len(networks)} networks, took {second_call_time:.4f}s")
print(f"Cache speedup: {first_call_time / second_call_time:.1f}x")
# You can skip the cache when you need fresh data
fresh_networks = client.networks._get("/networks", skip_cache=True)
# Clear the entire cache
client.clear_cache()
# Clear cache only for specific endpoints
client.clear_cache(endpoint_prefix="/networks")
# Different types of data have different cache durations:
# - Network data: 24 hours
# - Pool data: 5 minutes
# - Token data: 10 minutes
# - Statistics: 15 minutes
# - Other data: 5 minutes (default)
```
### Pagination helper
Paging past the first page of a search endpoint needs an API key. The client below reads it from `DEXPAPRIKA_API_KEY`; a [free key](https://console.dexpaprika.com) pages without limit. Without a key the second page returns `403` with `"param": "cursor"`.
**pagination**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
import time
def fetch_all_pools(network_id, max_pages=10):
client = DexPaprikaClient()
all_pools = []
limit = 50
cursor = None
# Every page is one request against your allowance, so cap the walk
for _ in range(max_pages):
response = client.pools.list_by_network(
network_id=network_id,
limit=limit,
sort="desc",
order_by="volume_usd_24h",
cursor=cursor,
)
all_pools.extend(response.results)
# The search endpoint is cursor-paginated, not page-numbered
if not response.has_next_page or not response.next_cursor:
break
cursor = response.next_cursor
# Pause between pages to stay under your per-minute limit:
# https://docs.dexpaprika.com/knowledge-base/rate-limits
time.sleep(4)
print(f"Fetched a total of {len(all_pools)} pools on {network_id}")
return all_pools
# Usage example
ethereum_pools = fetch_all_pools("ethereum")
```
### Parameter validation
**validation**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
# The SDK automatically validates parameters before making API requests
client = DexPaprikaClient()
# Invalid parameter examples will raise helpful error messages
try:
# Invalid network ID
client.pools.list_by_network(network_id="", limit=5)
except ValueError as e:
print(e) # "network_id is required"
try:
# Invalid sort parameter
client.pools.list_by_network(network_id="ethereum", sort="invalid_sort")
except ValueError as e:
print(e) # "sort must be one of: asc, desc"
try:
# Invalid limit parameter
client.pools.list_by_network(network_id="ethereum", limit=500)
except ValueError as e:
print(e) # "limit must be at most 100"
```
### Working with models
**models**
```python theme={null}
from dexpaprika_sdk import DexPaprikaClient
from dexpaprika_sdk.models import PoolDetails # Type hint example
client = DexPaprikaClient()
# Get pool details
pool: PoolDetails = client.pools.get_details(
network_id="ethereum",
pool_address="0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640" # USDC/WETH Uniswap v3 pool
)
# Access pool properties with type checking and auto-completion
print(f"Pool: {pool.tokens[0].symbol}/{pool.tokens[1].symbol}")
print(f"Volume (24h): ${pool.day.volume_usd:.2f}")
print(f"Transactions (24h): {pool.day.txns}")
print(f"Price: ${pool.last_price_usd:.4f}")
# Time interval data is available for multiple timeframes
print(f"1h price change: {pool.hour1.last_price_usd_change:.2f}%")
print(f"24h price change: {pool.day.last_price_usd_change:.2f}%")
# All API responses are converted to typed Pydantic models
# This provides automatic validation, serialization/deserialization,
# and IDE auto-completion support through Python type hints
```
## Resources
* [GitHub Repository](https://github.com/coinpaprika/dexpaprika-sdk-python)
* [DexPaprika Website](https://dexpaprika.com)
* [API Reference](/api-reference/introduction)
* [Discord Community](https://discord.gg/DhJge5TUGM)
## API status
The DexPaprika API provides consistent data with stable endpoints. Requests are answered without an API key on the free tier, and a free key raises the credit allowance. We aim to maintain backward compatibility and provide notice of any significant changes.
### FAQs
> [accordion] Do I need an API key with this SDK?
>
> Not to start. Keyless requests work at 10,000 credits per rolling 30 days per IP, and a [free registered key](https://console.dexpaprika.com/dashboard) raises that to 100,000 with no card.
> [accordion] How do I find identifiers?
>
> Use Coverage Checker or list Networks and query Tokens/Pools to discover addresses.
> [accordion] How do I get historical or transactions data?
>
> Use pools/transactions endpoints with `pool_address`, `network`, and time/paging params as documented. Transactions need a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`.
> [accordion] What about rate limiting?
>
> 15 requests a minute keyless, 30 with a [free key](https://console.dexpaprika.com) and 500 on Pro, against 10,000 credits keyless and 100,000 with a free key over a rolling 30 days, or 5,000,000 a month on Pro. Retry transient HTTP errors with backoff. See [rate limits](/knowledge-base/rate-limits) for how the counters work, and [Pro pricing](https://dexpaprika.com/api/pricing) for what the 5,000,000 credit tier costs.
# DexPaprika DEX API TypeScript SDK: on-chain liquidity and swap data client
Source: https://docs.dexpaprika.com/get-started/sdk-ts
JavaScript client library for accessing decentralized exchange data across multiple blockchain networks
> [!TIP]
>
> See also: [REST intro](/api-reference/introduction),
> [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Pools](/api-reference/pools/get-a-pool-on-a-network)
## Prerequisites
* Node.js 14.0.0 or higher
* Connection to the internet to access the DexPaprika API
* No API key needed to start
## Installation
Install the DexPaprika SDK using your preferred package manager:
```bash theme={null}
# using npm
npm install dexpaprika-sdk
# using yarn
yarn add dexpaprika-sdk
# using pnpm
pnpm add dexpaprika-sdk
```
## Quick example
```javascript theme={null}
import { DexPaprikaClient } from 'dexpaprika-sdk';
// Initialize the client
const client = new DexPaprikaClient();
// Get the price of Wrapped Ether (WETH) on Ethereum
async function getWethPrice() {
const wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
const token = await client.tokens.getDetails('ethereum', wethAddress);
console.log(`Current WETH price: $${token.summary.price_usd}`);
}
getWethPrice();
```
## Using an API key (optional)
The SDK works without a key, and that is the default. A [free key](https://console.dexpaprika.com)
raises both the per-minute request limit and the credit allowance. Current figures are on the [rate limits page](/knowledge-base/rate-limits).
Requires 1.10.0 or later.
```typescript theme={null}
import { DexPaprikaClient } from 'dexpaprika-sdk';
// Explicit
const client = new DexPaprikaClient('https://api.dexpaprika.com', {}, {
apiKey: 'api_your_key_here',
});
// Or leave it out and set DEXPAPRIKA_API_KEY in the environment
const envClient = new DexPaprikaClient();
```
An explicit key beats the environment variable, and no key at all keeps the keyless behaviour
unchanged. The host is never inferred from the key: free keys are served from the default base URL,
and [Dev, Pro and Enterprise](/api-pro/introduction) keys move to `api-pro.dexpaprika.com`.
> [!WARNING]
>
> The key is sent as the entire `Authorization` header value. **Nothing goes in front of it**,
> no scheme word of any kind. The SDK writes the header for you, so this matters when you are
> debugging what went out or calling the API directly. See
> [401 Unauthorized](/knowledge-base/error-handling#401-unauthorized).
## API methods reference
All API methods in the DexPaprika SDK follow a consistent pattern, accepting required parameters first, followed by an optional `options` object for additional configuration. This options pattern provides flexibility while keeping the API clean and easy to use.
For example, most listing methods accept pagination and sorting options:
```javascript theme={null}
// Get pools with custom pagination and sorting
const pools = await client.pools.listByNetwork('ethereum', {
limit: 20, // get 20 results
sort: 'desc', // sort descending
orderBy: 'volume_usd_24h' // sort by 24h volume
});
// The next page: pass the cursor from the previous response
const morePools = await client.pools.listByNetwork('ethereum', {
limit: 20,
cursor: pools.next_cursor
});
```
**Networks** `category`
**Network methods**
### client.networks.list()
**Endpoint:** [GET `/networks`](/api-reference/networks/get-a-list-of-available-blockchain-networks)
Retrieves all supported blockchain networks and their metadata.
**Parameters:** None
**Returns:** Array of network objects containing network ID, name, and other information.
```javascript theme={null}
const networks = await client.networks.list();
console.log(`Supported networks: ${networks.length}`);
```
**DEXes** `category`
**DEX methods**
### client.dexes.listByNetwork(networkId, options)
**Endpoint:** [GET `/networks/{network}/dexes`](/api-reference/dexes/get-a-list-of-available-dexes-on-a-network)
Retrieves all DEXes on a specific network.
**Parameters:**
* `networkId`\* - Network ID (e.g., "ethereum", "solana")
* `options` - Optional configuration:
* `page` - Page number for pagination (defaults to 0)
* `limit` - Number of DEXes per page (defaults to 10)
**Returns:** Paginated list of DEX objects with name, ID, and metadata.
```javascript theme={null}
const dexes = await client.dexes.listByNetwork('ethereum', { limit: 20 });
dexes.dexes.forEach(dex => console.log(dex.dex_name));
```
**Pools** `category`
**Pool methods**
### client.pools.list(options)
> [!WARNING]
>
> **Removed.** The `GET /pools` endpoint returns `410 Gone`, and this method throws
> `DeprecatedEndpointError` rather than making a request. Use
> `client.pools.listByNetwork(network, options)` and pass a network.
***
### client.pools.listByNetwork(networkId, options)
**Endpoint:** [GET `/networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific network with cursor pagination and sorting options.
**Parameters:**
* `networkId`\* - ID of the network
* `options` - Options object for pagination and sorting:
* `limit` - Number of pools per page
* `sort` - Sort direction ('asc' or 'desc')
* `orderBy` - Field to sort by ('volume_usd', 'price_usd', etc.). Legacy values are mapped to the canonical sort fields.
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
**Returns:** `results` array plus `has_next_page` and `next_cursor` for cursor pagination.
```javascript theme={null}
const ethereumPools = await client.pools.listByNetwork('ethereum', {
limit: 5,
orderBy: 'volume_usd_24h',
sort: 'desc'
});
console.log(`Top pool volume: $${ethereumPools.results[0].volume_usd_24h}`);
if (ethereumPools.has_next_page) {
const nextPage = await client.pools.listByNetwork('ethereum', {
limit: 5,
cursor: ethereumPools.next_cursor
});
}
```
***
### client.pools.listByDex(networkId, dexId, options)
> [!WARNING]
>
> **`GET /networks/{network}/dexes/{dex}/pools` was removed and returns `410 Gone`.**
> This method now calls `GET /networks/{network}/pools/search?dex_name=...` instead. The DEX id
> moved out of the path and into a filter, so `page` is gone and the response shape changed.
> See [pool filtering](/tutorials/pool-filtering).
**Endpoint:** [GET `/networks/{network}/pools/search?dex_name=...`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets pools on a specific DEX within a network.
**Parameters:**
* `networkId`\* - ID of the network
* `dexId`\* - ID of the DEX, the `dex_id` field from `client.dexes.listByNetwork()`, case-insensitive (a display name like `Uniswap V3` returns no rows instead of an error)
* `options` - Options object for pagination and sorting:
* `limit` - Number of pools per page (max 100)
* `sort` - Sort direction ('asc' or 'desc')
* `orderBy` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list)
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
> [!NOTE]
>
> There is no `page` option any more. The SDK normalizes legacy sort values, so `volume_usd` is
> sent as `order_by=volume_usd_24h`; REST rejects the legacy spelling with a `400` that lists the
> values it will take.
**Returns:** A `results` array plus `has_next_page` and `next_cursor` for cursor pagination.
```javascript theme={null}
const uniswapPools = await client.pools.listByDex('ethereum', 'uniswap_v3', {
limit: 10,
orderBy: 'volume_usd_24h',
sort: 'desc'
});
for (const pool of uniswapPools.results) {
console.log(`${pool.dex_name}: $${pool.volume_usd_24h.toLocaleString()} 24h volume`);
}
```
***
### client.pools.getDetails(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}`](/api-reference/pools/get-a-pool-on-a-network)
Gets detailed information about a specific pool.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options` - Options object:
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Detailed pool information including tokens, volumes, liquidity, and more.
```javascript theme={null}
// Get details for a specific pool (WETH/USDC on Uniswap V2)
const pool = await client.pools.getDetails(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
{ inversed: false }
);
console.log(`Pool: ${pool.tokens[0].symbol}/${pool.tokens[1].symbol}`);
```
***
### client.pools.getTransactions(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/transactions`](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
Gets transaction history for a specific pool with pagination.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL since 30 September 2026; keyless and free keys get `403`. See [pool transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages).
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options` - Options object for pagination:
* `page` - Page number for pagination
* `limit` - Number of transactions per page
* `cursor` - Transaction ID for cursor-based pagination
* `from` / `to` - Time window: a relative offset such as `'-1h'`, Unix seconds, RFC3339 or `YYYY-MM-DD` (1.11.0 and later take a string). `from` is inclusive, `to` exclusive; results go back 7 days at most
**Returns:** List of transactions with details about tokens, amounts, and timestamps.
```javascript theme={null}
// Get the latest 20 transactions for a pool
const transactions = await client.pools.getTransactions(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
{ limit: 20 }
);
console.log(`Latest transaction: ${transactions.transactions[0].id}`);
// Only the last hour
const lastHour = await client.pools.getTransactions(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
{ limit: 20, from: '-1h' }
);
```
***
### client.pools.getOHLCV(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/ohlcv`](/api-reference/pools/get-ohlcv-data-for-a-pool-pair)
Gets OHLCV (Open, High, Low, Close, Volume) chart data for a pool.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options`\* - OHLCV options object:
* `start`\* - Start time (relative offset such as `-24h`, ISO date string or timestamp), inside your plan's [history window](/knowledge-base/rate-limits#ohlcv-limits-by-plan)
* `end` - End time (optional)
* `limit` - Number of data points to return
* `interval` - Time interval ('1h', '6h', '24h', etc.; finer intervals need a key or a paid plan)
* `inversed` - Whether to invert the price ratio (boolean)
**Returns:** Array of OHLCV data points for the specified time range and interval.
```javascript theme={null}
// Hourly candles for the last 24 hours, which works without a key
const ohlcvData = await client.pools.getOHLCV(
'ethereum',
'0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc',
{
start: '-24h',
interval: '1h',
limit: 24
}
);
console.log(`Data points: ${ohlcvData.length}`);
console.log(`Current price: ${ohlcvData[ohlcvData.length-1].close}`);
```
***
### client.pools.getIndicator(networkId, poolAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/{pool_address}/indicators`](/api-reference/pools/get-a-technical-indicator-for-a-pool)
Computes RSI, EMA, MACD, Bollinger Bands or VWAP from a pool's candles. Requires SDK 1.13.0 or later.
**Parameters:**
* `networkId`\* - ID of the network
* `poolAddress`\* - On-chain address of the pool
* `options`\* - Indicator options object:
* `indicator`\* - `'rsi'`, `'ema'`, `'macd'`, `'bbands'` or `'vwap'`
* `interval` - Candle interval (`'1m'` to `'24h'`, or `'1d'`); pass it every time
* `start`, `end`, `limit`, `cursor` - Range and paging, same formats as OHLCV
* `period` - rsi, ema, bbands and vwap
* `fast_period`, `slow_period`, `signal_period` - macd only
* `std_dev` - bbands only
Only the options you set are sent. A parameter that belongs to another indicator, such as `fast_period` with `'rsi'`, is refused with a 400.
**Returns:** `data`, oldest first, one point per completed candle: `value` for rsi, ema and vwap; `macd`, `signal` and `histogram` for macd; `upper`, `middle` and `lower` for bbands. `parameters` echoes the settings used, defaults included, and `has_next_page`/`next_cursor` page through longer ranges. [Response Structure](/api-reference/pools/get-a-technical-indicator-for-a-pool).
Works on every plan, keyless included, with the same interval and history limits as pool OHLCV ([limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan)). Tutorial: [technical indicators](/tutorials/technical-indicators).
```javascript theme={null}
// Hourly RSI over the last 24 hours, which works without a key
const rsi = await client.pools.getIndicator(
'ethereum',
'0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
{ indicator: 'rsi', interval: '1h', start: '-24h' }
);
const last = rsi.data[rsi.data.length - 1];
console.log(`RSI ${last.value.toFixed(1)} at ${last.timestamp}`);
```
**Tokens** `category`
**Token methods**
### client.tokens.getDetails(networkId, tokenAddress)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}`](/api-reference/tokens/get-a-tokens-latest-data-on-a-network)
Gets detailed information about a specific token on a network.
**Parameters:**
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token address or identifier
**Returns:** Detailed token information including price, volume, and metadata.
```javascript theme={null}
// Get details for WETH on Ethereum
const weth = await client.tokens.getDetails(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
);
console.log(`${weth.name} (${weth.symbol}): $${weth.summary.price_usd}`);
```
***
### client.tokens.getPools(networkId, tokenAddress, options)
**Endpoint:** [GET `/networks/{network}/pools/search`](/api-reference/pools/advanced-pool-filtering-on-a-specific-network)
Gets a list of liquidity pools that include the specified token. Backed by the unified
pool search endpoint with its `token_address` filter; the old
`/networks/{network}/tokens/{token_address}/pools` endpoint was removed and returns `410 Gone`.
The filter is network-scoped, so a network is always required. An unknown token address
returns an empty result set rather than an error.
**Parameters:**
* `networkId`\* - ID of the network
* `tokenAddress`\* - Token address or identifier
* `options` - Options object for sorting and pagination:
* `limit` - Number of pools per page
* `sort` - Sort direction ('asc' or 'desc')
* `orderBy` - Field to sort by ('volume_usd_24h', 'liquidity_usd', 'txns_24h', and the rest of the canonical list). Legacy values are mapped, so `volume_usd` is sent as `order_by=volume_usd_24h`; REST rejects the legacy spelling with `400`.
* `cursor` - Cursor for the next page, taken from `next_cursor` on the previous response (paging needs an API key; a free key is enough)
> [!NOTE]
>
> `pairWith` is no longer supported. Pool search has no pair filter, so the option is
> accepted for backwards compatibility but never sent. To find a specific pair, filter
> the returned pools on the second token yourself.
**Returns:** `results` array plus `has_next_page` and `next_cursor` for cursor pagination.
```javascript theme={null}
// Find the busiest WETH pools on Ethereum
const wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
const pools = await client.tokens.getPools(
'ethereum',
wethAddress,
{
limit: 5,
orderBy: 'volume_usd_24h',
sort: 'desc'
}
);
pools.results.forEach(pool => {
console.log(`${pool.dex_name}: $${pool.volume_usd_24h} 24h volume`);
});
```
***
### client.tokens.getIndicator(networkId, tokenAddress, options)
**Endpoint:** [GET `/networks/{network}/tokens/{token_address}/indicators`](/api-reference/tokens/get-a-technical-indicator-for-a-token)
The same indicators computed from the token's USD candles across every pool it trades in. Same options and response shape as `client.pools.getIndicator`, with `token_address` in place of `pool_address`. Requires SDK 1.13.0 or later.
Needs a Dev, Pro or Enterprise key and the `https://api-pro.dexpaprika.com` base URL; keyless and free keys get `403`, thrown as an `ApiError` with `requiredTier` set.
```javascript theme={null}
const macd = await client.tokens.getIndicator(
'ethereum',
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
{ indicator: 'macd', interval: '1h', start: '-7d' }
);
const last = macd.data[macd.data.length - 1];
console.log(last.macd, last.signal, last.histogram);
```
**Search** `category`
**Search methods**
### client.search.search(query)
**Endpoint:** [GET `/search`](/api-reference/search/search-for-tokens-pools-and-dexes)
Searches for tokens, pools, and DEXes by name or identifier.
**Parameters:**
* `query`\* - Search term (e.g., "uniswap", "bitcoin", or a token address)
**Returns:** Search results organized by category (tokens, pools, DEXes).
```javascript theme={null}
// Search for "ethereum"
const results = await client.search.search('ethereum');
console.log(`Found ${results.tokens.length} tokens`);
console.log(`Found ${results.pools.length} pools`);
console.log(`Found ${results.dexes.length} DEXes`);
```
**Utils** `category`
**Utility methods**
### client.utils.getStats()
**Endpoint:** [GET `/stats`](/api-reference/utils/retrieve-high-level-asset-statistics)
Gets high-level statistics about the DexPaprika ecosystem.
**Parameters:** None
**Returns:** Statistics about chains, DEXes, pools, and tokens.
```javascript theme={null}
const stats = await client.utils.getStats();
console.log(`Chains: ${stats.chains}`);
console.log(`DEX factories: ${stats.factories}`);
console.log(`Pools: ${stats.pools}`);
console.log(`Tokens: ${stats.tokens}`);
```
## Complete example
**example**
```javascript theme={null}
import { DexPaprikaClient } from 'dexpaprika-sdk';
const WETH = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
const USDC = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48';
async function main() {
const client = new DexPaprikaClient();
// Networks come back as a plain array of { id, display_name }
const networks = await client.networks.list();
const ethereum = networks.find(n => n.id === 'ethereum');
console.log(`${ethereum.display_name} is one of ${networks.length} networks`);
// Price lives under summary
const weth = await client.tokens.getDetails('ethereum', WETH);
console.log(`${weth.name} price: $${weth.summary.price_usd.toFixed(2)}`);
// Pools for a token are served by pool search. Rows sit under results,
// sorted by volume_usd_24h. There is no pair filter, so match the second
// token client-side.
const pools = await client.tokens.getPools('ethereum', WETH, {
limit: 20,
orderBy: 'volume_usd_24h',
sort: 'desc',
});
const wethUsdc = pools.results.filter(p => p.tokens.some(t => t.id === USDC));
console.log('Top WETH/USDC pools:');
for (const pool of wethUsdc.slice(0, 5)) {
console.log(`${pool.dex_name}: $${pool.volume_usd_24h.toLocaleString('en-US', { maximumFractionDigits: 2 })} 24h volume`);
}
}
main().catch(console.error);
```
## Advanced features
### Error handling
**error handling**
```javascript theme={null}
import {
DexPaprikaClient,
ApiError,
NetworkNotFoundError,
PoolNotFoundError,
} from 'dexpaprika-sdk';
// Basic error handling
try {
const client = new DexPaprikaClient();
const token = await client.tokens.getDetails('ethereum', '0xinvalidaddress');
} catch (error) {
// Every SDK error has a readable message that includes the HTTP status
console.error('Error:', error.message);
// Or branch on the error class
if (error instanceof NetworkNotFoundError || error instanceof PoolNotFoundError) {
console.error('Unknown network or pool');
} else if (error instanceof ApiError && error.statusCode === 404) {
console.error('Resource not found');
} else if (error instanceof ApiError && error.statusCode === 429) {
console.error('Rate limit exceeded');
}
}
// The SDK automatically retries on these status codes:
// 408 (Request Timeout), 429 (Too Many Requests),
// 500, 502, 503, 504 (Server Errors)
// Custom retry configuration
const client = new DexPaprikaClient('https://api.dexpaprika.com', {}, {
retry: {
maxRetries: 3,
delaySequenceMs: [200, 500, 1000],
retryableStatuses: [429, 500, 503]
}
});
```
### Caching
**caching**
```javascript theme={null}
import { DexPaprikaClient, Cache } from 'dexpaprika-sdk';
// The SDK includes built-in caching by default
// This example shows how to configure it
// Configure caching with custom settings
const client = new DexPaprikaClient('https://api.dexpaprika.com', {}, {
cache: {
ttl: 60 * 1000, // 1 minute cache TTL (default is 5 minutes)
maxSize: 100, // Store up to 100 responses (default is 1000)
enabled: true // Enable caching (enabled by default)
}
});
// Demonstration of cache behavior
async function demonstrateCaching() {
console.time('First call');
await client.networks.list(); // Makes an API request
console.timeEnd('First call');
console.time('Second call');
await client.networks.list(); // Returns cached result
console.timeEnd('Second call');
// You can also manage the cache manually
client.clearCache(); // Clear all cached data
console.log(client.cacheSize); // Get current cache size
client.setCacheEnabled(false); // Disable caching
}
// Using the Cache class directly
const manualCache = new Cache({
ttl: 30 * 1000, // 30 second TTL
maxSize: 50 // Store maximum 50 items
});
manualCache.set('myKey', { data: 'example data' });
const data = manualCache.get('myKey');
manualCache.delete('myKey');
manualCache.clear();
```
### Pagination helper
Paging past the first page of a search endpoint needs an API key. The client below reads it from `DEXPAPRIKA_API_KEY`; a [free key](https://console.dexpaprika.com) pages without limit. Without a key the second page returns `403` with `"param": "cursor"`.
**pagination**
```javascript theme={null}
import { DexPaprikaClient } from 'dexpaprika-sdk';
async function fetchAllPools(networkId, maxPages = 10) {
const client = new DexPaprikaClient();
const allPools = [];
const limit = 50;
let cursor;
// Every page is one request against your allowance, so cap the walk
for (let page = 0; page < maxPages; page++) {
const response = await client.pools.listByNetwork(
networkId,
{
limit,
sort: 'desc',
orderBy: 'volume_usd_24h',
cursor
}
);
allPools.push(...response.results);
// The search endpoint is cursor-paginated, not page-numbered
if (!response.has_next_page || !response.next_cursor) break;
cursor = response.next_cursor;
// Pause between pages to stay under your per-minute limit:
// https://docs.dexpaprika.com/knowledge-base/rate-limits
await new Promise(resolve => setTimeout(resolve, 4000));
}
console.log(`Fetched a total of ${allPools.length} pools on ${networkId}`);
return allPools;
}
// Usage example
fetchAllPools('ethereum').catch(console.error);
```
### Custom configuration
**configuration**
```javascript theme={null}
import { DexPaprikaClient } from 'dexpaprika-sdk';
// Create client with custom configuration
const client = new DexPaprikaClient(
'https://api.dexpaprika.com', // Base URL (optional)
{ // axios request config (optional)
timeout: 60000, // 60 second timeout
headers: {
'User-Agent': 'MyApp/1.0 DexPaprikaSDK'
}
},
{
// Retry configuration (optional)
retry: {
maxRetries: 5,
delaySequenceMs: [100, 500, 1000, 2000, 5000],
retryableStatuses: [429, 500, 502, 503, 504]
},
// Cache configuration (optional)
cache: {
ttl: 10 * 60 * 1000, // 10 minutes TTL
maxSize: 500, // Store up to 500 responses
enabled: true // Enable caching
}
}
);
// Usage example
async function fetchWithCustomClient() {
try {
const networks = await client.networks.list();
console.log(`Fetched ${networks.length} networks with custom client`);
} catch (err) {
console.error('Error:', err);
}
}
```
## Resources
* [GitHub Repository](https://github.com/coinpaprika/dexpaprika-sdk-ts)
* [DexPaprika Website](https://dexpaprika.com)
* [API Reference](/api-reference/introduction)
## API status
The DexPaprika API provides consistent data with stable endpoints. Requests are answered without an API key on the free tier, and a free key raises the credit allowance. We aim to maintain backward compatibility and provide notice of any significant changes.
### FAQs
> [accordion] Do I need an API key with this SDK?
>
> Not to start. Keyless requests work at 10,000 credits per rolling 30 days per IP, and a [free registered key](https://console.dexpaprika.com/dashboard) raises that to 100,000 with no card.
> [accordion] How do I find identifiers?
>
> Use Coverage Checker or list Networks and query Tokens/Pools to discover addresses.
> [accordion] How do I get historical or transactions data?
>
> Use pools/transactions endpoints with `pool_address`, `network`, and time/paging params as documented. Transactions need a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`.
> [accordion] What about rate limiting?
>
> 15 requests a minute keyless, 30 with a [free key](https://console.dexpaprika.com) and 500 on Pro, against 10,000 credits keyless and 100,000 with a free key over a rolling 30 days, or 5,000,000 a month on Pro. Retry transient HTTP errors with backoff. See [rate limits](/knowledge-base/rate-limits) for how the counters work, and [Pro pricing](https://dexpaprika.com/api/pricing) for what the 5,000,000 credit tier costs.
# DEX API for on-chain liquidity and swaps
Source: https://docs.dexpaprika.com/introduction
A DEX API for liquidity pools, swaps, OHLCV and token prices across 35 chains. Call it right now with no key and no signup. REST plus SSE streaming.
DexPaprika is a DEX API for on-chain market data: liquidity pools, swap transactions, OHLCV
history and token prices across 35 blockchain networks, over REST and over SSE streaming.
**No signup to start.** No key, no card, no email. This returns the current price of SOL right now:
```bash theme={null}
curl "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112"
```
A [free API key](https://console.dexpaprika.com) raises the per-minute rate and the monthly
allowance and opens every streaming feed, and still needs no card. Current allowances and prices
are on the [pricing page](https://dexpaprika.com/api/pricing).
> [!TIP]
>
> See also: [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks),
> [Liquidity pool endpoint](/api-reference/pools/get-a-pool-on-a-network),
> [Swap transactions](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages),
> [Token data](/api-reference/tokens/get-a-tokens-latest-data-on-a-network),
> [Real-time streaming](/streaming/introduction)
> [card] [Quick API reference](/api-reference/introduction)
>
> Jump straight into the API documentation and start making requests within minutes
> [card] [Follow tutorials](/tutorials/tutorial_intro)
>
> Learn step-by-step how to integrate DexPaprika into your applications
> [card] [Stream real-time data](/streaming/introduction)
>
> Subscribe to live token prices, pool reserves and swap transactions over SSE. Prices need no key on 34 showcase assets; a free key opens prices and reserves on any token; transactions need a paid plan. No polling.
## DEX API quickstart
\[!TIP] You can also make your first request directly in our API Playground available in the API Reference section. Visit [GET Token](/api-reference/tokens/get-a-tokens-latest-data-on-a-network) to try it out.
In the next steps we will make a GET request to the [Token](/api-reference/tokens/get-a-tokens-latest-data-on-a-network) endpoint in order to get the latest price in USD of SOL. All we need is the network ID and the token address.
* Network ID: `solana`
* Token address: `So11111111111111111111111111111111111111112`
\[!NOTE] You can find the list of all supported networks in the [Networks](/api-reference/networks/get-a-list-of-available-blockchain-networks) endpoint.
**1. Make a GET request**
Simply make a GET request to the following endpoint in order to fetch latest data about any token. In this case we will use the specified above network ID and token address to populate the endpoint in a format of `https://api.dexpaprika.com/networks/{network_id}/tokens/{address}`.
```bash bash theme={null}
curl -X GET "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112"
```
```python python.py theme={null}
import requests
response = requests.get("https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112")
print(response.json())
```
```javascript javascript.js theme={null}
fetch("https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112")
.then(response => response.json())
.then(data => console.log(data));
```
**2. Get latest data about Solana (SOL)**
This will return quite lengthy response of the latest data about Solana (SOL) that will look similar to this. We send a lot of data in the response, so in the next step we will extract only the price of SOL in USD.
```json Response [expandable] theme={null}
{
"id": "So11111111111111111111111111111111111111112",
"name": "Wrapped SOL",
"symbol": "SOL",
"chain": "solana",
"decimals": 9,
"total_supply": 9729104.429281628,
"description": "",
"website": "https://solana.com",
"has_image": true,
"added_at": "2026-08-10T14:20:16Z",
"price_stats": {
"high_24h": 105.2222398215612,
"low_24h": 101.7557716484886,
"ath": 2094.381880389729,
"ath_date": "2025-02-18T22:43:00Z"
},
"summary": {
"chain": "solana",
"id": "So11111111111111111111111111111111111111112",
"price_usd": 103.80801725347543,
"fdv": 1009959040.4557314,
"liquidity_usd": 553505769.7967274,
"pools": 12897286,
"24h": {
"volume": 49644910.41035922,
"volume_usd": 5148862944.818152,
"sells": 17537961,
"buys": 10792419,
"txns": 28330380,
"buy_usd": 2338055804.0819945,
"sell_usd": 2810807140.736158,
"last_price_usd_change": 0.6781950008702846
},
"6h": {
"volume": 12456183.587342199,
"volume_usd": 1299454515.4826088,
"sells": 4440706,
"buys": 2451162,
"txns": 6891868,
"buy_usd": 593480507.282577,
"sell_usd": 705974008.2000318,
"last_price_usd_change": -0.21690798406796685
},
"1h": {
"volume": 2084186.3205519284,
"volume_usd": 216030300.54251012,
"sells": 741684,
"buys": 408334,
"txns": 1150018,
"buy_usd": 99891646.27039005,
"sell_usd": 116138654.27212007,
"last_price_usd_change": -0.1472757911066832
},
"30m": {
"volume": 1004748.8770371348,
"volume_usd": 104112790.66620025,
"sells": 378988,
"buys": 213688,
"txns": 592676,
"buy_usd": 47812329.58183849,
"sell_usd": 56300461.08436176,
"last_price_usd_change": 0.23928305430469934
},
"15m": {
"volume": 497530.0271521555,
"volume_usd": 51622450.059017375,
"sells": 189987,
"buys": 110343,
"txns": 300330,
"buy_usd": 24039604.05452173,
"sell_usd": 27582846.004495647,
"last_price_usd_change": 0.1522228820748769
},
"5m": {
"volume": 156540.3813851585,
"volume_usd": 16240562.550119922,
"sells": 62237,
"buys": 36579,
"txns": 98816,
"buy_usd": 7513931.736361665,
"sell_usd": 8726630.813758258,
"last_price_usd_change": 0.011172859580195807
},
"1m": {
"volume": 18507.42904617516,
"volume_usd": 1919881.560174483,
"sells": 6720,
"buys": 3610,
"txns": 10330,
"buy_usd": 900147.1867926873,
"sell_usd": 1019734.3733817958,
"last_price_usd_change": 0
}
},
"last_updated": "2026-09-09T11:40:47.439035121Z",
"twitter": "https://twitter.com/solana"
}
```
**3. Extract the price (or any other data)**
As you can see, the response is very rich of data. You can extract only the price of SOL in USD from the full response by navigating to the `summary` object (*or any other object*) and then to the `price_usd` key (*or any other key*) simply by modyfying the previously used GET request:
```bash bash theme={null}
curl -s "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112" | jq '.summary.price_usd'
```
```python python.py theme={null}
import requests
response = requests.get("https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112")
print(response.json()["summary"]["price_usd"])
```
```javascript javascript.js theme={null}
fetch("https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112")
.then(response => response.json())
.then(data => {
const onlyPrice = data.summary.price_usd;
console.log(onlyPrice);
});
```
And as a result you will get the price of SOL in USD:
```json summary.price_usd theme={null}
103.80801725347543
```
Congratulations! You just successfully retrieved the latest price of SOL in USD!
> [!NOTE]
>
> **Need more than the free allowance?** The [Pro API](/api-pro/introduction) raises the monthly
> allowance and the per-minute rate, serves real-time data instead of the free tier's delay, and
> adds dedicated infrastructure and priority support. Current allowances, prices and checkout are
> on the [pricing page](https://dexpaprika.com/api/pricing). Enterprise is the same API with its
> limits raised for your workload.
**Pool search:** [filter pools](/tutorials/pool-filtering) by volume, liquidity, transactions, and creation date on `/networks/{network}/pools/search`. Plus [batch token prices](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network) in a single request.
## Need real-time data?
The REST API is the right choice when you're querying historical or on-demand data. For applications that need live updates the moment a swap or liquidity change settles on-chain, DexPaprika ships four SSE streaming feeds. No polling and no log decoding. Prices stream with no API key on the 34 showcase assets; reserves need a free key, and transactions and candles a paid plan.
> [card] [Token price streaming](/streaming/introduction)
>
> Subscribe to USD price updates for any token across 35 chains. An event is pushed when a swap moves the price, so the rate tracks how actively the asset trades.
> [card] [Pool reserves streaming](/streaming/reserves-streaming)
>
> Pool reserve deltas, USD-denominated, pushed for each block in which a subscribed pool's reserves changed. For any DEX pool or any token.
## Next steps
> [card] [Quick API reference](/api-reference/introduction)
>
> Jump straight into the API documentation and start making requests within minutes
> [card] [Follow tutorials](/tutorials/tutorial_intro)
>
> Learn step-by-step how to integrate DexPaprika into your applications
> [card] [Use an SDK](/get-started/sdk-ts)
>
> Official TypeScript, Python, Go and PHP clients, each taking an optional API key
> [card] [Connect an AI agent](/ai-integration/index)
>
> A hosted MCP server, plus LangChain, CrewAI, the Vercel AI SDK, n8n, Cursor and Claude
## Popular use cases
> [card] Track token prices
>
> Get real-time and historical price data for any token across 35 blockchains
> [card] Monitor liquidity
>
> Access detailed liquidity pool data across major DEXes on any network
> [card] Trading analytics
>
> Analyze trading volumes, price changes, and market trends
> [card] DEX aggregation
>
> Compare prices and liquidity across different DEXes
## DexPaprika API support
We're here to help you succeed with DexPaprika.
> [card] [Join Discord community](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support
> [card] [Give feedback](mailto:support@coinpaprika.com)
>
> Share your experience and help us improve
## DEX API by network
Every network has its own page with the DEXes we index there, its largest pools and a live
streaming sample. The value in brackets is the `network` parameter to pass in your requests.
[Aptos](https://dexpaprika.com/api/aptos) (`aptos`),
[Arc](https://dexpaprika.com/api/arc) (`arc`),
[Arbitrum](https://dexpaprika.com/api/arbitrum) (`arbitrum`),
[Avalanche](https://dexpaprika.com/api/avalanche) (`avalanche`),
[Base](https://dexpaprika.com/api/base) (`base`),
[Berachain](https://dexpaprika.com/api/berachain) (`berachain`),
[Binance Smart Chain](https://dexpaprika.com/api/bsc) (`bsc`),
[BOB Network](https://dexpaprika.com/api/bob_network) (`bob_network`),
[Celo](https://dexpaprika.com/api/celo) (`celo`),
[Cronos](https://dexpaprika.com/api/cronos) (`cronos`),
[Ethereum](https://dexpaprika.com/api/ethereum) (`ethereum`),
[Fantom](https://dexpaprika.com/api/fantom) (`fantom`),
[Flow EVM](https://dexpaprika.com/api/flow_evm) (`flow_evm`),
[HyperEVM](https://dexpaprika.com/api/hyperevm) (`hyperevm`),
[Katana](https://dexpaprika.com/api/katana) (`katana`),
[Linea](https://dexpaprika.com/api/linea) (`linea`),
[Mantle](https://dexpaprika.com/api/mantle) (`mantle`),
[MegaETH](https://dexpaprika.com/api/megaeth) (`megaeth`),
[Monad](https://dexpaprika.com/api/monad) (`monad`),
[Optimism](https://dexpaprika.com/api/optimism) (`optimism`),
[Plasma](https://dexpaprika.com/api/plasma) (`plasma`),
[Polygon](https://dexpaprika.com/api/polygon) (`polygon`),
[Robinhood Chain](https://dexpaprika.com/api/robinhood) (`robinhood`),
[Ronin](https://dexpaprika.com/api/ronin) (`ronin`),
[Scroll](https://dexpaprika.com/api/scroll) (`scroll`),
[Sei](https://dexpaprika.com/api/sei) (`sei`),
[Solana](https://dexpaprika.com/api/solana) (`solana`),
[Sonic](https://dexpaprika.com/api/sonic) (`sonic`),
[Sui](https://dexpaprika.com/api/sui) (`sui`),
[Tempo](https://dexpaprika.com/api/tempo) (`tempo`),
[Ton](https://dexpaprika.com/api/ton) (`ton`),
[Tron](https://dexpaprika.com/api/tron) (`tron`),
[Unichain](https://dexpaprika.com/api/unichain) (`unichain`),
[x Layer](https://dexpaprika.com/api/x_layer) (`x_layer`),
[ZkSync](https://dexpaprika.com/api/zksync) (`zksync`)
To check a specific token, pool or DEX before you write any code, use the
[coverage checker](/tools/coverage-checker). [Coverage](/coverage) is the canonical record of what
we index and is regenerated from the live API daily. The
[networks endpoint](/api-reference/networks/get-a-list-of-available-blockchain-networks) returns
the same list as JSON.
### FAQs
> [accordion] Do I need an API key?
>
> Not to start. No key, no card, no email: a curl works right now. [Registering a free key](https://console.dexpaprika.com) raises both the per-minute rate and the 30-day allowance, and still needs no card. Current figures are on the [pricing page](https://dexpaprika.com/api/pricing) and in [rate limits](/knowledge-base/rate-limits).
> [accordion] What data can I query?
>
> Liquidity pools, swap transactions, token metrics/prices, and network coverage across multiple chains.
> [accordion] How do I find a pool or token identifier?
>
> Use the Coverage Checker tool or the Networks/Token endpoints to locate addresses.
> [accordion] How fast is the data?
>
> Collection is near real-time and REST responses reflect the latest indexed blocks and events. Your plan sets the ceiling: the free tier is served with a short delay, Pro is real time. The current delay is stated on the [pricing page](https://dexpaprika.com/api/pricing). For push updates, use the [streaming API](/streaming/introduction) (SSE).
> [accordion] Does DexPaprika offer real-time streaming?
>
> Yes. Four SSE feeds: `/sse/prices` pushes token-price updates, `/sse/reserves` pushes pool reserve deltas per block in which reserves changed, `/sse/transactions` pushes individual swaps with USD amounts, and `/sse/ohlcv` pushes sealed token candles to paid plans on `streaming-pro.dexpaprika.com`. Prices and reserves run on `streaming.dexpaprika.com`; transactions and candles on `streaming-pro.dexpaprika.com`. Prices stream with no API key on 34 showcase assets, one per chain. Reserves need a [free key](https://console.dexpaprika.com), which also opens prices on every token. Transactions, like candles, need a paid plan (Dev, Pro or Enterprise) on `streaming-pro.dexpaprika.com`. See the [Streaming introduction](/streaming/introduction) or the [reserves deep-dive](/streaming/reserves-streaming).
> [!NOTE]
>
> **Looking for enterprise solutions?** We offer dedicated support, higher rate limits, and custom features.
> [Contact our team](mailto:support@coinpaprika.com) to learn more.
# Common patterns and workflows
Source: https://docs.dexpaprika.com/knowledge-base/common-patterns
Standard workflows for DexPaprika API: looking up token prices, finding pools, getting historical data, filtering pools, batch pricing, and combining REST with streaming for real-time updates.
## 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:**
```bash theme={null}
curl "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112"
```
The price is at `response.summary.price_usd`.
**When you only know the token name or symbol:**
1. Search first:
```bash theme={null}
curl "https://api.dexpaprika.com/search?query=jupiter"
```
2. From the `tokens` array in the response, find the matching token. Note the `chain` and `id` (address) fields.
3. Call the token endpoint:
```bash theme={null}
curl "https://api.dexpaprika.com/networks/{chain}/tokens/{id}"
```
***
## Pattern 2: Compare prices of multiple tokens
Use batch pricing when you need prices for 2 to 10 tokens on the same network. It needs an API key; a free key is enough:
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" "https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
```
Response is an array of `{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
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?limit=10&order_by=volume_usd_24h&sort=desc"
```
**Sorting options for `order_by`:** `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `created_at`, `price_usd`, `price_change_percentage_48h`, `price_change_percentage_24h`, `price_change_percentage_6h`, `price_change_percentage_1h`, `price_change_percentage_5m`. Anything else returns HTTP 400 with the valid list in the message.
**Pagination:** Cursor-based. Read `has_next_page` and `next_cursor`, then pass `next_cursor` back as `cursor`. The first page works without a key; paging needs an API key, and a [free key](https://console.dexpaprika.com) pages without limit.
The response wraps rows in a `results` array (not `pools`).
***
## Pattern 4: Find pools for a specific token
```bash theme={null}
curl "https://api.dexpaprika.com/networks/solana/pools/search?token_address=So11111111111111111111111111111111111111112&order_by=volume_usd_24h&sort=desc&limit=5"
```
This returns pools on that network containing the token, sorted by volume. The highest-volume pool is typically the best source for price data and OHLCV history.
The [token pools tutorial](/tutorials/token-pools) walks through this pattern end to end, with cursor paging and the migration table for the removed endpoint.
**Network-scoped only:** The `token_address` filter works on `GET /networks/{network}/pools/search`. The cross-network `GET /pools/search` ignores it until 23 November 2026 and answers `400` (`unknown_param`) from that date. One token per query: repeating `token_address` is not a pair filter. Until 23 November 2026 the API uses one of the values (not guaranteed by order); from that date a repeated parameter answers `400` (`repeated_param`). An unknown address returns HTTP 200 with an empty `results` array.
> [!NOTE]
>
> The old `GET /networks/{network}/tokens/{token_address}/pools` endpoint was removed and returns `410 Gone`. Its `reorder` and second-token `address` parameters have no equivalent on pool search.
***
## Pattern 5: Get historical price data (OHLCV)
OHLCV data is per pool, not per token. The workflow is:
1. **Find the best pool.** Take the highest-volume pool for the token:
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?token_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&order_by=volume_usd_24h&sort=desc&limit=1"
```
2. **Get OHLCV data** for that pool:
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/{pool_address}/ohlcv?start=-24h&interval=1h&limit=24"
```
**Intervals:** `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h`
**`start` is required.** Give it a relative offset such as `-24h` (the last 24 hours), an ISO 8601 date or a UNIX timestamp. Optional `end` parameter, same formats. Max 1000 data points per request. `start` and `end` must fall inside your plan's history window and `interval` must be one your plan allows, or the API answers `403`: see [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan).
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 pool search endpoint to find pools matching specific conditions:
```bash theme={null}
# High-volume Ethereum pools
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?volume_usd_24h_min=100000&order_by=volume_usd_24h&sort=desc"
# New Solana pools with activity (created in the last 7 days)
curl "https://api.dexpaprika.com/networks/solana/pools/search?created_after=-7d&txns_24h_min=50&order_by=created_at&sort=desc"
```
**Available filter parameters:**
| Parameter | Type | Description |
| - | - | - |
| `volume_usd_24h_min` | number | Minimum 24h volume in USD |
| `volume_usd_24h_max` | number | Maximum 24h volume in USD |
| `volume_usd_7d_min` / `_max` | number | 7-day volume in USD |
| `volume_usd_30d_min` / `_max` | number | 30-day volume in USD |
| `liquidity_usd_min` / `_max` | number | Pool liquidity in USD |
| `txns_24h_min` | integer | Minimum transactions in last 24h |
| `price_change_percentage_24h_min` / `_max` | number | 24h price change, percent |
| `price_change_percentage_48h_min` / `_max` | number | 48h price change, percent |
| `price_change_percentage_6h_min` / `_max` | number | 6h price change, percent |
| `price_change_percentage_1h_min` / `_max` | number | 1h price change, percent |
| `price_change_percentage_5m_min` / `_max` | number | 5m price change, percent |
| `created_after` | string | Only pools created at or after this time: unix seconds or relative (`-24h`, `-7d`), RFC3339 or `YYYY-MM-DD`. Keyless and free keys do not see the last hour ([search freshness](/knowledge-base/rate-limits#search-freshness)) |
| `created_before` | string | Only pools created at or before this time, same formats |
| `order_by` | string | `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `created_at`, `price_usd`, `price_change_percentage_48h`, `price_change_percentage_24h`, `price_change_percentage_6h`, `price_change_percentage_1h`, `price_change_percentage_5m` |
| `sort` | string | `asc` or `desc` |
| `limit` | integer | Items per page (default: 50, maximum 100) |
| `cursor` | string | Pass `next_cursor` from the previous response to page forward. Needs an API key |
All filters combine with AND logic. The response wraps rows in a `results` array (not `pools`) and pages with `has_next_page` + `next_cursor` (cursor-based; there is no `page_info`/`total_pages`).
> [!NOTE]
>
> Use the canonical `volume_usd_*` parameter names (e.g. `volume_usd_7d_min`, `volume_usd_30d_max`). The volume, liquidity, and transaction filters are all functional. Older short names like `volume_7d_min` are ignored until 23 November 2026 and answer `400` (`unknown_param`) from then on.
>
> Percentage filters take signed numbers, so `price_change_percentage_1h_max=-20` screens for pools down 20 percent or more over the last hour. Only the 24h window works on tokens; 48h, 6h, 1h and 5m are pool-only. Token search takes the 24h window for both sorting and filtering, rejects the other four as `order_by` with a 400, and silently drops them as `_min` / `_max` bounds.
***
## Pattern 7: Monitor pool transactions
Transactions are a [paid-only endpoint](/knowledge-base/rate-limits#paid-only-endpoints): Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`. Keyless calls and free keys get `403`.
```bash theme={null}
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api-pro.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?limit=20&page=1"
```
Transactions are returned in reverse chronological order. Each includes:
* `amount_0`, `amount_1`: token amounts
* `volume_0`, `volume_1`: volumes
* `price_0_usd`, `price_1_usd`: USD prices for each token
* `token_0_symbol`, `token_1_symbol`: token symbols
* `type`: `swap`, `add`, or `remove`
* `created_at`: timestamp
**Pagination:** Max 100 pages. For deep history, use `cursor` parameter (a transaction ID) instead of page numbers.
***
## Pattern 8: Discover DEXes on a network
```bash theme={null}
# List all DEXes on a network
curl "https://api.dexpaprika.com/networks/solana/dexes"
# Get pools for a specific DEX
curl "https://api.dexpaprika.com/networks/solana/pools/search?dex_name=raydium&order_by=volume_usd_24h&sort=desc&limit=10"
```
> [!NOTE]
>
> The old `GET /networks/{network}/dexes/{dex}/pools` endpoint was removed and returns `410 Gone`. The DEX is now the `dex_name` filter on pool search, which takes the `dex_id` from the DEX list above (`raydium`, `uniswap_v3`). Display names such as `Uniswap V3` match nothing and return an empty `results`. Rows come back under `results` with `has_next_page` + `next_cursor`, and the sort field is `volume_usd_24h`.
***
## Pattern 9: Stream live prices
For real-time updates, use the streaming API instead of polling REST.
**Single token (GET):**
```bash theme={null}
curl -N "https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
```
**Multiple tokens (POST), up to 25 per connection:**
```bash theme={null}
curl -N -X POST "https://streaming.dexpaprika.com/sse/prices" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '[
{"chain": "solana", "address": "So11111111111111111111111111111111111111112", "method": "token_price"},
{"chain": "ethereum", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "method": "token_price"}
]'
```
Each SSE event:
```
data: {"address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","chain":"ethereum","price":"2255.59","timestamp":1778847592,"timestamp_price":1778847592,"token_price":1778847592}
event: token_price
```
The `price` field is a string, not a number, so parse it as a decimal for precision. Open additional connections in parallel if you need more than 25 subscriptions, up to **10 concurrent SSE streams** keyless or on a free key (30 on Dev, 100 on Pro).
***
## Pattern 10: REST + Streaming combined
The most common production pattern:
1. **REST for discovery.** Use search, token details, and pool listing to find what you want to track
2. **Validate.** Confirm the tokens exist and have pricing data via REST
3. **Stream for live updates.** Open an SSE connection for real-time prices
4. **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/search?order_by=volume_usd_24h&sort=desc` |
| Find pools for a specific token | `GET /networks/{network}/pools/search?token_address={address}` |
| Filter pools by volume/txns/age | `GET /networks/{network}/pools/search?volume_usd_24h_min=X` |
| Get historical candlestick data | `GET /networks/{network}/pools/{pool}/ohlcv?start=X&interval=24h` |
| See recent swaps on a pool (paid plans) | `GET /networks/{network}/pools/{pool}/transactions` |
| List DEXes on a network | `GET /networks/{network}/dexes` |
| Get pools on a specific DEX | `GET /networks/{network}/pools/search?dex_name={dex_id}` |
| Stream live prices | `GET https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=X&address=Y` |
| Get API stats | `GET /stats` |
### FAQs
> [accordion] 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.
> [accordion] What replaced the old pool list and filter endpoints?
>
> `GET /networks/{network}/pools`, `/pools`, and `/networks/{network}/pools/filter` were removed (they return `410 Gone`). Use `GET /networks/{network}/pools/search` (single network) or `GET /pools/search` (multiple networks via a `chains` filter). The search response wraps rows in a `results` array; each pool uses `id` (the pool address), `volume_usd_24h`, and `transactions_24h`. Pagination is cursor-based (`has_next_page` + `next_cursor`).
> [accordion] 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 via `GET /networks/{network}/pools/search?token_address={address}&limit=1` (the default sort is `volume_usd_24h` descending).
> [accordion] What replaced the token pools endpoint?
>
> `GET /networks/{network}/tokens/{token_address}/pools` was removed (it returns `410 Gone`). Use `GET /networks/{network}/pools/search` with the `token_address` query parameter. The filter is network-scoped only: the cross-network `GET /pools/search` ignores it until 23 November 2026 and answers `400` (`unknown_param`) from that date. The old `reorder` and second-token `address` parameters have no equivalent.
> [accordion] What replaced the DEX pools endpoint?
>
> `GET /networks/{network}/dexes/{dex}/pools` was removed (it returns `410 Gone`). Use `GET /networks/{network}/pools/search` with the `dex_name` query parameter, which takes the `dex_id` field from `GET /networks/{network}/dexes` (`uniswap_v3`), matched case-insensitively. Passing that response's `dex_name` field instead, a display name like `Uniswap V3`, returns an empty `results` array rather than an error. Unlike `token_address`, `dex_name` also works on the cross-network `GET /pools/search`. Rows come back under `results` with `has_next_page` + `next_cursor`, and the 24h volume field is `volume_usd_24h`, not `volume_usd`.
# Core concepts
Source: https://docs.dexpaprika.com/knowledge-base/concepts
Understand the key concepts behind DexPaprika: blockchain networks, DEXes, liquidity pools, tokens, OHLCV data, and how on-chain data flows from blockchains to the API.
## How DexPaprika works
DexPaprika indexes on-chain activity from 35 blockchain networks in near real-time. It watches smart contract events on decentralized exchanges (DEXes), extracts swap transactions, liquidity changes, and price data, and serves it through a REST API and SSE streaming API.
```
Blockchains → Indexer → DexPaprika API → Your app / AI agent
(35 chains) (near real-time) (REST + Streaming)
```
No API key needed to start. Just make HTTP requests, and [register a free key](https://console.dexpaprika.com) when you want the higher allowance.
***
## Networks
A **network** (also called a chain or blockchain) is the underlying blockchain where DEXes operate. Each network has its own token addresses and pool addresses.
DexPaprika currently supports 35 networks including Ethereum, Solana, Base, Arbitrum, Polygon, BSC, Optimism, Avalanche, Fantom, Sui, Aptos, TON, Tron, and more.
Every API call that involves a specific token or pool requires a `network` parameter, the lowercase identifier like `ethereum`, `solana`, `bsc`, `base`.
```bash theme={null}
# List all supported networks
curl "https://api.dexpaprika.com/networks"
```
The response is a JSON array of objects with `id` and `display_name`.
***
## DEXes (Decentralized Exchanges)
A **DEX** is a decentralized exchange protocol, a set of smart contracts that allows users to swap tokens without an intermediary. Examples: Uniswap, Raydium, PancakeSwap, Curve.
Each DEX operates on one or more networks. For instance, Uniswap V3 runs on Ethereum, Arbitrum, Base, Polygon, and others.
In DexPaprika, DEXes are identified by a `dex_id` string like `uniswap_v3`, `raydium`, `pancakeswap_v3`.
```bash theme={null}
# List DEXes on Ethereum
curl "https://api.dexpaprika.com/networks/ethereum/dexes"
```
***
## Liquidity pools
A **liquidity pool** is a smart contract that holds reserves of two (or more) tokens. Users swap one token for the other, and the pool's reserves shift accordingly. That shift is how prices are determined on a DEX.
Each pool has:
* **Pool address**: the smart contract address on-chain
* **Token pair**: the two tokens in the pool (e.g., USDC/WETH)
* **Liquidity**: the total USD value of tokens held in the pool
* **Volume**: how much has been traded through the pool in a time period
* **Transactions**: how many swap/add/remove events happened
* **Price**: the current exchange rate between the two tokens
Pools are the central data object in DexPaprika. Most queries revolve around finding pools, inspecting them, and tracking their activity.
```bash theme={null}
# Get the top pool on Ethereum by volume
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?limit=1&order_by=volume_usd_24h&sort=desc"
```
***
## Tokens
A **token** is a digital asset on a blockchain, identified by its contract address. The same token concept (like "USDC") can exist on multiple networks with different addresses.
DexPaprika tracks token data by aggregating activity across all pools that contain that token. The token endpoint returns:
* **Price in USD**: aggregated from pool data
* **Fully diluted valuation (FDV)**
* **Liquidity**: total across all pools
* **Volume and transactions**: across multiple time windows (24h, 6h, 1h, 30m, 15m, 5m, 1m)
* **Buy/sell counts and USD values**
* **Price stats**: 24h high/low and all-time high
```bash theme={null}
# Get SOL token data on Solana
curl "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112"
```
The price is at `response.summary.price_usd`.
***
## OHLCV data
**OHLCV** stands for Open, High, Low, Close, Volume. That is the standard candlestick format used in financial charts.
DexPaprika provides OHLCV data per pool (not per token). To get historical price data for a token, first find its highest-volume pool, then request OHLCV data for that pool.
Available intervals: `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h`
Limits: up to 1000 data points per request. How far back you can reach and how fine the candles can be depends on your plan: without a key you get `1h` and up over the last 24 hours. See [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan).
```bash theme={null}
# Hourly candles for the USDC/WETH pool on Uniswap V3 over the last 24 hours, no key needed
curl "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/ohlcv?start=-24h&interval=1h&limit=24"
```
***
## Transactions
**Transactions** are individual on-chain events on a pool: swaps, liquidity additions, and removals. Each transaction includes token amounts, USD values, prices, and timestamps.
Transactions are returned in reverse chronological order and are available for any pool. The endpoint is [paid-only](/knowledge-base/rate-limits#paid-only-endpoints): call it on `api-pro.dexpaprika.com` with a Dev, Pro or Enterprise key. Keyless calls and free keys get `403`.
```bash theme={null}
# Recent transactions for a pool (paid plan)
curl -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://api-pro.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?limit=10"
```
***
## Search
The **search** endpoint lets you find tokens, pools, and DEXes by name, symbol, or address across all networks. Use this when you don't know the exact network or address for something.
```bash theme={null}
# Find "Jupiter" across all networks
curl "https://api.dexpaprika.com/search?query=jupiter"
```
The response includes `tokens`, `pools`, and `dexes` arrays with matching results.
***
## Pool filtering
The **pool search** endpoint lets you search for pools matching specific criteria: volume range, liquidity, transaction count, and creation date. This is useful for building pool screeners or finding recently created pools with significant activity.
```bash theme={null}
# Ethereum pools with >$100k daily volume, sorted by volume
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?volume_usd_24h_min=100000&order_by=volume_usd_24h&sort=desc"
```
***
## Streaming (real-time prices)
The **streaming API** delivers real-time price updates via Server-Sent Events (SSE). Instead of polling the REST API repeatedly, you open one connection and receive a price update whenever a swap moves the price. The rate tracks trading activity, from about 1 update a minute on a quiet asset to about 52 on a busy one.
Base URL: `https://streaming.dexpaprika.com`
```bash theme={null}
# Stream WETH price on Ethereum
curl -N "https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
```
Each `token_price` SSE event contains: `address`, `chain`, `price` (string, USD), and unix timestamps (`timestamp`, `timestamp_price`). The legacy `t_p` method emits the compact `{a, c, p, t, t_p}` shape and is **deprecated**.
***
## Key things to know
* **No authentication needed to start**: keyless requests work, and a free key raises the allowance
* **Credit allowance**: 10,000 credits per rolling 30 days keyless (100,000 with a [free API key](https://console.dexpaprika.com)), at 15 requests a minute keyless and 30 with a key; one request costs one credit, batch endpoints one credit per item
* **Pagination**: the search endpoints are cursor-based (read `has_next_page`, pass `next_cursor` back as `cursor`), and paging past the first page needs an API key (a free key pages without limit). Only `GET /networks/{network}/dexes` and `GET /networks/{network}/pools/{pool_address}/transactions` still take `page`, and those are 1-indexed (`page=0` is silently treated as page 1)
* **Max page size**: 100 items per page across all endpoints
* **Addresses are case-sensitive**: use the exact on-chain format
* **Prices are numbers** in REST responses but **strings** in streaming SSE events (for decimal precision)
* **OHLCV is per pool, not per token**: find the highest-volume pool first, then request candles
### FAQs
> [accordion] What's the difference between DexPaprika and CoinPaprika?
>
> DexPaprika covers on-chain DEX data (pools, swaps, on-chain token prices). CoinPaprika covers centralized exchange data (market cap rankings, exchange listings, global metrics). They're separate APIs from the same company.
> [accordion] How fresh is the data?
>
> The indexer processes new blocks as they arrive, typically within seconds of on-chain confirmation. What you see depends on your plan: the free tier is served with a delay of up to 60 seconds, [Pro](https://dexpaprika.com/api/pricing) is real time.
> [accordion] Can I trade or swap through DexPaprika?
>
> No. DexPaprika is read-only. It provides market data but does not execute trades.
# The console: keys, usage and billing
Source: https://docs.dexpaprika.com/knowledge-base/console
Where to get an API key, rotate it, watch what you have spent, connect an AI client and find your invoices.
Everything account-shaped lives in one place: [console.dexpaprika.com](https://console.dexpaprika.com). Your key, what you have spent this period, the errors your calls returned, the MCP setup for AI clients, and billing.
You do not need it to start. The API answers keyless requests, and a key is what raises the allowance and unlocks any-token streaming. See [pricing](https://dexpaprika.com/api/pricing) for what each tier includes.

## What each section is for
| Section | What you do there |
| - | - |
| **Dashboard** | The one-screen answer to "am I fine?". Current plan, credits spent against the cap, whether autoscaling is on, and when the next billing cycle starts |
| **Usage** | The same numbers with history: which endpoints you call, how the spend moved day to day |
| **Error Log** | What your failed calls actually returned. Start here before assuming the API is down |
| **API Keys** | Reveal, copy, revoke. One active key per account |
| **MCP & AI Setup** | Ready-made configuration for Claude, Cursor, Cline and anything else that speaks MCP |
| **Billing** | Plan and billing period, the autoscaling switch, and invoices with an export |
| **Notifications** | Where quota and billing alerts are delivered |
## Frequently asked
> [accordion] Where do I get an API key?
>
> **API Keys** in the sidebar. A key is generated for your account, and there is exactly one active key at a time.
>
> The same screen shows the base URLs your key is valid for. Free keys authenticate against `https://api.dexpaprika.com` and `https://streaming.dexpaprika.com`. Pro moves you to `https://api-pro.dexpaprika.com` and `https://streaming-pro.dexpaprika.com`.
>
> That pairing matters: a free key sent to a Pro host answers `403 wrong_host`, and the body tells you which host to use.
>
> If you have just moved to Pro, read [upgrading to Pro](/api-pro/upgrading) before your first call, and [403 Forbidden (wrong host)](/knowledge-base/error-handling#403-forbidden-wrong-host) if you already have the error in front of you.
>
> 
> [accordion] How do I rotate my key?
>
> Revoke the current one, then generate a new one. Both buttons are on the **API Keys** screen.
>
> Because there is one active key per account, rotation is a break: the old key stops working the moment you revoke it. Have the new key ready to deploy before you press it, and if the key lives in a hosted environment, remember it is usually stored as a secret rather than in the code.
> [accordion] How do I authenticate a request?
>
> Put the key in the `Authorization` header, on its own:
>
> ```bash theme={null}
> curl "https://api.dexpaprika.com/networks/ethereum/pools/search" \
> -H "Authorization: api_YOUR_KEY_HERE"
> ```
>
> The key is the entire `Authorization` header value, with nothing in front of it and nothing after it. This is easy to trip over, since almost every other API expects a scheme word first. If your HTTP client only offers a token field that prepends one for you, set a raw header instead.
> [accordion] Where are my invoices?
>
> **Billing**, at the bottom of the page, with an export control for pulling them out. Until your first payment the section says so rather than sitting empty, so an empty list is not a sign that something failed.
>
> The same screen carries the rest of the money: your current plan with the period it runs for and the autoscaling switch.
>
> The dashboard shows the next billing cycle at a glance. If it reads no active subscription, you are on a free tier and there is nothing to invoice.
>
> 
> [accordion] What is autoscaling?
>
> It is how you keep going past the monthly allowance on Dev and Pro. Leave the switch off and the allowance is a hard stop, exactly like a free tier. Turn it on and once the plan is spent, extra credits are bought automatically at \$20 per million, up to a spending limit you set on the same screen. You decide the ceiling once and then stop thinking about it.
>
> If your account already holds a credit pack, those credits sit alongside the plan allowance and drain with it, and Billing shows what is left. New packs are not on the [pricing page](https://dexpaprika.com/api/pricing); autoscaling is how you add credits now.
>
> Autoscaling is a paid-plan control. On a free tier it is visible but inactive.
> [accordion] How do I know how much I have spent?
>
> The dashboard card **Usage this period** is the short answer: credits used against your monthly cap, with the percentage. **Usage** breaks it down over time and by endpoint, so you can see which call is doing the spending.
>
> One request costs one credit. Batch endpoints charge one credit per item, and each delivered streaming update costs one credit too. See [plan your credit usage](/knowledge-base/credit-usage) for how to size a workload before you build it.
> [accordion] What happens when I run out of credits?
>
> On a free tier the cap is hard: the API answers `402` and the body names the next step for your tier. Nothing is charged, and the allowance refills continuously as usage older than 30 days ages out, so there is no date to wait for and the body carries no `resets_at`.
>
> On Pro you can let it keep going. The dashboard calls this **autoscaling**: with it off the cap behaves like the free tier, with it on the overage is charged per additional block up to the monthly spend limit you set. See [error handling](/knowledge-base/error-handling) for the difference between a `402` and a `429`, which is worth getting right in code: a `429` is a per-minute rate limit and is worth retrying, a `402` is the monthly allowance and retrying will not help.
> [accordion] How do I connect Claude, Cursor or Cline?
>
> **MCP & AI Setup** generates the configuration with your key already filled in, for Claude Code, Claude Desktop and any client that takes a JSON config.
>
> The hosted server speaks two transports. Streamable HTTP, which is what current clients use:
>
> ```
> https://mcp.dexpaprika.com/streamable-http
> ```
>
> and SSE, for older clients:
>
> ```
> https://mcp.dexpaprika.com/sse
> ```
>
> Authentication is the same `Authorization` header as REST. Full setup per client is in [the hosted MCP guide](/ai-integration/hosted-mcp-server).
>
> 
> [accordion] Do I need an account to try the API?
>
> No. Keyless requests work at 10,000 credits per rolling 30 days per IP, with no signup and no card. Registering a free key raises that to 100,000 and lifts the streaming restriction from the [showcase list](/streaming/showcase-streams) to any token we index.
# Plan your credit usage
Source: https://docs.dexpaprika.com/knowledge-base/credit-usage
Work out what your workload actually costs before you commit to a plan. Real measured update rates, four worked cost models, and the point where streaming stops costing less than polling.
An HTTP call is a request; what it spends is a credit. One request costs one credit, batch endpoints cost one credit per item, and every update delivered over a stream costs one credit. This page turns that rule into numbers you can plan against, so you can answer "will 5M credits a month cover me?" before you pay for anything.
If you only read one section, read [stream or poll](#stream-or-poll). Streaming does not automatically cost less, and on a fast-moving asset it is dramatically more expensive.
## The allowances
| Tier | Credit allowance | Requests per minute |
| - | - | - |
| Free, no key | 10,000 per IP, rolling 30 days | 15 |
| Free, registered key | 100,000, rolling 30 days | 30 |
| Dev | 500,000 per billing month, then \$20 per additional 1M | 120 |
| Pro | 5,000,000 per billing month, then \$20 per additional 1M | 500 |
| Enterprise | Agreed per contract | Agreed per contract |
Full detail on the [rate limits page](/knowledge-base/rate-limits). Plans are on [pricing](https://dexpaprika.com/api/pricing).
The free allowances are a rolling 30-day window, not a calendar month, so the figures below are consumption rates rather than budgets that refill on the 1st. A heavy month keeps its weight for 30 days; see [how the allowance refills](/knowledge-base/rate-limits#how-the-allowance-refills).
## What a stream actually costs
Streams are pushed only when a value changes, so cost tracks the asset's update rate, not the number of connections you hold open. That rate varies enormously.
### What sets the update rate
Prices are derived from swaps, so **an update happens when a swap moves the price**. Two things bound that:
* **Swap activity.** The dominant factor, and in practice the binding one. A heavily traded asset produces a steady stream of price-moving swaps; a thinly traded one produces almost none.
* **The recompute cadence.** Our pricing pipeline recomputes on a sub-second cycle, which sets an upper bound. No asset streams faster than that, and almost none get close.
Fast blocks alone do not mean a fast stream. A chain can produce blocks quickly and still yield few updates, because with little trading there are no swaps to move the price.
The gap is larger than most people expect, but it is not proportional to raw activity, and that catches people out. On 15 September `/networks` reported about **31.3M transactions on Solana against 18,500 on Cronos**, a ratio near 1,700 to 1. The price streams for those two chains differed by a factor of **13**. Trading activity sets the direction, not the multiple, because prices are recomputed on a cadence rather than once per swap. So the mental model that holds is **you pay for how actively the asset trades**, not for how long you stay connected, and you should not scale an estimate off transaction counts.
These are real measurements, taken 2026-09-15 from two 7 minute samples of `/sse/prices` on the keyless tier, eight assets streaming concurrently and then a quieter six. Credits per 30 days is the measured rate times 43,200. Treat them as the right order of magnitude rather than a guarantee, since trading activity changes hour to hour:
| Asset | Updates per minute | Credits per 30 days | Share of Pro (5M credits) |
| - | - | - | - |
| WBNB (bsc) | 56.4 | 2,436,480 | 49% |
| SOL (solana) | 52.0 | 2,246,400 | 45% |
| WETH (base) | 31.3 | 1,352,160 | 27% |
| WETH (optimism) | 22.7 | 980,640 | 20% |
| WAVAX (avalanche) | 20.4 | 881,280 | 18% |
| WETH (arbitrum) | 20.3 | 876,960 | 18% |
| WPOL (polygon) | 14.7 | 635,040 | 13% |
| WETH (ethereum) | 5.6 | 241,920 | 5% |
| WCRO (cronos) | 4.0 | 172,800 | 3% |
| WETH (linea) | 1.1 | 47,520 | 1% |
| WFTM (fantom) | 0.0 | 0 | 0% |
Two things fall out of this table immediately.
**A single busy asset can dominate a plan.** One continuous WBNB subscription is roughly 2.4M credits over 30 days, about half of everything Pro includes. Two such assets and you are out. Note that the busiest asset measured was on BNB Chain rather than Solana, so do not assume the chain you think of as the fastest is the one that will cost you most.
**The free tiers are not built for continuous streaming of a busy asset.** At 56 updates a minute, WBNB exhausts the 10,000 keyless allowance in about **3 hours**, and the 100,000 registered allowance in **about 30 hours**. A quiet asset is a different story entirely: WETH on Linea at 1.1 a minute runs about **6 days** keyless and roughly two months on a registered key, and WFTM delivered nothing at all in seven minutes, which costs exactly nothing. The range across eleven wrapped natives was 0 to 56 updates a minute, so the asset you pick matters more than any other decision on this page.
> [!NOTE]
>
> The connection caps are separate from your credit allowance: 25 subscriptions per connection, and 10 concurrent streams keyless (per IP) or on a free key, 30 on Dev, 100 on Pro. Those limit concurrency, not spend.
## Stream or poll
The honest answer: **streaming saves you credits only when you would otherwise poll faster than the asset changes.** Streaming's real benefit is latency and freshness, not cost.
Polling costs exactly what you choose:
| Poll interval | Credits per asset per 30 days |
| - | - |
| Every 1 second | 2,592,000 |
| Every 10 seconds | 259,200 |
| Every 60 seconds | 43,200 |
| Every 5 minutes | 8,640 |
Now compare against the measured rates. The crossover is simply whether the asset's update rate is above or below your poll rate:
* **WBNB at 56.4 updates a minute.** Streaming costs 2,436,480 credits. Polling once a minute costs 43,200. Polling is **56 times less**, at the price of being up to 60 seconds stale.
* **WETH on ethereum at 5.6 a minute.** Streaming costs 241,920 credits. Polling every 10 seconds costs 259,200. Close to break even, with streaming slightly ahead on both cost and freshness.
* **WETH on linea at 1.1 a minute.** Streaming costs 47,520 credits. Polling every 10 seconds costs 259,200. **Streaming costs about 5 times less** and is fresher.
The rule of thumb:
* If you need sub second freshness, stream. Nothing else gets you there, and the cost is the cost.
* If a minute of staleness is acceptable and the asset is busy, poll. It costs far less.
* If the asset is quiet, stream. You pay almost nothing and get instant updates.
## Four worked models
### 1. Price ticker on 10 assets
A dashboard streaming 10 mixed assets, say 3 busy and 7 quiet, averaging about 15 updates a minute each:
```
10 assets x 15 updates/min x 60 x 24 x 30 = 6,480,000 credits/month
```
That is over Pro's 5M. Options: drop to the 5 assets users actually watch, or poll the quiet ones and stream only the busy ones.
### 2. Portfolio refresh, 50 tokens, every 5 minutes
Batch endpoints cut latency and per-minute request pressure, not credits: each token still bills as one credit.
```
50 tokens x 288 refreshes/day x 30 = 432,000 credits/month
```
That is more than four times a registered free key's 100,000, so this shape needs Pro, or a far slower refresh. Every 10 minutes is 216,000 and every 15 minutes is 144,000, both still over; every 30 minutes is 72,000 and fits.
Cache the static half (names, decimals, pool pairs) either way, since it costs nothing extra to keep.
### 3. Drain detection on 25 pools
Reserve streams emit per block in which reserves change, which is far less often than prices tick. Assume about 4 updates a minute per pool:
```
25 pools x 4 updates/min x 60 x 24 x 30 = 4,320,000 credits/month
```
Fits Pro with headroom. This is the workload streaming is genuinely built for: you cannot poll your way to catching a one block drain.
### 4. Backfill plus live
Size these separately. A one off historical pull is a fixed cost:
```
500 pools x 365 daily candles / 1,000 per request = ~500 requests, 500 credits, once
```
Then add the steady state streaming figure from above. Backfill is almost never the expensive half.
## Cutting real time spend without losing freshness
* **Subscribe to fewer, higher signal assets.** Cost scales with what you watch, not with connections. Ten idle assets on one connection still bill for every update.
* **Split "must be live" from "can be stale."** Stream the price your UI shows in real time; cache names, decimals, pool pairs and completed candles. Completed OHLCV candles never change.
* **Filter server side.** `liquidity_usd_min` and the other threshold filters keep pages small so you pull fewer rows overall.
* **Poll the boring ones.** A stablecoin pinned to \$1.00 does not need a live stream.
* **Disconnect when nobody is watching.** A dashboard nobody has open still bills for every update it receives.
## Check your own numbers
Usage is visible in [console.dexpaprika.com](https://console.dexpaprika.com), and `GET /usage` returns the same figures for an authenticated key. Both count credits.
The reliable way to size a workload is to measure it: subscribe to exactly what you intend to run, leave it for ten minutes, and multiply. The table above was produced this way, and a ten minute sample of your own assets will beat any estimate on this page.
## Which plan do I need?
Take your total from the models above, then:
* **Under 10,000 credits per rolling 30 days:** the free tier, no key needed to start.
* **10,000 to 100,000:** register a free key.
* **100,000 to 5M:** [Pro](https://dexpaprika.com/api/pricing), \$99 a month. Pro calls a different host with a key; read [upgrading to Pro](/api-pro/upgrading) before you migrate your client.
* **Over 5M:** Pro plus \$20 per additional 1M, or talk to us about Enterprise on the [Pro API page](/api-pro/introduction) if streaming volume is the driver, since Enterprise limits are set to the workload.
If the number lands just over a tier boundary, revisit the list above before upgrading. Dropping three idle assets from a ticker usually costs less than the next plan.
## FAQs
> [accordion] Does a streaming update really cost the same as a REST call?
>
> Yes. One request costs one credit, and each update delivered over a stream costs one credit. Connections themselves are free; what you pay for is updates delivered.
> [accordion] Does streaming cost less than polling?
>
> Only if the asset updates less often than you would poll. On a busy asset like SOL, streaming can cost 50 times more than polling once a minute. On a quiet asset it costs a fraction. Stream for freshness, poll for thrift.
> [accordion] Does batching save me credits?
>
> No. Batch endpoints collapse several round trips into one HTTP call, which cuts latency, connection overhead and pressure on the per-minute request limit, but each token still bills as one credit. Ten tokens cost ten credits either way.
> [accordion] Do idle connections cost anything?
>
> No. Updates are pushed only when a value changes, so an idle market costs nothing. The cost is entirely a function of how often what you subscribed to moves.
# Error handling and troubleshooting
Source: https://docs.dexpaprika.com/knowledge-base/error-handling
Complete guide to DexPaprika API error codes, common issues, and troubleshooting steps for REST API and Streaming API.
## REST API errors
All REST API errors return a JSON object with a `message` field (and sometimes an `error` field). Here's every status code you can encounter:
### 200 Success
Normal response. Parse the JSON body.
One important edge case: **batch pricing** (`GET /networks/{network}/multi/prices`) returns HTTP 200 with an empty array `[]` when none of the requested tokens have pricing data. This is not an error. It means the tokens were processed but none had prices.
***
### 400 Bad Request
The request was malformed or contained invalid parameters. `param` names the offending parameter, and where there is a fixed set the message lists the accepted values:
```json theme={null}
{
"error": "invalid_param",
"message": "invalid query parameters: order_by (must be one of [volume_usd_24h volume_usd_7d volume_usd_30d liquidity_usd txns_24h created_at price_usd price_change_percentage_24h price_change_percentage_6h price_change_percentage_48h price_change_percentage_1h price_change_percentage_5m])",
"param": "order_by"
}
```
REST errors carry `error`, a stable code to branch on (`invalid_param` here), and a human `message`. Match on `error` in code, since message text can change.
A required parameter that is absent has its own code, `missing_param`, with `param` naming it:
```json theme={null}
{"error": "missing_param", "message": "invalid query param: start (is required)", "param": "start"}
```
From 23 November 2026, a parameter name the endpoint does not accept answers `400` with `unknown_param`. `allowed` lists the names the endpoint takes, and `violations` lists every name that was refused:
```json theme={null}
{"error":"unknown_param","message":"invalid query parameters: limit (unknown parameter)","param":"limit","allowed":["query"],"violations":[{"in":"query","param":"limit","error":"unknown_param"}]}
```
A name in the wrong case, such as `INTERVAL`, answers `wrong_case_param` with the right name in `expected`. The same name sent twice, such as `chains=ethereum&chains=base`, answers `repeated_param`: send one `chains=ethereum,base` instead. Until 23 November these requests return `200` and the parameter is ignored.
**Common causes:**
* Invalid `order_by` on `/networks/{network}/pools/search`. The accepted values are `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `created_at`, `price_usd`, `price_change_percentage_48h`, `price_change_percentage_24h`, `price_change_percentage_6h`, `price_change_percentage_1h` and `price_change_percentage_5m`. The older `volume_usd` spelling is rejected
* Invalid `order_by` on `/networks/{network}/tokens/search`, which takes a **different** list: `volume_usd_24h`, `volume_usd_7d`, `volume_usd_30d`, `liquidity_usd`, `txns_24h`, `price_change_percentage_24h`, `created_at` and `fdv_usd`
* Sorting tokens by price. Do not read `price_usd` out of the token 400 body and retry with it. That value appears in the message, and `order_by=price_usd` on either token search path answers with a second `400`. Ordering tokens by raw price is not supported. Sort by `volume_usd_24h` or `liquidity_usd` instead and read `price_usd` off the rows you get back. The eight values listed above are the ones that actually return `200`
* Sorting tokens by a pool-only price change window. The 48h, 6h, 1h and 5m windows exist on pool search only, so passing one as `order_by` to either token search endpoint returns a `400`
* Using an unknown parameter **name**, a name in the wrong case, or the same name twice. From 23 November 2026 these answer `400` with `unknown_param`, `wrong_case_param` or `repeated_param`, as shown above. Until then an unknown name is dropped, so `sort_by=` or `volume_24h_min=` returns 200 with default ordering and no filter applied
* Invalid `interval` value for OHLCV (must be one of: `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h`)
* Batch pricing with more than 10 tokens
* Batch pricing with zero tokens (empty `tokens` parameter)
* Invalid UNIX timestamp format in filter parameters
* Missing required parameters, such as `start` for OHLCV, `tokens` for batch pricing or `indicator` for indicators. These answer `missing_param` rather than `invalid_param`
**What to do:** Check the parameter values against the [API reference](/api-reference/introduction) or [common patterns](/knowledge-base/common-patterns).
***
### 404 Not Found
The requested resource doesn't exist. `resource` says what was missing:
```json theme={null}
{"error": "not_found", "message": "pool not found", "resource": "pool"}
```
An unknown network is its own code, so you can tell a wrong chain ID from a wrong address:
```json theme={null}
{"error": "unsupported_network", "message": "unsupported network", "param": "network"}
```
**Common causes:**
* Invalid network ID (e.g., `eth` instead of `ethereum`, `sol` instead of `solana`)
* Token address doesn't exist on that network
* Pool address doesn't exist on that network
* Typo in the URL path
**What to do:**
1. Verify the network ID by checking `GET /networks`
2. Use `GET /search?query={name}` to find the correct network and address
3. Check that the address format matches the chain (e.g., `0x...` for EVM chains, base58 for Solana)
***
### 410 Gone
The endpoint has been permanently removed. The body names its own replacement:
```json theme={null}
{"code": 410, "message": "endpoint removed", "replacement": "/networks/:network/pools/search"}
```
**Currently applies to (all return `410 Gone`):**
* `GET /pools`: use `GET /pools/search` instead.
* `GET /networks/{network}/pools`: use `GET /networks/{network}/pools/search` instead.
* `GET /networks/{network}/pools/filter`: use `GET /networks/{network}/pools/search` instead.
* `GET /networks/{network}/dexes/{dex}/pools`: use `GET /networks/{network}/pools/search?dex_name={dex}` instead.
* `GET /networks/{network}/tokens/{token_address}/pools`: use `GET /networks/{network}/pools/search?token_address={token_address}` instead.
* `GET /networks/{network}/tokens/filter`: use `GET /networks/{network}/tokens/search` instead.
* `GET /networks/{network}/tokens/top`: use `GET /networks/{network}/tokens/search` instead.
The whole route is removed in each case, not just the specific network, DEX, or token. A nonsense DEX slug on `/networks/{network}/dexes/{dex}/pools` returns the same 410, not a 404, which is how you tell a removed endpoint from a bad identifier.
***
### 401 Unauthorized
The `Authorization` header is missing, or its value is not a valid key.
**The key goes in the header on its own**, with no scheme word in front of it. This
is the single most common cause of a 401 here, because almost every other API
expects the opposite.
```bash theme={null}
# correct
curl -H "Authorization: api_YOUR_KEY" "https://api-pro.dexpaprika.com/networks"
# none of these work
curl -H "Authorization: ApiKey api_YOUR_KEY" ...
curl -H "Authorization: Token api_YOUR_KEY" ...
curl -H "Authorization: Basic api_YOUR_KEY" ...
```
Send the key on its own. A request carrying a scheme word in front of it is not the
documented form, and on the Pro host it is indistinguishable from a wrong key.
**What you see can differ by host**, which is why this is harder to diagnose than it
should be. `api-pro.dexpaprika.com` sits behind an edge rule that can reject a request
before it reaches the API, answering **HTTP 403 with an HTML page** rather than the JSON
error above. If you get an HTML body from an API that otherwise always answers JSON,
check the header format and the base URL first, before you start regenerating the key.
**What to do:** send the key as the entire header value, starting with `api_`. If you
are using an SDK or an HTTP client that prepends a scheme word for you, which many do
when you fill in a token field, set a raw header instead.
A key that is correct but sent to the wrong base URL returns [403](#403-forbidden-wrong-host),
not 401.
If you have just upgraded and this is your first call to `api-pro.dexpaprika.com`, start
from [upgrading to Pro](/api-pro/upgrading): the host needs an `Authorization` header
carrying your key on every request, including the root path.
***
### 402 Payment Required
Your credit allowance is exhausted. This is not a rate limit, and retrying does not help. On free tiers the allowance refills gradually, an hour at a time, as usage ages out of a rolling 30-day window; on Pro it returns at the start of the next billing period, or when you add credits.
The body is structured and names the next step for your tier:
```json theme={null}
{
"error": "payment_required",
"tier": "keyless",
"message": "Credit limit for the last 30 days reached for unauthenticated use. Register for a free API key to get more credits/month.",
"credits": { "limit": 10000, "used": 10000, "remaining": 0 }
}
```
There is no `resets_at` here. Keyless and free credits age out of a rolling 30-day window continuously, so there is no moment the counter returns to zero; Dev and Pro 402s carry the field, holding the end of the billing period. A 402 deliberately carries no `Retry-After` header either, which is how you tell it apart from a 429 in code.
**What to do:**
* Keyless and over 10,000: [register a free API key](https://console.dexpaprika.com) for 100,000 credits per rolling 30 days, no card
* On a free key and over 100,000: move to [Dev or Pro](https://dexpaprika.com/api/pricing) for 500,000 or 5,000,000 per billing period
* On Dev or Pro: turn on autoscaling in [console.dexpaprika.com](https://console.dexpaprika.com), which adds credits at \$20 per additional 1,000,000 up to the spending limit you set, and track what you have spent there
* Either way, size the workload first with [plan your credit usage](/knowledge-base/credit-usage)
***
### 403 Forbidden (wrong host)
Your free key is valid, but it reached a host that serves paid plans only: free keys are served on `api.dexpaprika.com`, paid keys on `api-pro.dexpaprika.com`. Endpoints, paths and parameters are identical on both hosts; only the base URL changes.
```json theme={null}
{
"error": "wrong_host",
"tier": "free",
"message": "This API key is on the free plan, but this host serves paid plans only. Send your requests to https://api.dexpaprika.com instead - endpoints, paths and parameters are identical, and your free monthly credits apply there. Update the base URL in your client and retry, or upgrade to a paid plan to use this host.",
"links": {
"api": "https://api.dexpaprika.com",
"docs": "https://docs.dexpaprika.com/",
"coupon": "https://dexpaprika.com/api/pricing?coupon=START10"
}
}
```
**What to do:** update the base URL in your client and retry. Nothing is wrong with the key or the plan. [Upgrading to Pro](/api-pro/upgrading) has the full host and header mapping, and a one-line `/usage` check that confirms a paid key is set up correctly.
***
### 403 Forbidden (paid-only endpoint)
The endpoint is limited to paid plans. Pool transactions over REST, token OHLCV, `/sse/transactions` and `/sse/ohlcv` answer this to keyless callers and to free keys, regardless of remaining credits. The body is the `plan_required` envelope:
```json theme={null}
{
"error": "plan_required",
"tier": "keyless",
"required_tier": "dev",
"message": "this endpoint requires a Dev or Pro plan",
"links": {
"register": "https://console.dexpaprika.com",
"pricing": "https://dexpaprika.com/api/pricing",
"docs": "https://docs.dexpaprika.com/",
"coupon": "https://dexpaprika.com/api/pricing?coupon=START10"
}
}
```
* `tier` is the plan the request was served as: `keyless` or `free`.
* `required_tier` is the lowest plan that unlocks the endpoint (`dev` here).
* `links.register` appears for keyless callers; a free key gets `links.upgrade` instead, when configured.
OHLCV requests outside the plan's window use the same `plan_required` envelope with one extra field, `param`, naming the query parameter that broke the limit (`interval`, `start`, `end` or `count_back`), and a `message` naming the plan that lifts it. Examples on [OHLCV limits by plan](/knowledge-base/rate-limits#ohlcv-limits-by-plan).
**What to do:** do not retry. Use a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com` (REST) or `streaming-pro.dexpaprika.com` (SSE). Plans are on [pricing](https://dexpaprika.com/api/pricing); the list of gated endpoints is on the [rate limits page](/knowledge-base/rate-limits#paid-only-endpoints).
***
### 429 Too Many Requests
Per-minute request rate exceeded. This is separate from the credit allowance, which returns 402 instead. A 429 carries a `Retry-After` header giving the seconds to wait.
**Free tier limit:** 15 requests a minute without a key, 30 with a [free key](https://console.dexpaprika.com), against an allowance of 10,000 credits per rolling 30 days without a key (100,000 with a free key). Pro allows 500 requests a minute against 5,000,000 credits.
**What to do:**
* Retry after the number of seconds in `Retry-After`
* Cache responses for data that changes rarely (network lists, DEX lists)
* Use batch pricing instead of individual token requests. It does not reduce credits, but it does reduce HTTP calls, which is what the per-minute limit counts
* Use the streaming API for live prices instead of polling
* Consider the [Pro API](/api-pro/introduction) for 500 requests a minute
***
### 500 Internal Server Error
Something went wrong on our side.
**What to do:** Retry with exponential backoff (wait 1s, then 2s, then 4s, etc.). If the error persists, check our [Discord](https://discord.gg/DhJge5TUGM) for status updates or contact support.
***
## Streaming API errors
The streaming API at `https://streaming.dexpaprika.com` can fail in two ways: HTTP errors before the stream starts, or SSE error events during an active stream.
### HTTP errors (before stream starts)
| Status | Meaning |
| - | - |
| 200 | Connected successfully, streaming |
| 403 | `{"error":"plan_required"}` on `/sse/transactions` or `/sse/ohlcv` without a paid key. A keyless stream outside the [showcase assets](/streaming/showcase-streams), or on reserves, gets `{"error":"preview_only"}` instead |
| 400 | Bad parameters, unsupported chain, token not found, or one invalid asset in a batch. Body looks like `{"message": "asset not found: ethereum/0xdead... (not found)"}` |
| 429 | Stream limit exceeded. Most often your plan's concurrent-stream cap (10 keyless per IP, 10 on a free key, 30 on Dev, 100 on Pro). Keyless, for example: `{"error":"rate_limited","tier":"keyless","message":"Concurrent stream limit reached for your plan. Close an open stream before starting another."}`, plus `links`. Close a stream first. The per-route rate limit and the global stream slot pool also return 429 |
**The 400 behavior is strict:** In a POST request with multiple tokens, if even one token is invalid, the entire request fails. Validate all tokens via the REST API before streaming them.
### SSE errors (during active stream)
If something goes wrong during an active stream, the error arrives as an SSE event:
```
event: error
data: {"message": "..."}
```
**What to do:** Close the connection and reconnect with exponential backoff.
***
## Pagination gotchas
Two styles are in play, and mixing them up is the most common migration bug.
**Cursor-based**, which covers every search endpoint (`/networks/{network}/pools/search`, `/pools/search`, `/networks/{network}/tokens/search`, `/tokens/search`): read `has_next_page` and pass `next_cursor` back as `cursor`. There is no `page` parameter and no `page_info` object. Passing `page` here does nothing: unknown query parameters are dropped silently and you get a plausible-looking first page back every time. Paging needs an API key: a keyless request that sends `cursor` gets `403` with `"error": "plan_required"`, `"required_tier": "free"` and `"param": "cursor"`. A free key pages without limit, so treat that `403` as a missing key, not a reason to retry.
**Page-based**, which is now only `GET /networks/{network}/dexes` and `GET /networks/{network}/pools/{pool_address}/transactions`: `page=1` returns the first page and `page=0` is silently treated as `page=1`.
Maximum page size is 100 items (via `limit` parameter) in both styles. Transaction pagination is limited to 100 pages; for deeper history use the `cursor` parameter there too.
***
## Common mistakes and fixes
> [accordion] Getting empty results from pool search
>
> **Symptom:** `GET /networks/{network}/pools/search` returns `{"results": [], "has_next_page": false}`
>
> **Cause:** Filters are too strict (for example a high `volume_usd_24h_min` on a quiet network), or a very small `limit`.
>
> **Fix:** Loosen the filters, or use `limit=10` or higher. Note the response wraps rows in `results` and pages with `next_cursor`, not `page_info`.
> [accordion] Search returns no results for a known token
>
> **Symptom:** `GET /search?query=USDC` returns empty arrays.
>
> **Cause:** Search is best-effort and may not match very common/generic terms well. It searches across tokens, pools, and DEXes.
>
> **Fix:** Try more specific queries (e.g., the token address), or use the token endpoint directly if you know the network and address.
> [accordion] OHLCV returns empty array
>
> **Symptom:** OHLCV request returns `[]`.
>
> **Cause:** The `start` date might be before the pool existed, or the pool may have very low activity in the requested period.
>
> **Fix:** Check the pool's `created_at` field to ensure your date range is valid. Try a broader interval (e.g., `24h` instead of `1h`).
> [accordion] Migrating from the removed pool list/filter endpoints
>
> **Symptom:** Code that used `/pools`, `/networks/{network}/pools`, or `/networks/{network}/pools/filter` now returns `410 Gone`.
>
> **Cause:** Those endpoints were removed. The replacement is `GET /networks/{network}/pools/search` (single network) or `GET /pools/search` (across networks).
>
> **Fix:** Repoint to `*/search` and update params and response handling: `volume_24h_min` becomes `volume_usd_24h_min`, `sort_by` becomes `order_by`, `sort_dir` becomes `sort`, and `page` becomes cursor-based (`has_next_page` + `next_cursor`). The response wraps rows in `results`; each row uses `id` (pool address), `volume_usd_24h`, and `transactions_24h`. See the [pool filtering tutorial](/tutorials/pool-filtering).
> [accordion] Migrating from the removed DEX pools endpoint
>
> **Symptom:** Code that used `/networks/{network}/dexes/{dex}/pools` now returns `410 Gone`.
>
> **Cause:** The endpoint was removed. The DEX moved out of the path and into the `dex_name` filter on pool search.
>
> **Fix:** Call `GET /networks/{network}/pools/search?dex_name={dex}`. `dex_name` takes the DEX id, the `dex_id` field from `GET /networks/{network}/dexes`, matched case-insensitively. That is what the old path segment held, so it is the value already in your code. Passing that response's `dex_name` field instead, a display name like `Uniswap V3`, returns HTTP 200 with an empty `results` array rather than an error, so an empty page here usually means a display name went in where an id belonged.
>
> ```bash theme={null}
> # before
> curl "https://api.dexpaprika.com/networks/ethereum/dexes/curve/pools?order_by=volume_usd&sort=desc&limit=10"
>
> # after
> curl "https://api.dexpaprika.com/networks/ethereum/pools/search?dex_name=curve&order_by=volume_usd_24h&sort=desc&limit=10"
> ```
>
> Three response changes bite here. Rows come back under `results`, not `pools`. Pagination is `has_next_page` + `next_cursor` instead of `page` + `page_info`. And the 24h volume field is `volume_usd_24h`, with no bare `volume_usd` on the row; passing the old `order_by=volume_usd` is rejected with a `400` naming the accepted values.
> [accordion] Streaming connection drops immediately
>
> **Symptom:** Streaming connection returns 400 instantly.
>
> **Cause:** One or more assets in the request are invalid (wrong chain ID, non-existent token address).
>
> **Fix:** Validate every token via the REST API before adding it to a streaming request. In a POST batch, all assets must be valid. One bad asset cancels the entire stream.
### FAQs
> [accordion] Does DexPaprika return rate limit headers?
>
> Not the draft standard `RateLimit-*` family. Every response does carry `X-Api-Plan`, naming the plan the request was evaluated against. For counts, call `GET /usage` or open [console.dexpaprika.com](https://console.dexpaprika.com). See [response headers](/knowledge-base/response-headers).
> [accordion] What happens after a rate limit reset?
>
> The per-minute rate frees up within the next minute; after a 429, wait the `Retry-After` seconds and retry. Credits come back differently per tier: on Dev and Pro the whole allowance returns at `resets_at`, the end of the billing period, and on the free tiers it returns continuously as usage older than 30 days ages out, which is why their 402 carries no such field.
> [accordion] Are there different limits per endpoint?
>
> No. Every endpoint costs one credit per request, with no per-endpoint weights or compute units. The one wrinkle is batch endpoints, which charge one credit per item in the batch.
# Network IDs, addresses, and case sensitivity
Source: https://docs.dexpaprika.com/knowledge-base/identifiers
How to canonicalize network IDs, token addresses, pool addresses, and DEX identifiers when calling the DexPaprika API. Mixed-case inputs return 404 on REST; the MCP layer normalizes.
## Why this matters
When you build code that interpolates user input into API paths, the smallest case mismatch returns a 404 with no helpful explanation. The fix is one line, but you have to know about it.
This page documents which identifiers are case-sensitive, what the canonical form looks like, and what happens at the wire level if you get it wrong.
***
## Network IDs
**Canonical form:** lowercase, underscore-separated.
Examples: `ethereum`, `solana`, `base`, `arbitrum`, `bsc`, `polygon`, `optimism`.
**What the REST API does with non-canonical input:**
```bash theme={null}
curl -o /dev/null -w "%{http_code}\n" "https://api.dexpaprika.com/networks/ETH/pools/search?limit=1"
# 404
curl -o /dev/null -w "%{http_code}\n" "https://api.dexpaprika.com/networks/ethereum/pools/search?limit=1"
# 200
```
`ETH` returns 404. `Ethereum`, `eth`, `Solana` all return 404. Network IDs are strict lowercase canonical at the REST layer.
**What the MCP layer does with non-canonical input:**
The DexPaprika MCP normalizes common synonyms (`eth` → `ethereum`, `sol` → `solana`, `arb` → `arbitrum`, etc.) before calling the REST API. If you are calling the API through the MCP, mixed case and common abbreviations work. If you are calling REST directly, you need to canonicalize yourself.
**Recommended pattern:** always call `GET /networks` once at startup and cache the `id` values. Treat any user-supplied network name as untrusted and map it through your cached list before constructing the URL.
```bash theme={null}
curl -s "https://api.dexpaprika.com/networks" | jq '.[].id'
```
Returns the authoritative list of canonical IDs.
***
## Token and pool addresses
**EVM chains** (Ethereum, BSC, Base, Arbitrum, Polygon, Optimism, Avalanche, and similar): lowercase hex, `0x` prefix, 40 hex characters.
```
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 ← canonical (lowercase)
0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 ← EIP-55 checksum, not what the API returns
```
The API normalizes checksum addresses internally, so both spellings work for input. The response always uses lowercase.
If your code does string comparison between an address from the API and an address from another source (e.g., a wallet, a block explorer, a contract event), lowercase both sides before comparing.
**Solana**: base58-encoded, case-sensitive. There is no concept of "lowercase Solana address." Pass it through exactly as you received it.
```
So11111111111111111111111111111111111111112 ← wrapped SOL, canonical case
```
**Sui, Aptos**: 0x-prefixed hex, similar to EVM. Lowercase canonical.
**TON**: friendly format (base64url) is case-sensitive. Raw format is hex. Use whichever the explorer shows.
***
## DEX identifiers
**Canonical form:** lowercase, underscore-separated.
```
uniswap_v3
raydium
pancakeswap_v3
curve_finance
balancer_v2
```
DEX IDs are returned by `GET /networks/{network}/dexes` and passed to the `dex_name` filter on `GET /networks/{network}/pools/search`. The old `GET /networks/{network}/dexes/{dex}/pools` path took the id as a path segment; it was removed and returns `410 Gone`.
`dex_name` is the one identifier that is not case-strict. It resolves the id case-insensitively, so `dex_name=curve`, `dex_name=Curve` and `dex_name=CURVE` all return the same rows. It resolves only the id. The DEX list returns `dex_id` and `dex_name` on every row, and despite the matching parameter name it is `dex_id` you pass. Feeding it the `dex_name` field, a display name like `Uniswap V3`, returns HTTP 200 with an empty `results` array rather than an error. The `dex_id` form is also what the removed path segment held, so it is the value already sitting in most existing code.
**One catch:** some commit messages and changelog entries refer to DEXes by their on-chain name (e.g., "CronosV3"), but the public API slug is different (e.g., `vvs_v3` on Cronos). Always use the slug returned by the API, never the marketing name.
```bash theme={null}
# Get the authoritative slug list for any chain:
curl -s "https://api.dexpaprika.com/networks/cronos/dexes" | jq '.dexes[].dex_id'
```
***
## Quick reference
```
Network ID: lowercase, snake_case ethereum, solana, base
EVM address: lowercase hex, 0x-prefix 0xa0b8...eb48
Solana address: base58, case-sensitive So111...1112
DEX ID: lowercase, snake_case uniswap_v3
Pool address: same rules as token (per chain)
```
If you get a 404 and the path looks right at a glance, the first thing to check is case on the network ID and DEX ID. The second thing to check is whether you accidentally URL-encoded part of the path.
For other 404 causes, see [Error handling](/knowledge-base/error-handling).
# Joining token data across chains
Source: https://docs.dexpaprika.com/knowledge-base/joining-across-chains
How to safely aggregate token data across multiple chains. Use (chain, address) tuples as the join key, never the symbol. Bridge variants share symbols but have different addresses.
## The silent-merge problem
If you query DexPaprika for "USDC" across several chains and aggregate by symbol, you will silently merge bridge variants into native USDC. The numbers you compute will be wrong. The API will not warn you. Your dashboard will say "USDC volume: \$X billion" and that number will be a quiet lie.
This page explains why, and what to do instead.
***
## Why symbol is not a safe key
A token's `symbol` is metadata. There is no global registry that prevents two different smart contracts from claiming the same symbol. In practice this happens constantly with stablecoins and major tokens, because every cross-chain bridge issues its own representation under the same human-readable name.
Concrete example. Search for "USDC":
```bash theme={null}
curl -s "https://api.dexpaprika.com/search?query=USDC" | jq '.tokens[] | {chain, id, symbol}' | head -30
```
A real slice of the response today:
```
chain=ethereum id=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 symbol=USDC
chain=solana id=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v symbol=USDC
chain=base id=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 symbol=USDC
chain=bsc id=0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d symbol=USDC
chain=arbitrum id=0xaf88d065e77c8cc2239327c5edb3a432268e5831 symbol=USDC
chain=avalanche id=0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e symbol=USDC
```
Six different contracts. Six different `id` (address) values. One shared `symbol`.
If you sum `volume_usd` across these by symbol, you produce a number that includes Avalanche-bridged USDC on Avalanche DEXes, Solana-native USDC on Solana DEXes, and Ethereum-native USDC on Ethereum DEXes, all treated as if they were one token. They are not. They are six tokens that happen to share branding.
The same trap exists for `WETH`, `WBTC`, `USDT`, `DAI`, and most other tokens that have been bridged to multiple chains.
***
## The safe pattern: `(chain, address)` tuple
The only stable global identifier for a token is the combination of the chain it lives on and the contract address on that chain. Every DexPaprika response gives you both fields. Use both.
**Pseudocode:**
```python theme={null}
# Wrong:
totals = defaultdict(float)
for token in all_tokens:
totals[token["symbol"]] += token["volume_usd"]
# Right:
totals = defaultdict(float)
for token in all_tokens:
key = (token["chain"], token["id"].lower())
totals[key] += token["volume_usd"]
```
The `(chain, address)` tuple is unique per token contract globally. There is no overlap. Lowercasing the address (for EVM chains) protects against checksum-vs-lowercase comparison bugs. See [Identifiers](/knowledge-base/identifiers) for the case rules per chain.
***
## When you really do want a cross-chain aggregate
Sometimes the bridge-merged number is the one you want. "How much USDC trading happens globally" is a reasonable question. Just make the merge explicit and intentional, not accidental.
**Pattern:** maintain your own mapping of "this address on this chain is part of the same logical token as that address on the other chain." Bridge tokens are a graph, not a set. The graph changes whenever a new chain integration ships.
Sources for that mapping:
* The bridge's own canonical token list (Wormhole, Stargate, LayerZero, Across, Hop, etc.)
* A symbology service that does this work for you (CoinGecko, CoinMarketCap, our sister product CoinPaprika)
* Manual curation for the handful of tokens you actually care about
What you do not do is aggregate by symbol and assume the result is meaningful.
***
## Searching across chains
When you start from a token name and don't know the chains it lives on, use `GET /search`:
```bash theme={null}
curl -s "https://api.dexpaprika.com/search?query=jupiter" | jq '.tokens[] | {chain, id, name, symbol}'
```
The response is grouped by token (not by chain), and each entry includes the chain it lives on. From there you have your `(chain, address)` pair for any follow-up calls.
For details on what fields the search endpoint returns, see [Common patterns -> Pattern 1](/knowledge-base/common-patterns).
***
## Checklist
Before you ship code that aggregates token data across chains:
1. Confirm your join key is `(chain, address)`, not `symbol`.
2. Lowercase the address for EVM chains before comparing or hashing.
3. If you intentionally collapse bridge variants, document the mapping somewhere a teammate will find.
4. Write a unit test with at least two USDC addresses on different chains, asserting they do not collapse unless you explicitly want them to.
# Rate limits and best practices
Source: https://docs.dexpaprika.com/knowledge-base/rate-limits
DexPaprika API rate limits, pagination rules, caching strategies, and performance optimization tips for building efficient applications.
## Rate limits
| Tier | Credit allowance | Requests per minute | Notes |
| - | - | - | - |
| **Free (no key)** | 10,000 per IP, rolling 30 days | 15 / min | No API key needed to start |
| **Free (registered key)** | 100,000, rolling 30 days | 30 / min | [Free API key](https://console.dexpaprika.com), no card |
| **Dev** | 500,000 per billing month | 120 / min | $30 a month. $20 per additional 1M. Served from [api-pro.dexpaprika.com](/api-pro/introduction), with a key |
| **Pro** | 5,000,000 per billing month | 500 / min | \$20 per additional 1M. Served from [api-pro.dexpaprika.com](/api-pro/introduction), with a key |
| **Enterprise** | Agreed per contract | Agreed per contract | Streaming unmetered |
Free tiers, keyed or keyless, call `api.dexpaprika.com`. Dev, Pro and Enterprise call `api-pro.dexpaprika.com` and must send the key in the `Authorization` header; [upgrading to Pro](/api-pro/upgrading) is the whole change.
When you exceed the per-minute rate, requests return HTTP 429; retry after a short pause. When the credit allowance runs out, requests return HTTP 402, and retrying will not help.
### How the allowance refills
The tiers refill differently, and the difference changes how you pace heavy work.
**Free tiers use a rolling 30-day window.** What counts is your usage over the last 30 days, and the window advances an hour at a time. There is no first-of-the-month reset to wait for: credits come back 30 days after you spent them, to the hour. A burst today therefore constrains you for the next 30 days rather than until the calendar turns over. With a key, `period_started_at` on `GET /usage` shows where your window currently begins.
**Pro and Enterprise reset on the billing period**, anchored to the subscription date, so the whole allowance returns at once.
The practical difference is backfills. Under a calendar month you could spend the allowance and wait for the 1st. Under a rolling window a large one-off pull keeps its weight for a full 30 days, so either spread heavy historical work across days or size it against Pro.
### Requests and credits
An HTTP call is a **request**. What it spends is a **credit**. One request costs one credit, with no compute units and no per-endpoint weights: a light call and a heavy call cost the same. Credits are the customer-facing unit, and they are what [console.dexpaprika.com](https://console.dexpaprika.com), invoices and the [pricing page](https://dexpaprika.com/api/pricing) count.
Two places the distinction matters. The per-minute limit counts requests, so 15 per minute means 15 HTTP calls per minute. Batch endpoints charge one credit per item, so one HTTP call for 10 tokens is 1 request and 10 credits.
> [!NOTE]
>
> Need more headroom? [Pro](/api-pro/introduction) raises the monthly allowance to 5M credits with per-1M overage, and Enterprise is custom. Plans and checkout are on [pricing](https://dexpaprika.com/api/pricing).
## OHLCV limits by plan
The pool OHLCV endpoint (`GET /networks/{network}/pools/{pool_address}/ohlcv`) caps how far back you can query and how fine the candles can be. The cap depends on your plan:
| Plan | Candle intervals | History depth |
| - | - | - |
| **Free (no key)** | `1h`, `6h`, `12h`, `24h` | last 24 hours |
| **Free (registered key)** | `10m` and longer | last 7 days |
| **Dev** | all (`1m` to `24h`) | last 30 days |
| **Pro** | all | unlimited |
| **Enterprise** | all | unlimited |
How the history cap is applied:
* `start` is required and must fall inside the window; `start=-24h` selects the last 24 hours, which every plan may query. `end`, when given, must fall inside it too.
* `count_back` counts candles back from `end`, so `count_back` × `interval` must fit inside the window as well.
* If `start` is inside the window but the range reaches before it, the request succeeds and the start is moved up to the edge of the window. You get a `403` only when the whole range lies before the window.
A request outside the plan's limits returns **HTTP 403** with the `plan_required` envelope. `param` names the parameter that broke the limit, `required_tier` the lowest plan that lifts it, and `message` says the same in words. A free key asking for a month of history:
```json theme={null}
{
"error": "plan_required",
"tier": "free",
"required_tier": "dev",
"param": "start",
"message": "OHLCV history beyond the last 7 days requires a Dev plan (30 days) or a Pro plan (unlimited)",
"links": {"pricing": "https://dexpaprika.com/api/pricing", "docs": "https://docs.dexpaprika.com/", "coupon": "https://dexpaprika.com/api/pricing?coupon=START10"}
}
```
A keyless request for `interval=1m`:
```json theme={null}
{
"error": "plan_required",
"tier": "keyless",
"required_tier": "free",
"param": "interval",
"message": "OHLCV intervals below 1h require an API key (free key: 10m and up, Dev and Pro plans: all intervals)",
"links": {"register": "https://console.dexpaprika.com", "pricing": "https://dexpaprika.com/api/pricing", "docs": "https://docs.dexpaprika.com/", "coupon": "https://dexpaprika.com/api/pricing?coupon=START10"}
}
```
[Token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token) (`GET /networks/{network}/tokens/{token_address}/ohlcv`) needs a paid plan. Keyless requests and free keys get `403` with `"error": "plan_required"` and no `param`, because the whole endpoint is gated (see [paid-only endpoints](#paid-only-endpoints)); Dev and above follow the Dev, Pro and Enterprise rows of the table above.
[Pool indicators](/api-reference/pools/get-a-technical-indicator-for-a-pool) (`GET /networks/{network}/pools/{pool_address}/indicators`) are computed from pool OHLCV candles and follow the same table, for all five indicators, with the same `403` bodies. Without `interval`, a keyless request defaults to `1h` rather than `24h`, since a daily candle does not fit its 24-hour window. [Token indicators](/api-reference/tokens/get-a-technical-indicator-for-a-token) need a paid plan, like token OHLCV.
The interval check runs first: a free key asking for `interval=1m` over a month gets the interval message, not the history one. A `403` is not retryable; fix the parameters or upgrade the plan.
***
## Paid-only endpoints
A few endpoints are not available to keyless callers or free keys at all. They need a Dev, Pro or Enterprise key, on the paid hosts (`api-pro.dexpaprika.com` for REST, `streaming-pro.dexpaprika.com` for SSE):
| Endpoint | Free (no key) | Free (registered key) | Dev / Pro / Enterprise |
| - | - | - | - |
| `GET /networks/{network}/pools/{pool_address}/transactions` | `403` | `403` | full access |
| `GET /sse/transactions` and `POST /sse/transactions` | `403` | `403` | full access |
| `GET /networks/{network}/tokens/{token_address}/ohlcv` ([token OHLCV](/api-reference/tokens/get-ohlcv-data-for-a-token)) | `403` | `403` | full access, within the Dev / Pro history window |
| `GET /networks/{network}/tokens/{token_address}/indicators` ([token indicators](/api-reference/tokens/get-a-technical-indicator-for-a-token)) | `403` | `403` | full access, within the Dev / Pro history window |
| `GET /sse/ohlcv` | `403` | `403` | full access |
The refusal is the `plan_required` envelope without a `param`, returned before any data is read, so it costs no credits. `tier` is `keyless` or `free`; `required_tier` is `dev`:
```json theme={null}
{
"error": "plan_required",
"tier": "keyless",
"required_tier": "dev",
"message": "this endpoint requires a Dev or Pro plan",
"links": {
"register": "https://console.dexpaprika.com",
"pricing": "https://dexpaprika.com/api/pricing",
"docs": "https://docs.dexpaprika.com/",
"coupon": "https://dexpaprika.com/api/pricing?coupon=START10"
}
}
```
Details of every field are in [error handling](/knowledge-base/error-handling#403-forbidden-paid-only-endpoint).
Every other REST endpoint answers on the free tier (subject to the credit and per-minute limits above), `/sse/reserves` opens with a free key, and `/sse/prices` streams keyless on the [showcase assets](/streaming/showcase-streams) and on any token with a key.
***
## Search freshness
Keyless requests and free keys see new pools and tokens in search an hour after they are created. On `GET /networks/{network}/pools/search`, `GET /pools/search`, `GET /networks/{network}/tokens/search` and `GET /tokens/search`, rows created in the last 60 minutes are left out for those two tiers; everything older comes back as before.
| Tier | Newest pool or token in search results |
| - | - |
| **Free (no key)** | Created at least an hour ago |
| **Free (registered key)** | Created at least an hour ago |
| **Dev / Pro / Enterprise** | As soon as it is indexed |
The request still succeeds. Sorting by `created_at` returns the newest rows older than an hour, and a creation window shorter than an hour, such as `created_after=-10m`, returns `200` with an empty `results` array. On a free tier an empty array from a short window says nothing about whether pools were created in it.
To see new pools as they are indexed, call `api-pro.dexpaprika.com` with a Dev, Pro or Enterprise key:
```bash theme={null}
curl -H "Authorization: YOUR_API_KEY" "https://api-pro.dexpaprika.com/networks/solana/pools/search?order_by=created_at&sort=desc&created_after=-10m"
```
Plans and prices are on [pricing](https://dexpaprika.com/api/pricing).
The response does not mark the cutoff: there is no header for it, and `query` echoes the filters you sent, not the hour. A `created_before` later than an hour ago has no effect on these tiers.
A token's pools and a DEX's pools come from `/networks/{network}/pools/search` with a token or DEX filter, so they follow the same delay. `/search` and the pool and token detail endpoints are unchanged: a pool or token you already know the address of answers at any age.
***
## Pagination rules
The search endpoints page with a cursor. `GET /networks/{network}/dexes` and `GET /networks/{network}/pools/{pool_address}/transactions` are the two that still page with numbers.
| Rule | Value |
| - | - |
| **Cursor endpoints** | All `*/search` paths: read `has_next_page`, send `next_cursor` back as `cursor` |
| **Keyless paging** | First page only on `*/search` paths. A keyless request with `cursor` gets `403` `plan_required` with `"param": "cursor"`; any API key, free included, pages without limit |
| **First page** | `page=1` (1-indexed), on the two page-based endpoints only |
| **Page 0 behavior** | Silently treated as page 1 |
| **Max items per page** | 100 (via `limit` parameter) |
| **Default items per page** | 50 on the `*/search` paths; varies on the two page-based endpoints |
| **Transaction pages** | Max 100 pages; use `cursor` for deeper history |
Without an API key, search answers the first page: up to 100 rows with `limit=100`. To read further, send the same request with a free key from the [console](https://console.dexpaprika.com). A keyless request that carries `cursor` is refused with the `plan_required` envelope before any data is read, so it costs no credits:
```json theme={null}
{
"error": "plan_required",
"tier": "keyless",
"required_tier": "free",
"param": "cursor",
"message": "Search results beyond the first page require an API key (free key: all pages). Create one in under a minute at https://console.dexpaprika.com"
}
```
***
## Reduce API calls
### Use batch pricing
Instead of making one request per token:
```
GET /networks/ethereum/tokens/0xc02a.../ → 1 request, 1 credit
GET /networks/ethereum/tokens/0xa0b8.../ → 1 request, 1 credit
GET /networks/ethereum/tokens/0x6b17.../ → 1 request, 1 credit
= 3 requests, 3 credits
```
Use batch pricing for up to 10 tokens at once (it needs an API key; a free key is enough):
```
GET /networks/ethereum/multi/prices?tokens=0xc02a...,0xa0b8...,0x6b17...
= 1 request, billed as 3 credits (one per token)
```
Batching collapses three round-trips into one HTTP call, which cuts latency, connection overhead and pressure on the per-minute request limit. It does not cut your credit spend: each token in the batch bills as one credit, so 10 tokens cost 10 credits whether you fetch them one at a time or together. Batch for speed and for headroom against the per-minute limit, not to save credits.
### Use streaming for real-time data
> [!TIP]
>
> Sizing a workload before you pick a plan? [Plan your credit usage](/knowledge-base/credit-usage) has measured update rates, four worked cost models, and the point where streaming stops costing less than polling.
If you need live prices, don't poll the REST API in a loop. Open one streaming connection instead:
```bash theme={null}
# Polling (bad): 60 requests/minute for 1 token
while true; do curl ...; sleep 1; done
# Streaming (good): 1 connection, updates pushed only when the price moves
curl -N "https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=ethereum&address=0xc02a..."
```
A single POST `/sse/prices` connection accepts up to **25 assets**. Concurrent SSE streams are capped per plan: 10 keyless (counted per IP), 10 on a free key, 30 on Dev and 100 on Pro (counted per account, from any IP). The next stream over the cap returns `429` with `"error":"rate_limited"` and a message starting `Concurrent stream limit reached`; close an open stream before starting another.
Streaming is billed the same way as REST: each update delivered over the stream costs one credit. Because updates are pushed only when a swap moves the price, an idle market costs nothing, but a fast-moving one draws on your credit allowance much as polling would. Budget for the update rate of what you subscribe to, not the number of connections.
### Cache static data
Some data changes rarely and can be cached:
| Data | Cache for |
| - | - |
| Network list (`/networks`) | 24 hours |
| DEX list (`/networks/{n}/dexes`) | 1 hour |
| Token metadata (name, symbol, decimals) | 24 hours |
| Pool token pair info | 24 hours |
| OHLCV historical data (completed candles) | Forever (completed candles don't change) |
Data that changes frequently and should be fetched fresh:
* Token prices
* Pool volumes and transaction counts
* Recent transactions
* Current OHLCV candle (incomplete)
### Request only what you need
* Use `limit` to control page size. Do not fetch 100 items if you need 5
* Use `order_by` and `sort` to get the most relevant results first
* Use the filter endpoint for targeted queries instead of fetching all pools and filtering client-side
***
## Handle errors gracefully
### Implement exponential backoff
When requests fail, don't retry immediately in a tight loop:
```python theme={null}
import time
import requests
def fetch_with_backoff(url, max_retries=3):
for attempt in range(max_retries):
response = requests.get(url)
if response.status_code == 200:
return response.json()
if response.status_code == 429:
wait = 2 ** attempt # 1s, 2s, 4s
time.sleep(wait)
continue
if response.status_code >= 500:
wait = 2 ** attempt
time.sleep(wait)
continue
# 400, 404, 410 -- don't retry, fix the request
response.raise_for_status()
raise Exception("Max retries exceeded")
```
### Don't retry client errors
* **400**: fix the request parameters
* **404**: verify the network ID and addresses
* **410**: use the replacement endpoint
Only retry on **429** (rate limit) and **500** (server error).
***
## Streaming best practices
### Validate before streaming
The streaming API rejects the entire request if any asset is invalid. Always verify tokens exist via REST first:
```python theme={null}
# Validate each token before streaming
for token in tokens:
resp = requests.get(f"https://api.dexpaprika.com/networks/{token['chain']}/tokens/{token['address']}")
if resp.status_code != 200:
tokens.remove(token) # Remove invalid tokens
```
### Use batched POST for multiple tokens
Instead of opening multiple GET connections:
```
# Bad: 3 connections for 3 tokens
GET /sse/prices?method=token_price&chain=ethereum&address=0xaaa...
GET /sse/prices?method=token_price&chain=ethereum&address=0xbbb...
GET /sse/prices?method=token_price&chain=ethereum&address=0xccc...
```
Use one POST connection:
```bash theme={null}
# Good: 1 connection for up to 25 tokens
POST /sse/prices
[
{"chain": "ethereum", "address": "0xaaa...", "method": "token_price"},
{"chain": "ethereum", "address": "0xbbb...", "method": "token_price"},
{"chain": "ethereum", "address": "0xccc...", "method": "token_price"}
]
```
### Reconnect with backoff
Streaming connections can drop (network issues, server restarts). Always implement auto-reconnection:
```python theme={null}
import time
def stream_with_reconnect(url, payload, max_backoff=60):
backoff = 1
while True:
try:
resp = requests.post(url, json=payload, stream=True,
headers={"Accept": "text/event-stream"})
if resp.status_code != 200:
raise Exception(f"HTTP {resp.status_code}")
backoff = 1 # Reset on successful connection
for line in resp.iter_lines():
if line and line.startswith(b'data:'):
process_event(line)
except Exception as e:
print(f"Disconnected: {e}. Reconnecting in {backoff}s...")
time.sleep(backoff)
backoff = min(backoff * 2, max_backoff)
```
### Parse prices as decimals
The streaming `p` field is a string, not a number. Use decimal parsing to avoid floating-point precision issues:
```python theme={null}
from decimal import Decimal
price = Decimal(data['p']) # Not float(data['p'])
```
***
## Production checklist
> [accordion] Before going to production
>
> * [ ] Cache network and DEX lists
> * [ ] Use batch pricing where possible
> * [ ] Use streaming instead of polling for live prices
> * [ ] Implement exponential backoff for retries
> * [ ] Handle all HTTP status codes (200, 400, 404, 410, 429, 500)
> * [ ] Parse streaming prices as decimals, not floats
> * [ ] Validate tokens before adding to streaming connections
> * [ ] Monitor credit spend in [console.dexpaprika.com](https://console.dexpaprika.com) against your tier's allowance (streaming updates included)
> * [ ] Consider [Pro](/api-pro/introduction) if approaching your allowance, and budget time for the base URL and header change it needs
### FAQs
> [accordion] Is there a per-minute rate limit?
>
> Yes. The free tier allows 15 requests a minute without a key and 30 with a [free key](https://console.dexpaprika.com), and Pro allows 500, alongside the credit allowance. Exceeding the per-minute rate returns HTTP 429; retry after a short pause.
> [accordion] What is the difference between a request and a credit?
>
> A request is one HTTP call. A credit is what it spends. One request costs one credit on every plan, with no compute units or per-endpoint multipliers, so the two numbers match except on batch endpoints, where one request charges one credit per item.
> [accordion] Do streaming updates count toward my credits?
>
> Yes. Each price update delivered over an SSE stream costs one credit, the same as a REST call. Updates are pushed only when a swap moves the price, so an idle subscription costs nothing, but an active one draws on your credit allowance.
> [accordion] Can I increase the free tier limit?
>
> Registering for a free API key raises the keyless 10,000 credits to 100,000. Both are measured over a rolling 30 days, not a calendar month. Beyond that, [Pro](/api-pro/introduction) includes 5,000,000 credits a month on the billing period, with per-1M overage.
> [accordion] Can I page through search results without a key?
>
> No. Without a key, search returns the first page, up to 100 rows. Paging with `cursor` needs an API key, and a free key pages without limit. Keyless access is meant for quick tests; a free key also raises your credit allowance.
> [accordion] Why does the OHLCV endpoint return 403?
>
> Your plan's OHLCV window or candle size was exceeded. Without a key you get 1h+ candles over the last 24 hours; a free key gets 10m+ candles over 7 days; Dev gets every interval over 30 days; Pro and Enterprise have no cap. The 403 message says which plan lifts the limit.
# Response headers, caching, and CORS
Source: https://docs.dexpaprika.com/knowledge-base/response-headers
How DexPaprika sets cache-control, what stale-if-error means for your client, current CORS limitations, and the response headers you can rely on.
## Why this matters
The DexPaprika REST API sits behind Cloudflare with caching enabled. The behavior is generally invisible if you are a server-side consumer making fresh requests, but a few headers change what your client should do when the origin is briefly unavailable, and the CORS story is incomplete enough to bite browser-side code.
This page documents the headers you will see today.
***
## Cache-Control
Every successful GET returns a `Cache-Control` header that looks like this:
```
cache-control: public, max-age=60, s-maxage=60, stale-while-revalidate=10, stale-if-error=600
```
Breaking down what each directive means for your client:
| Directive | Meaning |
| - | - |
| `public` | The response may be cached by shared caches (CDN, proxies). |
| `max-age=60` | Your client may serve from its own cache for 60 seconds before revalidating. |
| `s-maxage=60` | Shared caches may serve from cache for 60 seconds. |
| `stale-while-revalidate=10` | After max-age expires, caches may serve stale for 10 more seconds while fetching a fresh copy in the background. |
| `stale-if-error=600` | If revalidation fails, caches may keep serving the stale copy for up to 600 seconds (10 minutes) instead of failing the request. |
The practical effect of `stale-if-error=600` is that a brief origin outage does not break your client. If the API is unreachable, your CDN (or a properly configured HTTP cache library) returns the last-good response with `Age: ` indicating staleness. The data is not real-time during the outage, but your application keeps working.
**For agents and SDK consumers:** most HTTP client libraries do not honor `stale-if-error` by default. If your application needs the resilience this directive promises, use a cache layer that implements it (e.g., a CDN in front of your service, or libraries like `cachecontrol` for Python, `node-cache-control` for Node.js).
**For LLM tool calls:** the MCP layer does not currently cache between calls, so `stale-if-error` does not protect MCP-driven flows. The underlying REST cache still helps because Cloudflare serves the stale copy upstream of the MCP.
***
## Cf-Cache-Status
A Cloudflare-specific header that tells you whether your request hit the CDN cache:
```
cf-cache-status: HIT ← served from CDN cache
cf-cache-status: MISS ← served from origin
cf-cache-status: BYPASS ← cache intentionally skipped
cf-cache-status: DYNAMIC ← cache not applicable (e.g., 4xx, 5xx, OPTIONS)
```
This is informational. You do not need to act on it. It is useful when debugging stale data: if you see `HIT` and the data looks old, the cache is doing its job and the response is up to `max-age` seconds out of date.
***
## Age, Last-Modified
`Age` is the number of seconds since the cached response was generated. `Last-Modified` is the absolute timestamp of the underlying resource (when the API determined the snapshot).
```
age: 13
last-modified: Wed, 13 May 2026 13:18:11 GMT
```
If you need to tell your user how fresh the price data is, `Age` is the most direct signal: the data is at most `Age + max-age` seconds old.
***
## CORS
The DexPaprika REST API currently has **limited CORS support**. Server-side code works without any special handling. Browser-side code that calls the API directly will fail the preflight check.
What the API returns today:
```
# OPTIONS preflight:
HTTP/2 204
allow: OPTIONS, GET
vary: Origin, accept-encoding
# Simple GET with Origin header:
HTTP/2 200
cache-control: public, max-age=60, ...
vary: Origin, accept-encoding
```
What is **missing** for browser fetches to work:
* `Access-Control-Allow-Origin`
* `Access-Control-Allow-Methods`
* `Access-Control-Allow-Headers`
Without these, browsers reject the response even though the network call succeeds. Browser code on your own site needs one of these instead:
1. **Server-side proxy.** Run a small worker (Cloudflare Workers, Vercel Edge, Deno Deploy) that fetches from `api.dexpaprika.com` and re-serves with the right CORS headers to your frontend.
2. **DexPaprika MCP.** Connect through `mcp.dexpaprika.com` from an agent runtime that handles the CORS layer for you.
3. **Static export.** If your data refreshes infrequently, fetch at build time and serve as static JSON.
For real-time browser dashboards, options 1 and 2 are the practical paths.
***
## X-Api-Plan
Every response carries the plan the request was evaluated against:
```
x-api-plan: keyless
```
A keyless request returns `keyless`. A request authenticated with a key returns that key's plan: `free` for a free API key, `dev`, `pro` or `enterprise` for a paid one. The same value is returned in the body of `GET /usage`, alongside credit counts when the request is authenticated on `api-pro.dexpaprika.com`. Use it to confirm a key is actually being applied: if you set an `Authorization` header and still see `keyless`, the key is not reaching the billing gate. Called on `api-pro.dexpaprika.com` with no `Authorization` header at all, that host answers `403` with an HTML block page rather than JSON; see [upgrading to Pro](/api-pro/upgrading).
***
## X-Credits-\* and RateLimit-\*
Every response also reports where you stand against your allowances:
```
x-credits-limit: 10000
x-credits-remaining: 5316
x-credits-reset: 0
ratelimit-limit: 10
ratelimit-remaining: 7
ratelimit-reset: 27
```
`x-credits-limit` and `x-credits-remaining` are your credit allowance and what is left of it. `x-credits-reset` is `0` on keyless and free keys, which count over a rolling 30-day window with no reset moment; on Dev and Pro it holds the end of the billing period. The `ratelimit-*` trio follows the IETF draft (`ratelimit-reset` is seconds until the window rolls). For pacing, treat a `429` and its `Retry-After` as authoritative rather than the value of `ratelimit-limit` on a `200`. The allowances themselves are on [Rate limits](/knowledge-base/rate-limits).
***
## h-hap
You will see this header on every response:
```
h-hap: 01
```
It is an internal infrastructure marker. You can ignore it. Future versions of the API may remove it without notice.
***
## Headers not present (today)
Some headers you might expect from a mature API are not currently emitted:
* **`Deprecation` (RFC 9745)** and **`Sunset` (RFC 8594)**: not set. When DexPaprika deprecates an endpoint or field in the future, these will appear with the relevant dates. Until then, deprecation status is documented in the API reference and in the [changelog](/changelog/changelog), not in headers.
* **`ETag` / `If-None-Match`**: not set. Use `Last-Modified` if you need to track resource freshness.
***
## Quick reference
```
cache-control: public, max-age=60, ..., stale-if-error=600
cf-cache-status: HIT | MISS | BYPASS | DYNAMIC
x-api-plan: keyless | free | dev | pro | enterprise
x-credits-*: limit | remaining | reset
ratelimit-*: limit | remaining | reset
age:
last-modified:
vary: Origin, Accept-Encoding
```
All response headers are lowercase per HTTP/2 convention. If you parse them from a library that returns header names verbatim, accept both `Cache-Control` and `cache-control`. Some intermediaries normalize, others do not.
For error responses (4xx, 5xx), most cache-related headers are absent and `cf-cache-status: DYNAMIC` is set. The error envelopes themselves are documented in [Error handling](/knowledge-base/error-handling).
# Skill
Source: https://docs.dexpaprika.com/skill
Query on-chain DEX data and stream real-time crypto prices using DexPaprika -- token prices, liquidity pools, OHLCV history, swap transactions, advanced pool filtering, and live price streaming via SSE across 33+ blockchains. Use this skill whenever the user wants to fetch crypto token prices, look up pool or DEX data, get historical candlestick data, find new pools, filter pools by volume/transactions/age, stream live prices, build real-time dashboards, or build anything that needs on-chain DEX data. Also use when the user mentions DexPaprika, dexpaprika, streaming crypto prices, or SSE price feeds. REST docs: https://docs.dexpaprika.com -- Streaming docs: https://docs.dexpaprika.com/streaming/introduction
# DexPaprika API
Free API for on-chain DEX data and real-time price streaming. 33+ blockchains, 25M+ tokens, 27M+ pools. No API key, no authentication.
| Service | Base URL | Purpose |
| - | - | - |
| REST API | `https://api.dexpaprika.com` | Token data, pools, OHLCV, transactions, search |
| Streaming API | `https://streaming.dexpaprika.com` | Real-time price updates via SSE (\~1s intervals). [Full docs](https://docs.dexpaprika.com/streaming/introduction) |
| CLI | `curl -sSL .../install.sh \| sh` | Terminal tool wrapping the full API. Install: `curl -sSL https://raw.githubusercontent.com/coinpaprika/dexpaprika-cli/main/install.sh \| sh` |
All examples use curl, but any HTTP client works. The CLI (`dexpaprika-cli`) wraps every endpoint into simple commands with `--output json --raw` for scripting. REST responses are JSON. Streaming responses are Server-Sent Events.
***
## Core concepts
**Network IDs** are lowercase chain identifiers: `ethereum`, `solana`, `bsc`, `arbitrum`, `base`, `polygon`, `optimism`, `avalanche`, etc. Get the full list from `GET /networks`.
**Token addresses** are the on-chain contract addresses (e.g., `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` for WETH on Ethereum, `So11111111111111111111111111111111111111112` for SOL on Solana).
**Pool addresses** are the on-chain liquidity pool contract addresses. Find them via token pools or network pools endpoints.
If you don't know the network or address for a token, use search first.
***
## Endpoints
### Search (start here when you don't have addresses)
```
GET /search?query={query}
```
Search tokens, pools, and DEXes by name, symbol, or address. Case-insensitive. Use this to resolve "what's the ETH price" into the actual network + address you need.
**Example:** Find Jupiter token
```bash theme={null}
curl "https://api.dexpaprika.com/search?query=jupiter"
```
***
### Token price and details
```
GET /networks/{network}/tokens/{token_address}
```
Returns name, symbol, chain, decimals, USD price, fully diluted valuation, liquidity, and volume/transaction stats at multiple time windows (24h, 6h, 1h, 30m, 15m, 5m).
**The price is at** `response.summary.price_usd`
**Example:** Get SOL price
```bash theme={null}
curl "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112"
```
Extract just the price:
```bash theme={null}
curl -s "https://api.dexpaprika.com/networks/solana/tokens/So11111111111111111111111111111111111111112" | jq '.summary.price_usd'
```
***
### Batch token prices
```
GET /networks/{network}/multi/prices?tokens={addr1},{addr2},{addr3}
```
Fetch USD prices for multiple tokens in one request. Comma-separated addresses, max 10 per request. Unknown or unpriced tokens are silently omitted from the response.
**Example:** WETH + USDC on Ethereum
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
```
Response is an array of `{id, chain, price_usd}` objects. Order is not guaranteed.
***
### Top pools on a network
```
GET /networks/{network}/pools?page={1}&limit={10}&order_by={volume_usd}&sort={desc}
```
List top liquidity pools. Pages are 1-indexed, max 100 per page. Order by: `volume_usd`, `price_usd`, `transactions`, `last_price_change_usd_24h`, `created_at`.
**Example:** Top 5 Ethereum pools by volume
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools?limit=5&order_by=volume_usd&sort=desc"
```
***
### Advanced pool filtering (new)
```
GET /networks/{network}/pools/filter
```
Filter pools with range queries on volume, transactions, and creation date. This is the endpoint to use for building pool screeners, finding high-volume pools, or discovering recently created pools that meet specific criteria.
**Parameters:**
| Parameter | Type | Description |
| - | - | - |
| `page` | integer | Page number, **1-indexed** (default: 1) |
| `limit` | integer | Items per page, 1-100 (default: 50) |
| `volume_24h_min` | number | Min 24h volume in USD |
| `volume_24h_max` | number | Max 24h volume in USD |
| `txns_24h_min` | integer | Min 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`) |
Note: `volume_7d_min`, `volume_30d_min`, `liquidity_usd_min`, `liquidity_usd_max` exist in the spec but are not functional yet -- they return empty results.
All filters combine with AND logic. The response includes `page_info` with `total_items` and `total_pages`.
**Example:** High-volume Ethereum pools (>\$100k daily volume)
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/filter?volume_24h_min=100000&sort_by=volume_24h&sort_dir=desc"
```
**Example:** Recently created Solana pools with activity
```bash theme={null}
curl "https://api.dexpaprika.com/networks/solana/pools/filter?created_after=1709251200&txns_24h_min=50&sort_by=created_at&sort_dir=desc"
```
***
### Pool details
```
GET /networks/{network}/pools/{pool_address}?inversed={false}
```
Returns liquidity, reserves, pricing, token pair info, and DEX metadata for a specific pool. Set `inversed=true` to flip the price ratio (token1/token0 instead of token0/token1).
***
### Pool OHLCV (historical candlesticks)
```
GET /networks/{network}/pools/{pool_address}/ohlcv?start={timestamp}&interval={24h}&limit={30}
```
Historical price candlestick data. `start` is required (ISO 8601 or UNIX timestamp). Optional `end` (max 1 year from start).
**Intervals:** `1m`, `5m`, `10m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h`
**Max data points:** 366 per request
**Example:** Last 30 days of daily candles for a pool
```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/ohlcv?start=2025-01-01&interval=24h&limit=30"
```
***
### Pool transactions
```
GET /networks/{network}/pools/{pool_address}/transactions?page={1}&limit={20}
```
Recent swaps, liquidity adds, and removes. Reverse chronological order. Pages 1-indexed, max 100 pages. For deep pagination, use `cursor` parameter (transaction ID) instead of page numbers.
Each transaction includes: token amounts (`amount_0`, `amount_1`), volumes (`volume_0`, `volume_1`), USD prices (`price_0_usd`, `price_1_usd`), token symbols, sender/recipient, and timestamps.
***
### Pools for a token
```
GET /networks/{network}/tokens/{token_address}/pools?order_by={volume_usd}&sort={desc}&limit={10}
```
Find all pools containing a specific token. Optional: add `address` parameter to filter to pools paired with a second specific token. Add `reorder=true` to make the queried token the primary token in all metrics.
***
### DEXes on a network
```
GET /networks/{network}/dexes
```
List all DEXes on a network with their identifiers. Use the `dex` id to filter pools:
```
GET /networks/{network}/dexes/{dex}/pools
```
***
### Networks
```
GET /networks
```
Returns all supported blockchain networks with their IDs. Use these IDs in all other endpoints.
***
### Platform stats
```
GET /stats
```
High-level counts: total networks, DEXes, pools, and tokens. Useful for health checks.
***
## Streaming API -- Real-time prices via SSE
Stream live token prices with \~1 second update intervals. Uses Server-Sent Events (SSE) -- works with any HTTP client that supports streaming. For full streaming docs, guides, and code examples see: [https://docs.dexpaprika.com/streaming/introduction](https://docs.dexpaprika.com/streaming/introduction)
**Base URL:** `https://streaming.dexpaprika.com` (no landing page -- only the `/stream` paths below work)
### Stream a single token (GET)
```bash theme={null}
curl -N "https://streaming.dexpaprika.com/stream?method=t_p&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
```
### Stream multiple tokens (POST) -- recommended for 2+ tokens
Send a JSON array of assets. Single connection, up to 2,000 tokens.
```bash theme={null}
curl -N -X POST "https://streaming.dexpaprika.com/stream" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '[
{"chain": "solana", "address": "So11111111111111111111111111111111111111112", "method": "t_p"},
{"chain": "ethereum", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "method": "t_p"}
]'
```
Each asset object requires `chain` (network ID), `address` (token contract), and `method` (always `t_p` for token price).
### SSE event format
```
data: {"a":"0xc02a...","c":"ethereum","p":"2739.79","t":1769778188,"t_p":1769778187}
event: t_p
```
| Field | Meaning |
| - | - |
| `a` | Token address |
| `c` | Chain ID |
| `p` | Price in USD (string for precision -- parse as decimal) |
| `t` | Server send timestamp (UNIX seconds) |
| `t_p` | Price event timestamp (UNIX seconds) |
Use `now() - t` for network latency, `now() - t_p` for total price data latency.
### Python streaming example
```python theme={null}
import requests, json
assets = [
{"chain": "ethereum", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "method": "t_p"},
{"chain": "solana", "address": "So11111111111111111111111111111111111111112", "method": "t_p"}
]
r = requests.post("https://streaming.dexpaprika.com/stream",
headers={"Accept": "text/event-stream", "Content-Type": "application/json"},
json=assets, stream=True)
for line in r.iter_lines():
if line and line.startswith(b'data:'):
data = json.loads(line[5:])
print(f"{data['c']} {data['a']}: ${data['p']}")
```
### Streaming constraints
* **Max 2,000 assets** per POST request
* **All assets must be valid** -- one invalid asset cancels the entire stream with HTTP 400
* **Global stream limit:** 10,000 concurrent streams per server
* Validate assets via REST `/search` before streaming
* Use multiple smaller requests (100-500 each) rather than one massive request for better load distribution
* Reconnect with exponential backoff on disconnect
### Streaming errors
| Status | Meaning |
| - | - |
| 200 | Connected, streaming |
| 400 | Bad params, unsupported chain, asset not found, or one invalid asset in batch |
| 429 | Global stream limit exceeded -- retry with backoff |
Errors during an active stream arrive as SSE events: `event: error` + `data: {"message": "..."}`. Handle both HTTP errors (before stream starts) and SSE errors (during streaming).
***
## Constraints and limits
### REST API
* **Rate limit:** 10,000 requests per day
* **Batch prices:** max 10 tokens per request
* **Pagination:** max 100 items per page
* **OHLCV:** max 366 data points per request, max 1 year range
* **Transactions:** max 100 pages of pagination
* **Pagination:** all endpoints are 1-indexed (page=0 is silently treated as page=1)
### Streaming API
* **Max assets per request:** 2,000
* **Global concurrent streams:** 10,000 per server
* **All assets must be valid** or entire stream is cancelled
***
## Error handling
| Status | Meaning | What to do |
| - | - | - |
| 200 | Success | Parse JSON response |
| 400 | Bad request (invalid params, too many tokens, bad sort field) | Check parameter values and constraints above |
| 404 | Network, token, or pool not found | Verify the network ID and address; use /search to find correct values |
| 410 | Endpoint deprecated (old /pools) | Use `/networks/{network}/pools` instead |
| 429 | Rate limit exceeded | Back off and retry; consider caching responses |
| 500 | Server error | Retry with backoff |
When a batch price request contains only invalid tokens, you get HTTP 200 with an empty array -- not an error.
***
## Common workflows
### "What's the price of X?"
1. `GET /search?query=X` to find the network and token address
2. `GET /networks/{network}/tokens/{address}` to get price at `.summary.price_usd`
### "Show me the top pools on Ethereum"
1. `GET /networks/ethereum/pools?limit=10&order_by=volume_usd&sort=desc`
### "Find new pools with high volume"
1. `GET /networks/{network}/pools/filter?created_after={unix_timestamp}&volume_24h_min=50000&sort_by=created_at&sort_dir=desc`
### "Get historical price data for a token"
1. Find the token's pools via `GET /networks/{network}/tokens/{address}/pools?order_by=volume_usd&sort=desc&limit=1` (the highest-volume pool is the best source)
2. `GET /networks/{network}/pools/{pool_address}/ohlcv?start={date}&interval=24h&limit=30`
### "Compare prices of multiple tokens"
1. `GET /networks/{network}/multi/prices?tokens={addr1},{addr2},{addr3}`
### "Stream live price updates for a token"
1. `GET https://streaming.dexpaprika.com/stream?method=t_p&chain={network}&address={token_address}`
### "Build a real-time dashboard tracking multiple tokens"
1. Validate tokens exist via REST: `GET /search?query={name}` or `GET /networks/{network}/tokens/{address}`
2. `POST https://streaming.dexpaprika.com/stream` with JSON array of `{chain, address, method: "t_p"}` objects
3. Parse SSE events, read price from `p` field (string -- parse as decimal for precision)
### "Monitor a token's price with alerts"
1. Stream the token via GET or POST to `streaming.dexpaprika.com`
2. Compare each incoming `p` value against your threshold
3. Reconnect with exponential backoff on disconnect
***
## What this skill does NOT cover
* **CoinPaprika centralized exchange data** -- that's a different API (`api.coinpaprika.com`)
* **Trading or swapping** -- DexPaprika is read-only; it does not execute trades
***
## Full documentation
* [REST API reference](https://docs.dexpaprika.com/api-reference/introduction)
* [Streaming API docs](https://docs.dexpaprika.com/streaming/introduction)
* [Tutorials](https://docs.dexpaprika.com/tutorials/tutorial_intro)
# Detect Liquidity Drains in Real Time
Source: https://docs.dexpaprika.com/streaming/guides/detect-liquidity-drains
Build a rug-pull detector that alerts the block liquidity leaves a DEX pool. Free API key, no node, no log decoding, no getReserves polling. ~70 lines.
To detect a liquidity drain (a rug pull, an LP exit, a liquidity migration) programmatically, subscribe to a pool's reserves over SSE and alert when the pool's **net USD reserve change in a single block** exceeds a threshold. A good starting bar: more than $10,000 *and* more than 20% of the pool. Swaps can't trigger this signal, because a swap moves one token up and the other down and nets to roughly zero. Only liquidity actually entering or leaving a pool moves the net total. A detector built this way caught a fresh Base pool losing **97.3% of its liquidity ($67k) in one block\*\*, the night it was first switched on.
This guide builds that detector in about 70 lines of JavaScript or Python, watching pools on three chains over one connection. No node, no event-log decoding, no `getReserves` polling loop.
The reserves feed needs an API key. A [free one](https://console.dexpaprika.com) takes a minute and no card, and the examples below assume you have set it as `DEXPAPRIKA_API_KEY`.
> [card] [Production example: LiquidityRadar](https://github.com/coinpaprika/liquidity-radar)
>
> **The full open-source version of what you'll build here.** A zero-dependency engine, a clone-and-run CLI, and a deployable Cloudflare Worker with a public status page, webhook alerts, and flood protection. Fork it and point it at your own pools. [View source →](https://github.com/coinpaprika/liquidity-radar)
## How detection works
Every block in which a subscribed pool's reserves change, the stream emits a `pool_reserves` event with USD values already computed, including `total_delta_usd`, the signed dollar change of the whole pool in that block.
That one field is the entire trick:
| What happened on-chain | `total_delta_usd` | Why |
| - | - | - |
| Swap (any size) | ≈ \$0 | One token's reserve goes up, the other goes down. The dollar values cancel. |
| Liquidity added | Strongly positive | Both tokens' reserves rise together. |
| Liquidity removed / **drained** | Strongly negative | Both tokens' reserves fall together. Nothing cancels it. |
A real capture of a $45,930 swap in the USDC/WETH 0.05% pool: one leg `+$46,015`, the other `-\$45,930`, net `total_delta_usd: 84.37\`. The same pool's biggest one-block *liquidity* moves run six figures with nothing on the other side. A drain cannot disguise itself as trading volume.
> [!WARNING]
>
> **Big numbers arrive as strings.** The raw token amounts (`reserve`, `delta`) and `block` are JSON strings, because they exceed JavaScript's `Number.MAX_SAFE_INTEGER`. Parse them with `BigInt` if you need them. For drain detection you don't: the USD fields (`total_reserve_usd`, `total_delta_usd`, `reserve_usd`, `delta_usd`) are regular numbers, pre-computed server-side.
## Step 1: Watch a pool's reserves live
The reserves feed needs the key you set above. This streams real reserve changes for the largest USDC/WETH pool on Ethereum, one event per block in which its reserves changed:
```bash theme={null}
curl -N -H "Authorization: $DEXPAPRIKA_API_KEY" \
"https://streaming.dexpaprika.com/sse/reserves?method=pool_reserves&chain=ethereum&address=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
```
```text Live capture from production theme={null}
event: pool_reserves
request_id: 0
data: {"chain":"ethereum","pool_id":"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640","block":"25286203","previous_block":"25286202","tokens":[{"token_id":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","reserve":"19397067871705","delta":"46015585500","price_usd":0.9999897960291432,"reserve_usd":19396869.94,"delta_usd":46015.11},{"token_id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","reserve":"39923043997983135635229","delta":"-28370314221473922862","price_usd":1618.97,"reserve_usd":64634288.92,"delta_usd":-45930.74}],"total_reserve_usd":84031158.86,"total_delta_usd":84.37,"timestamp":1781084332,"block_timestamp":1781084327}
```
The fields the detector cares about:
* `total_reserve_usd`: the pool's current total liquidity in USD
* `total_delta_usd`: the signed USD change this block (the swap above nets to `84.37`, which is noise)
* `block`: where it happened, for receipts
> [!TIP]
>
> To follow a **token across every pool it trades in**, use `method=token_reserves` with a token address instead. Those events are one-sided by nature (a large buy also drops reserves), so reserve the word "drain" for pool-mode alerts.
## Step 2: The detector
Watch up to **25 pools on a single connection** by POSTing a JSON array. Events route back via `request_id`, the index of the subscription in your array. Mixing chains in one connection works.
The detection rule, two thresholds that scale together:
* `|total_delta_usd| ≥ MIN_USD`, which ignores dust
* `|total_delta_usd| / reserve_before ≥ MIN_PCT`, which ignores moves the pool barely feels
On a $50M blue-chip pool, 20% means an eight-figure event. On a $100k day-old memecoin pool, a \$20k pull trips it. Same two numbers, self-scaling.
```javascript drain-detector.mjs theme={null}
// drain-detector.mjs: alert when a pool loses a big share of its liquidity
// in one block. Node 18+, no dependencies. Needs DEXPAPRIKA_API_KEY.
const POOLS = [
{ chain: "ethereum", address: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", label: "USDC/WETH 0.05%" },
{ chain: "base", address: "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59", label: "WETH/USDC (Aerodrome)" },
{ chain: "solana", address: "8sjV1AqBFvFuADBCQHhotaRq5DFFYSjjg1jMyVWMqXvZ", label: "USDT/USDC (Orca)" },
];
const MIN_USD = 10_000; // ignore moves smaller than this
const MIN_PCT = 0.2; // ...and smaller than this share of the pool
async function watch() {
const res = await fetch("https://streaming.dexpaprika.com/sse/reserves", {
method: "POST",
// The key is the entire Authorization value, with no scheme word in front of it.
headers: {
"content-type": "application/json",
authorization: process.env.DEXPAPRIKA_API_KEY,
},
body: JSON.stringify(POOLS.map(({ chain, address }) => ({ chain, address, method: "pool_reserves" }))),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
let buffer = "";
for await (const chunk of res.body.pipeThrough(new TextDecoderStream())) {
buffer += chunk;
const frames = buffer.split("\n\n");
buffer = frames.pop(); // keep the partial frame for the next chunk
for (const frame of frames) {
const event = frame.match(/^event: (.*)$/m)?.[1];
const id = frame.match(/^request_id: (.*)$/m)?.[1];
const data = frame.match(/^data: (.*)$/m)?.[1];
if (!data) continue;
if (event === "error") throw new Error(JSON.parse(data).message);
if (event !== "pool_reserves") continue; // skip pings and warnings
const update = JSON.parse(data);
const delta = update.total_delta_usd;
const before = update.total_reserve_usd - delta; // reserve before this block
const pct = before > 0 ? delta / before : 0;
// A swap moves one token up and the other down, so total_delta_usd nets
// to ~0. Only liquidity entering or leaving the pool moves the total.
if (Math.abs(delta) < MIN_USD || Math.abs(pct) < MIN_PCT) continue;
const pool = POOLS[Number(id)] ?? { label: update.pool_id };
const verb = delta < 0 ? "DRAIN" : "ADD";
console.log(
`${verb} ${pool.label} on ${update.chain}: ` +
`${delta < 0 ? "-" : "+"}$${Math.abs(delta).toLocaleString("en-US", { maximumFractionDigits: 0 })} ` +
`(${(pct * 100).toFixed(1)}% of the pool) at block ${update.block}`,
);
}
}
}
while (true) {
try {
console.log("connecting…");
await watch();
} catch (err) {
console.error(String(err));
}
await new Promise((r) => setTimeout(r, 5000)); // simple retry; see the production guide
}
```
```python drain_detector.py theme={null}
# drain_detector.py: alert when a pool loses a big share of its liquidity
# in one block. Python 3.8+, `pip install requests`. Needs DEXPAPRIKA_API_KEY.
import json
import os
import time
import requests
POOLS = [
{"chain": "ethereum", "address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", "label": "USDC/WETH 0.05%"},
{"chain": "base", "address": "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59", "label": "WETH/USDC (Aerodrome)"},
{"chain": "solana", "address": "8sjV1AqBFvFuADBCQHhotaRq5DFFYSjjg1jMyVWMqXvZ", "label": "USDT/USDC (Orca)"},
]
MIN_USD = 10_000 # ignore moves smaller than this
MIN_PCT = 0.20 # ...and smaller than this share of the pool
def watch():
response = requests.post(
"https://streaming.dexpaprika.com/sse/reserves",
# The key is the entire Authorization value, with no scheme word in front of it.
headers={"Authorization": os.environ["DEXPAPRIKA_API_KEY"]},
json=[{"chain": p["chain"], "address": p["address"], "method": "pool_reserves"} for p in POOLS],
stream=True,
timeout=60,
)
response.raise_for_status()
event_type, request_id = None, None
for raw_line in response.iter_lines(decode_unicode=True):
line = raw_line or ""
if line.startswith("event: "):
event_type = line[7:]
elif line.startswith("request_id: "):
request_id = line[12:]
elif line.startswith("data: "):
if event_type == "error":
raise RuntimeError(json.loads(line[6:])["message"])
if event_type != "pool_reserves": # skip pings and warnings
continue
update = json.loads(line[6:])
delta = update["total_delta_usd"]
before = update["total_reserve_usd"] - delta # reserve before this block
pct = delta / before if before > 0 else 0
# A swap moves one token up and the other down, so total_delta_usd
# nets to ~0. Only liquidity entering or leaving moves the total.
if abs(delta) < MIN_USD or abs(pct) < MIN_PCT:
continue
pool = POOLS[int(request_id)] if request_id and request_id.isdigit() else {"label": update["pool_id"]}
verb = "DRAIN" if delta < 0 else "ADD"
print(
f"{verb} {pool['label']} on {update['chain']}: "
f"{'-' if delta < 0 else '+'}${abs(delta):,.0f} "
f"({pct * 100:.1f}% of the pool) at block {update['block']}"
)
while True:
try:
print("connecting…")
watch()
except Exception as err: # noqa: BLE001, simple retry; see the production guide
print(err)
time.sleep(5)
```
Run it (`node drain-detector.mjs` / `python drain_detector.py`). At the default thresholds, alerts are rare by design. A 20% single-block move on a real pool is an event. Output from a live run with thresholds lowered for demonstration:
```text Live run (thresholds lowered to show output) theme={null}
connecting…
ADD WETH/USDC (Aerodrome) on base: +$429,397 (5.3% of the pool) at block 47239458
DRAIN WETH/USDC (Aerodrome) on base: -$329,331 (-3.8% of the pool) at block 47239459
DRAIN WETH/USDC (Aerodrome) on base: -$100,020 (-1.2% of the pool) at block 47239465
ADD WETH/USDC (Aerodrome) on base: +$97,078 (1.2% of the pool) at block 47239466
```
That add/drain oscillation is real and worth understanding. The thresholds section explains it.
## Step 3: Tune the thresholds
> [accordion] Why 20%? Because liquidity bots churn below it
>
> Major pools host [JIT (just-in-time) liquidity](https://dexpaprika.com/glossary/jit-liquidity-just-in-time-liquidity) bots that add and remove six-figure positions around individual swaps. We've measured them moving ±4% of an \$8M pool *every block*, which is exactly the oscillation in the sample output above. Liquidity genuinely moves, so a detector genuinely fires; it's just market plumbing, not an exit. A 20% bar clears that churn with a 5x margin. If you watch pools with heavy JIT activity and want a lower bar, net the deltas over a few consecutive blocks: JIT cycles cancel out, drains don't.
> [accordion] Watching fresh, small pools (where rugs actually happen)
>
> For day-old pools in the $20k to $500k range, the defaults already work: a [rug pull](https://dexpaprika.com/glossary/rug-pull) on a $70k pool is a ~$70k negative delta at \~100% of the pool. If you want earlier partial-exit signals, drop `MIN_USD` to \~\$5k and keep `MIN_PCT` at 20%. On small pools the percentage gate does the real work.
> [accordion] Finding pools worth watching
>
> The REST pool search endpoint finds rug-candidates programmatically: pools created in the last week with real activity:
>
> ```bash theme={null}
> curl "https://api.dexpaprika.com/networks/base/pools/search?created_after=-7d&txns_24h_min=50&volume_usd_24h_min=10000&order_by=created_at&sort=desc&limit=25"
> ```
>
> Feed the resulting pool IDs straight into `POOLS`. One connection covers 25 of them.
## Step 4: Route alerts anywhere
Replace `console.log` with a webhook call and the detector becomes a bot. Discord, for example:
```javascript theme={null}
await fetch(process.env.WEBHOOK_URL, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ content: alertText }),
});
```
Before pointing this at a channel people read, add flood protection: deduplicate on `pool_id + block`, hold a per-pool cooldown, and cap sends per hour, because a multi-block drain fires once per block otherwise. [LiquidityRadar](https://github.com/coinpaprika/liquidity-radar) implements that gate, plus reconnection with backoff, a persistent status page, and one-command Cloudflare deployment, if you'd rather fork than build.
## Limits and errors worth knowing
* **25 subscriptions per POST connection, 10 concurrent streams on a free key** (30 on Dev, 100 on Pro). Chunk bigger watchlists across connections.
* **One invalid entry rejects the whole multiplexed connection.** The stream sends an `error` event naming the bad asset (`"pool not found: …"`), then closes. Validate addresses before subscribing.
* **`error` events are not all equal**: subscription problems (`asset not found`, `unsupported chain`) are permanent: fix the input, don't retry. Capacity problems (a `429` saying `Concurrent stream limit reached`) clear once a stream closes, so retry those with backoff.
* A `ping` arrives every \~15s; if nothing arrives for 30s+, reconnect. See [error handling](/knowledge-base/error-handling) for the full catalog.
## FAQ
> [accordion] Can a rug pull hide from this detector?
>
> Not by swapping: swaps net to \~zero in `total_delta_usd` regardless of size. An exit could in principle drip liquidity out in many small blocks below your thresholds, which is why percentage-of-pool matters more than absolute USD: 100 blocks of 1% exits still cross a 20% net threshold if you accumulate deltas over a window.
> [accordion] Why SSE instead of polling getReserves or listening to Sync events?
>
> Polling misses everything between polls. A pool can drain in one block, and a 30-second loop finds out after the money is gone. Decoding `Sync`/`Mint`/`Burn` logs over a WebSocket node connection works but costs a node provider subscription and per-DEX decoding logic. The reserve stream pushes per-block deltas with USD values pre-computed, for every major DEX shape (Uniswap v2/v3/v4, Curve, Aerodrome, Raydium, Orca…), and without a line of per-DEX decoding of your own.
> [accordion] Is this free? What's the catch?
>
> Free, but not keyless. The reserves feed needs an API key, so [register a free one](https://console.dexpaprika.com) first: it takes a minute and no card. Prices are the feed that streams without a key, on the [34 showcase assets](/streaming/showcase-streams). Beyond that the limits are the catch, and there are three: 25 subscriptions per connection, 10 concurrent streams per IP, and each update delivered costs one credit against your monthly allowance. That allowance is 100,000 credits per rolling 30 days with a free key, and 5M on [Pro at \$99 a month](https://dexpaprika.com/api/pricing). A quiet market costs almost nothing; a fast-moving pair draws down credits much like polling would. See [rate limits](/knowledge-base/rate-limits).
> [accordion] Does it work on Solana / Base / my chain?
>
> The same code in this guide watches Ethereum, Base, and Solana on one connection. Any chain DexPaprika indexes works, see [networks](https://api.dexpaprika.com/networks).
## Next steps
> [card] [Reserve Streaming Overview](/streaming/reserves-streaming)
>
> The full feature guide: both subscription methods, payload schemas, limits.
> [card] [Streaming Quick Start](/streaming/tutorials/quick-start)
>
> Prices and reserves from zero in 10 minutes.
> [card] [Multi-Pool API Reference](/streaming/subscribe-to-multiple-reserves-streaming)
>
> The POST /sse/reserves endpoint in full detail.
> [card] [LiquidityRadar on GitHub](https://github.com/coinpaprika/liquidity-radar)
>
> The production version: deployable worker, status page, alert gate.
***
## Get support
> [card] [Join Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support.
> [card] [Give Feedback](mailto:support@coinpaprika.com)
>
> Share your experience and help us improve.
# Production-Grade Reserve Streaming
Source: https://docs.dexpaprika.com/streaming/guides/production-reserve-streaming
Run /sse/reserves 24/7 without losing data or hammering the API: reconnection that actually works, missed-block detection, error classification, and multiplexing at scale.
Running a reserve stream in production comes down to five rules: trust events, not HTTP status codes; watch the heartbeat; know that state self-heals but ledgers don't; classify errors before retrying; and multiplex deliberately. This guide covers all five with tested code, drawn from running a 58-pool monitor against `/sse/reserves` around the clock. One lesson cost us a night of data: treating a transient "stream limit exceeded" error as fatal silenced 8 pools until morning. The patterns below exist so you don't repeat it.
If you haven't streamed reserves before, start with the [drain detection guide](/streaming/guides/detect-liquidity-drains). This one assumes you have a working consumer and need it to survive real networks, real restarts, and real error states.
> [!NOTE]
>
> Both programs read `DEXPAPRIKA_API_KEY` from the environment. The reserves feed needs a key, and a [free one](https://console.dexpaprika.com) takes a minute and no card. Leave it unset and both stop before the first connect with a line telling you what is missing, rather than reconnecting against a feed that will never open for them.
## The five rules
| Rule | Why it exists |
| - | - |
| Reset backoff only after a parsed event | Proxies can return HTTP 200 and close instantly. Resetting on 200 turns backoff into a 1-second hammer. |
| Treat 30s of silence as a dead connection | Pings arrive every \~15s. A socket can die without an error ever surfacing. |
| State self-heals, ledgers don't | Every event carries absolute reserves. After a gap you're current again, but the per-block change log has a hole. Detect it with `previous_block`. |
| Classify errors before retrying | "Pool not found" never fixes itself. "Stream limit exceeded" always does. Retrying the first wastes a connection slot forever; abandoning the second loses a working subscription. |
| Multiplex deliberately | 25 subscriptions per connection, 10 concurrent streams on a free key (30 on Dev, 100 on Pro), and one invalid entry rejects the whole batch. |
## Rule 1: Trust events, not status codes
A reconnect loop usually looks like: connect, reset backoff, consume, on failure wait and retry with doubled delay. The subtle bug is *where* the backoff resets. If it resets when the HTTP response arrives, any failure mode that returns `200 OK` and then closes (load balancer deploys, buffering proxies, overload shedding) defeats the exponential entirely: every cycle reconnects at the floor delay, forever, from every client you've shipped.
Reset backoff only after the first parsed SSE frame. A `ping` counts; it proves the stream actually streams.
```javascript theme={null}
let sawEvent = false;
for await (const frame of frames) {
sawEvent = true; // proof the stream works, not just HTTP 200
// ... handle the frame
}
// in the outer loop:
if (sawEvent) backoff = 1_000;
backoff = Math.min(backoff * 2, 30_000);
await sleep(backoff + Math.random() * 1_000); // jitter spreads reconnect storms
```
## Rule 2: Watch the heartbeat
The server sends a `ping` every \~15 seconds. If nothing (events or pings) arrives for 30 seconds, assume the socket is dead even though no error fired, and reconnect. In JavaScript that's a small watchdog timer that aborts the fetch. In Python, `requests` gives you this for free: set the read timeout to 30 seconds and the staleness check becomes an exception your retry loop already handles.
```python theme={null}
response = requests.post(url, json=subs, stream=True, timeout=(10, 30))
# 10s to connect, and any 30s silence raises ReadTimeout: your reconnect path
```
## Rule 3: State self-heals, ledgers don't
This is the property that makes reserve streaming forgiving in production. Every `pool_reserves` event carries **absolute values**: `total_reserve_usd` is the pool's liquidity right now, not a cumulative sum you must maintain. Disconnect for ten minutes, reconnect, and your first event makes your state current again. There is nothing to resync and no REST snapshot to fetch.
What does *not* self-heal is the change log. If you aggregate deltas over time (net flow over a window, cumulative volume of liquidity changes), the blocks you missed are holes in that ledger. The stream gives you exactly what you need to know when that happened: each event's `previous_block` names the last block in which the pool's reserves changed. If it doesn't match the `block` of the previous event you received, you missed something.
```javascript theme={null}
const lastBlock = new Map();
function checkContinuity(idx, update) {
const prev = lastBlock.get(idx);
if (prev !== undefined && update.previous_block !== prev) {
// a hole in the ledger: reset windowed aggregations for this subscription
resetWindows(idx);
}
lastBlock.set(idx, update.block);
}
```
> [!NOTE]
>
> `previous_block` chains event to event, not block to block. Pools only emit
> when reserves change, so consecutive events can legitimately be many chain
> blocks apart while `previous_block` still matches perfectly. A mismatch
> means missed *events*, not quiet markets.
If you need the missed changes themselves, the [pool transactions endpoint](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages) backfills the gap from REST on a Dev, Pro or Enterprise plan.
## Rule 4: Classify errors before retrying
Two error channels exist, and both carry a mix of permanent and transient conditions.
**Before the stream starts**, a bad request gets an HTTP error with a JSON body. **Mid-stream**, the server sends an `error` event and closes the connection. Either way, read the message and split:
| Error | Channel | Class | Correct response |
| - | - | - | - |
| `unsupported chain: …` | HTTP 400 or `error` event | Permanent | Fix the subscription. Retrying can never succeed. |
| `pool not found: …` / `asset not found` | HTTP 400 or `error` event | Permanent | Same. The message names the bad entry. |
| `too many subscriptions` | HTTP 400 | Permanent | Your batch exceeds 25. Chunk it. |
| `Concurrent stream limit reached` | HTTP 429, `"error":"rate_limited"` | Transient | Close a stream, or back off and retry. A slot will free up. |
| 5xx, network failures, timeouts | HTTP / socket | Transient | Back off and retry. |
A practical classifier needs one line:
```javascript theme={null}
const isRetryable = (message) => /limit|rate|too many|capacity|timeout|temporar/i.test(message);
```
Getting this wrong in either direction hurts. Retrying a permanent error burns one of your 10 connection slots on a request that can never succeed. Treating a transient error as permanent is how we lost 8 pools for a night: the limit cleared within minutes, but the code had already given up.
> [!WARNING]
>
> **One invalid entry rejects the whole multiplexed connection.** The server
> sends a single `error` event naming the bad asset, then closes, and your
> other 24 subscriptions go down with it. Validate addresses against the
> [REST API](/api-reference/pools/get-a-pool-on-a-network) before
> subscribing, and treat "not found" errors as a signal to drop the named
> entry and resubscribe the rest.
## Rule 5: Multiplex deliberately
The limits: **25 subscriptions per POST connection, 10 concurrent streams per IP**. That's 250 pools from one machine, if you chunk correctly. Those caps bound concurrency, not spend: every event delivered costs one credit, and 250 pools streaming around the clock runs well past the 5M credits a month [Pro includes](https://dexpaprika.com/api/pricing), so size the workload before you scale the chunks.
* Route events to subscriptions with `request_id`: it's the index of the entry in your POSTed array.
* Keep a fallback route on `(chain, pool_id/token_id)` for defensive code; both fields are in every payload.
* Chunk watchlists into groups of 25 and run one consumer loop per chunk. Let chunks fail independently: a permanent error in one chunk shouldn't stop the other nine.
* Mixing chains and both methods (`pool_reserves`, `token_reserves`) in one connection works fine.
## The full client
Both versions implement all five rules and were run against production as written. Bad-address handling verified live: the client exits with the server's message instead of looping.
```javascript resilient-stream.mjs theme={null}
// resilient-stream.mjs: production-grade reserve streaming. Node 18+, no deps.
// Reconnects with real backoff, detects missed blocks, classifies errors,
// and watches its own heartbeat.
//
// The reserves feed needs an API key. Checked here rather than left to the
// server: an unset variable travels as the literal string "undefined" and comes
// back as a key-verification failure, which reads like a key that went bad.
const KEY = process.env.DEXPAPRIKA_API_KEY;
if (!KEY) {
console.error("set DEXPAPRIKA_API_KEY, free key at https://console.dexpaprika.com");
process.exit(1);
}
const SUBSCRIPTIONS = [
{ chain: "base", address: "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59", method: "pool_reserves" },
{ chain: "solana", address: "8sjV1AqBFvFuADBCQHhotaRq5DFFYSjjg1jMyVWMqXvZ", method: "pool_reserves" },
];
const STALE_MS = 30_000; // two missed pings = reconnect
const MAX_BACKOFF_MS = 30_000;
// Capacity errors clear on their own; subscription errors never will.
function isRetryable(message) {
return /limit|rate|too many|capacity|timeout|temporar/i.test(message);
}
const lastBlock = new Map(); // subscription index -> last seen block
function handleEvent(idx, update) {
// Absolute state: total_reserve_usd is the pool's liquidity NOW, so state
// self-heals after any gap. Only the per-block ledger can have holes.
const prev = lastBlock.get(idx);
if (prev !== undefined && update.previous_block !== prev) {
console.warn(
`[gap] sub ${idx}: missed blocks ${prev} -> ${update.previous_block}. ` +
"Reset any delta-window aggregation for this subscription.",
);
}
lastBlock.set(idx, update.block);
console.log(
`sub ${idx} block ${update.block}: $${Math.round(update.total_reserve_usd).toLocaleString("en-US")} ` +
`(${update.total_delta_usd >= 0 ? "+" : "-"}$${Math.abs(update.total_delta_usd).toFixed(2)})`,
);
}
async function connectOnce(signal) {
const res = await fetch("https://streaming.dexpaprika.com/sse/reserves", {
method: "POST",
// The key is the whole Authorization value, with no scheme word in front of it.
headers: { "content-type": "application/json", authorization: KEY },
body: JSON.stringify(SUBSCRIPTIONS),
signal,
});
if (!res.ok) {
const body = await res.text();
// 4xx other than 408/429 means the request itself is wrong: do not retry.
const fatal = res.status >= 400 && res.status < 500 && ![408, 429].includes(res.status);
throw Object.assign(new Error(`${res.status}: ${body}`), { fatal });
}
let sawEvent = false;
let lastActivity = Date.now();
const controller = new AbortController();
signal.addEventListener("abort", () => controller.abort(), { once: true });
const watchdog = setInterval(() => {
if (Date.now() - lastActivity > STALE_MS) {
console.warn("[watchdog] no events or pings for 30s, forcing reconnect");
controller.abort(); // tears down the fetch, the outer loop reconnects
}
}, 5_000);
try {
let buffer = "";
for await (const chunk of res.body.pipeThrough(new TextDecoderStream())) {
lastActivity = Date.now();
buffer += chunk;
const frames = buffer.split("\n\n");
buffer = frames.pop();
for (const frame of frames) {
const event = frame.match(/^event: (.*)$/m)?.[1];
const id = frame.match(/^request_id: (.*)$/m)?.[1];
const data = frame.match(/^data: (.*)$/m)?.[1];
if (!data) continue;
sawEvent = true; // proof the stream works, not just HTTP 200
if (event === "error") {
const message = JSON.parse(data).message ?? data;
throw Object.assign(new Error(message), { fatal: !isRetryable(message) });
}
if (event === "warning") {
console.warn(`[server] ${JSON.parse(data).message ?? data}`);
continue;
}
if (event === "ping") continue; // counts as activity, nothing else
if (event === "pool_reserves" || event === "token_reserves") {
handleEvent(Number(id), JSON.parse(data));
}
}
}
} finally {
clearInterval(watchdog);
}
return sawEvent;
}
let backoff = 1_000;
while (true) {
const session = new AbortController();
try {
console.log("connecting…");
const healthy = await connectOnce(session.signal);
if (healthy) backoff = 1_000; // reset only after a proven-working stream
} catch (err) {
if (err.fatal) {
console.error(`fatal, fix the subscription list: ${err.message}`);
process.exit(1);
}
console.error(`transient: ${err.message}`);
}
await new Promise((r) => setTimeout(r, backoff + Math.random() * 1_000)); // jitter
backoff = Math.min(backoff * 2, MAX_BACKOFF_MS);
}
```
```python resilient_stream.py theme={null}
# resilient_stream.py: production-grade reserve streaming. Python 3.8+,
# `pip install requests`. Reconnects with real backoff, detects missed
# blocks, classifies errors, and uses the read timeout as a staleness watchdog.
import json
import os
import random
import re
import sys
import time
import requests
# The reserves feed needs an API key. Read with .get and checked here, so a
# missing one prints the instruction instead of a KeyError traceback.
KEY = os.environ.get("DEXPAPRIKA_API_KEY")
if not KEY:
sys.exit("set DEXPAPRIKA_API_KEY, free key at https://console.dexpaprika.com")
SUBSCRIPTIONS = [
{"chain": "base", "address": "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59", "method": "pool_reserves"},
{"chain": "solana", "address": "8sjV1AqBFvFuADBCQHhotaRq5DFFYSjjg1jMyVWMqXvZ", "method": "pool_reserves"},
]
STALE_SECONDS = 30 # two missed pings = the read timeout forces a reconnect
MAX_BACKOFF = 30.0
last_block = {} # subscription index -> last seen block
def is_retryable(message: str) -> bool:
# Capacity errors clear on their own; subscription errors never will.
return bool(re.search(r"limit|rate|too many|capacity|timeout|temporar", message, re.I))
class FatalStreamError(Exception):
pass
def handle_event(idx: int, update: dict) -> None:
# Absolute state: total_reserve_usd is the pool's liquidity NOW, so state
# self-heals after any gap. Only the per-block ledger can have holes.
prev = last_block.get(idx)
if prev is not None and update["previous_block"] != prev:
print(
f"[gap] sub {idx}: missed blocks {prev} -> {update['previous_block']}. "
"Reset any delta-window aggregation for this subscription."
)
last_block[idx] = update["block"]
delta = update["total_delta_usd"]
print(
f"sub {idx} block {update['block']}: "
f"${update['total_reserve_usd']:,.0f} ({'+' if delta >= 0 else '-'}${abs(delta):.2f})"
)
def connect_once() -> bool:
response = requests.post(
"https://streaming.dexpaprika.com/sse/reserves",
json=SUBSCRIPTIONS,
# The key is the whole Authorization value, with no scheme word in front of it.
headers={"Authorization": KEY},
stream=True,
# read timeout doubles as the staleness watchdog: pings arrive every
# ~15s, so 30s of silence raises and the outer loop reconnects
timeout=(10, STALE_SECONDS),
)
if not response.ok:
fatal = 400 <= response.status_code < 500 and response.status_code not in (408, 429)
message = f"{response.status_code}: {response.text[:200]}"
if fatal:
raise FatalStreamError(message)
raise RuntimeError(message)
saw_event = False
event_type, request_id = None, None
for raw_line in response.iter_lines(decode_unicode=True):
line = raw_line or ""
if line.startswith("event: "):
event_type = line[7:]
elif line.startswith("request_id: "):
request_id = line[12:]
elif line.startswith("data: "):
saw_event = True # proof the stream works, not just HTTP 200
if event_type == "error":
message = json.loads(line[6:]).get("message", line[6:])
if is_retryable(message):
raise RuntimeError(message)
raise FatalStreamError(message)
if event_type == "warning":
print(f"[server] {json.loads(line[6:]).get('message', '')}")
elif event_type in ("pool_reserves", "token_reserves"):
handle_event(int(request_id or -1), json.loads(line[6:]))
# pings count as activity (they reset the read timeout) and need
# no handling of their own
return saw_event
backoff = 1.0
while True:
try:
print("connecting…")
if connect_once():
backoff = 1.0 # reset only after a proven-working stream
except FatalStreamError as err:
print(f"fatal, fix the subscription list: {err}")
sys.exit(1)
except Exception as err: # noqa: BLE001, includes the staleness timeout
print(f"transient: {err}")
time.sleep(backoff + random.random()) # jitter
backoff = min(backoff * 2, MAX_BACKOFF)
```
> [!WARNING]
>
> **Big numbers arrive as strings.** The raw amounts (`reserve`, `delta`) and
> `block` are JSON strings because they exceed `Number.MAX_SAFE_INTEGER`. Use
> `BigInt` (or Python's native ints, which handle them automatically) if you
> work with raw amounts. The USD fields are regular floats, computed
> server-side, and are all you need for most monitoring.
## Don't alert on plumbing
If your production consumer feeds alerts, remember that liquidity moves for boring reasons too. JIT liquidity bots on major pools add and remove six-figure positions around single swaps; we've measured ±4% of an \$8M pool every block. Threshold accordingly, or net deltas over a window so the add/remove cycles cancel. The [drain detection guide](/streaming/guides/detect-liquidity-drains) covers thresholds that survive this.
## Monitor the monitor
A streaming consumer that silently stops is worse than one that crashes. The minimum viable health surface, all derivable from this guide's client:
* **Last event age**: if `lastActivity` is older than a minute, something is wrong even if the process is alive.
* **Per-chunk status**: which subscriptions are live, which died fatally and why (keep the server's error message; it names the bad entry).
* **Gap count**: how many ledger holes you've detected since start.
* **Credit spend**: a busy watchlist bills one credit per delivered event and can work through a monthly allowance quickly. Per-key usage is in [console.dexpaprika.com](https://console.dexpaprika.com).
For a worked example, [LiquidityRadar](https://github.com/coinpaprika/liquidity-radar) (open source) runs this exact stack as a Cloudflare Worker with a public status page showing event freshness, per-subscription failures, and every alert it gated.
## FAQ
> [accordion] Do I need to resync from REST after a disconnect?
>
> Not for state. Every event carries absolute reserve values, so your first event after reconnecting makes you current. You only need REST backfill if you maintain a gapless per-block ledger; detect the holes by comparing each event's previous_block to the last block you saw.
> [accordion] Is there Last-Event-ID resume support?
>
> No. The stream has no replay; a reconnect starts fresh from the next change. That's why the absolute-values property matters: it makes resume-from-now safe for state tracking.
> [accordion] How many pools can one machine watch?
>
> 250 on a free key: 25 subscriptions per POST connection, 10 concurrent streams. The stream cap belongs to your plan, not to a machine, so more machines do not raise it; Dev allows 30 streams (750 pools) and Pro 100 (2,500).
> [accordion] What happens to my other subscriptions when one entry is invalid?
>
> The whole connection is rejected with one error event naming the bad asset. Drop that entry and resubscribe the rest. Validating addresses against REST before subscribing avoids the round trip.
## Next steps
> [card] [Detect Liquidity Drains](/streaming/guides/detect-liquidity-drains)
>
> The detection logic this guide keeps alive: thresholds, JIT noise, alerts.
> [card] [Reserve Streaming Overview](/streaming/reserves-streaming)
>
> Payload schemas, both subscription methods, limits.
> [card] [Error Handling Reference](/knowledge-base/error-handling)
>
> The complete error catalog for REST and streaming.
> [card] [LiquidityRadar on GitHub](https://github.com/coinpaprika/liquidity-radar)
>
> All five rules as a deployable, open-source Cloudflare Worker.
***
## Get support
> [card] [Join Discord](https://discord.gg/DhJge5TUGM)
>
> Connect with our community and get real-time support.
> [card] [Give Feedback](mailto:support@coinpaprika.com)
>
> Share your experience and help us improve.
# React & Next.js Integration
Source: https://docs.dexpaprika.com/streaming/guides/react-integration
Build real-time price components for React and Next.js applications with TypeScript support
> [card] [Production example: live streaming dashboard](https://dexpaprika.com/streaming/solana)
>
> **See React integration in production!** Our live dashboard is built with React, TypeScript, and uses the patterns described in this guide. Streams 6 cryptocurrencies using POST /sse/prices with custom hooks, real-time UI updates, and proper error handling. Open the dashboard and inspect the Network tab to see SSE in action! [View Source →](https://dexpaprika.com/streaming/solana)
> [!WARNING]
>
> Browsers block calls to `streaming.dexpaprika.com` from other sites, because the stream doesn't send CORS headers to them. The dashboard above works because it runs on dexpaprika.com. In your app, open the stream from your backend (a Next.js route handler, a Cloudflare Worker) and point the hooks below at that route. See [Response headers and CORS](/knowledge-base/response-headers#cors).
## Integration overview
Learn how to integrate DexPaprika's streaming API into React and Next.js applications with:
* Custom React hooks for streaming
* TypeScript support
* Server-side rendering considerations
* Production-ready error handling
***
## Finding token addresses
Before streaming, you need token addresses. Use the REST API:
> [card] Search Tokens
>
> Use the [Search API](/api-reference/search/search-for-tokens-pools-and-dexes) to find tokens by name or symbol
> [card] Get Networks
>
> Use the [Networks API](/api-reference/networks/get-a-list-of-available-blockchain-networks) to get supported chains
```bash theme={null}
# Search for USDC tokens
curl "https://api.dexpaprika.com/search?query=USDC"
# Get all supported networks
curl "https://api.dexpaprika.com/networks"
```
***
## Quick example
```tsx React Hook theme={null}
import { useEffect, useState } from 'react';
function useCryptoPrice(chain: string, address: string) {
const [price, setPrice] = useState(null);
const [status, setStatus] = useState<'connecting' | 'connected' | 'error'>('connecting');
useEffect(() => {
const url = new URL('https://streaming.dexpaprika.com/sse/prices');
url.searchParams.set('method', 'token_price');
url.searchParams.set('chain', chain);
url.searchParams.set('address', address);
const eventSource = new EventSource(url.toString());
eventSource.onopen = () => setStatus('connected');
eventSource.addEventListener('token_price', (event) => {
const data = JSON.parse(event.data);
setPrice(parseFloat(data.price));
});
eventSource.onerror = () => setStatus('error');
return () => eventSource.close();
}, [chain, address]);
return { price, status };
}
// Usage
function PriceDisplay() {
const { price, status } = useCryptoPrice('ethereum', '0xc02aa...');
return (