Tutorial overview
Fetch real‑time token prices from the DexPaprika DEX API using anetwork
id and token_address
.
The DexPaprika API provides reliable data access. If you find any issues or have suggestions for improvement, please contact us.
Fetching Token Prices
This tutorial will walk you through retrieving the latest price of any token using DexPaprika API. We will use simplecURL
commands to interact with the API.
You can test the API directly in the documentation without writing any code. Visit the API Reference to try it out.
Step 1: Get Available Networks
To fetch token data, you need the network ID. Use this request to get a list of supported blockchain networks:You can find the full list of supported networks in the Networks API.
Step 2: Find a Token Address
If you don’t have a token address, you can search for it using the API:YOUR_INPUT
with the actual phrase you’re looking for. The response will return matching token & pools along with their addresses.
Step 3: Fetch the Token Price
Once you have the network ID and token address, use the following request to get the token’s price:{network}
with the network (e.g.,solana
,base
){token_address}
with the address found in Step 2
Response
Step 4: Extract Only the Price (single token)
If you only need the token price in USD, you can filter the response usingjq
:
Step 5: Fetch Prices for Multiple Tokens (batch)
If you need prices for multiple tokens at once on the same network, use the batch pricing endpoint:Response
- Repeat the
tokens
query parameter for each address. - Unknown or unpriced tokens are omitted from the array.
- Order is not guaranteed.
Explore the full endpoint docs: Get batched token prices on a network
Next Steps
Quick API Reference
Jump straight into the API documentation and start making requests within minutes.
More Tutorials
Learn more ways to integrate DexPaprika into your applications.
Get Support
Join Discord
Connect with our community and get real-time support.
Give Feedback
Share your experience and help us improve.
FAQs
What do I need to fetch a token price?
What do I need to fetch a token price?
The
network
id (e.g., solana
, ethereum
) and the on‑chain token_address
.What is the price currency?
What is the price currency?
summary.price_usd
returns USD. Other quote currencies may be added later; USD is the canonical quote.How accurate are prices on low‑liquidity pools?
How accurate are prices on low‑liquidity pools?
Thin pools can be noisy; prefer higher‑volume pools or the token’s main pool from the token response.
Do I need an API key?
Do I need an API key?
No. The API is public; no keys or registration required.