Fetching Token Prices
Learn how to retrieve the price of any token using DexPaprika API with simple curl commands.
The API is currently in beta and we cannot guarantee the stability of the data. Please be aware that the data might be inaccurate or incomplete and therefore should not be used for any critical applications. If you find any issues, 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 simple cURL
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:
The response will include networks like Solana, Base, Aptos, Ethereum, etc. Choose the one you need.
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:
Replace 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:
Replace:
{network}
with the network (e.g.,solana
,base
){token_address}
with the address found in Step 2
The response will return data like this:
Step 4: Extract Only the Price
If you only need the token price in USD, you can filter the response using jq
:
This will return only the price:
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
Was this page helpful?