Skip to main content

Get Multiple ERC20 token prices

POSThttps://deep-index.moralis.io/api/v2/erc20/prices

Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address

QUERY PARAMS
chainstring
The chain to query
includestring
If the result should contain the 24hr percent change
BODY PARAM
tokensarrayrequired
The tokens to be fetched
Responses
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'POST',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};

fetch('https://deep-index.moralis.io/api/v2/erc20/prices?chain=eth&include=percent_change', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
Empty