Code Examples
Copy-paste ready requests in cURL and Node.js for popular endpoints.
Every example authenticates with the X-API-Key header. Replace your-api-key-here with your own key.
List supported blockchains
curl "https://public-api.dextools.io/v3/blockchains" \
-H "X-API-Key: your-api-key-here"const response = await fetch(
'https://public-api.dextools.io/v3/blockchains',
{ headers: { 'X-API-Key': 'your-api-key-here' } },
);
const { data } = await response.json();
console.log(data);Get token information
curl "https://public-api.dextools.io/v3/tokens/ether/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984" \
-H "X-API-Key: your-api-key-here"const chain = 'ether';
const address = '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984';
const response = await fetch(
`https://public-api.dextools.io/v3/tokens/${chain}/${address}`,
{ headers: { 'X-API-Key': 'your-api-key-here' } },
);
const { data } = await response.json();
console.log(data);Get a token's pools
curl "https://public-api.dextools.io/v3/tokens/ether/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/pools?sort=creationTime&order=desc" \
-H "X-API-Key: your-api-key-here"const response = await fetch(
'https://public-api.dextools.io/v3/tokens/ether/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/pools?sort=creationTime&order=desc',
{ headers: { 'X-API-Key': 'your-api-key-here' } },
);
const { data } = await response.json();
console.log(data.results);Get hot pairs ranking
curl "https://public-api.dextools.io/v3/features/ether/hotpairs" \
-H "X-API-Key: your-api-key-here"const response = await fetch(
'https://public-api.dextools.io/v3/features/ether/hotpairs',
{ headers: { 'X-API-Key': 'your-api-key-here' } },
);
const { data } = await response.json();
data.forEach((pair) => console.log(pair.name, pair.price));