Skip to main content

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.
{"message": "invalid query param"}
Common causes:
  • Invalid order_by or sort_by value (e.g., using liquidity when only volume_usd, price_usd, transactions, last_price_change_usd_24h, created_at are valid)
  • 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 (e.g., start for OHLCV)
What to do: Check the parameter values against the API reference or common patterns.

404 — Not Found

The requested resource doesn’t exist.
{"message": "not found"}
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.
{"error": "Endpoint Removed", "message": "This endpoint has been permanently removed. Please refer to our API documentation for alternatives."}
Currently applies to:
  • GET /pools — the global pools endpoint was deprecated in v1.3.0. Use GET /networks/{network}/pools instead.

429 — Too Many Requests

Rate limit exceeded. Free tier limit: 10,000 requests per day. What to do:
  • Cache responses for data that doesn’t change every second (network lists, DEX lists)
  • Use batch pricing instead of individual token requests
  • Use the streaming API for real-time prices instead of polling
  • Consider the Pro API for unlimited requests

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 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)

StatusMeaning
200Connected successfully, streaming
400Bad parameters, unsupported chain, token not found, or one invalid asset in a batch
429Global stream limit exceeded (10,000 concurrent streams per server)
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

All paginated endpoints in DexPaprika are 1-indexed:
  • page=1 returns the first page
  • page=0 is silently treated as page=1 (not an error, but may cause confusion)
Maximum page size is 100 items (via limit parameter). Transaction pagination is limited to 100 pages — for deeper history, use cursor-based pagination with the cursor parameter.

Common mistakes and fixes

Symptom: GET /networks/{network}/pools?limit=1 returns {"pools": [], "page_info": {...}}Cause: Some combinations of very small limits can return empty results due to internal filtering.Fix: Use limit=10 or higher. The minimum practical limit is 2–3.
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.
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).
Symptom: Code that works with /pools breaks when switched to /pools/filter.Cause: Different response schemas. Filter uses address (not id), volume_usd_24h (not volume_usd), txns_24h (not transactions), and wraps results in results (not pools).Fix: Handle each endpoint’s response format separately. See common patterns for the exact filter response structure.
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

The API does not currently return standard rate limit headers (X-RateLimit-*). Monitor your daily usage on your side.
The daily limit resets on a rolling 24-hour window. After hitting the limit, wait and retry.
No. The 10,000 request/day limit applies across all endpoints combined.