Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Get Multiple ERC20 token prices

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

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

Endpoint only works on the Mainnet chains.

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
tokens[0]
token_addressstring
The contract address
exchangestring
The exchange
to_blockstring
The block number
tokens[1]
token_addressstring
The contract address
exchangestring
The exchange
to_blockstring
The block number
tokens[2]
token_addressstring
The contract address
exchangestring
The exchange
to_blockstring
The block number
tokens[3]
token_addressstring
The contract address
exchangestring
The exchange
to_blockstring
The block number
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({ apiKey: "YOUR_API_KEY" });
const response = await Moralis.EvmApi.token.getMultipleTokenPrices({
"chain": "0x1",
"include": "percent_change"
},{
"tokens": [
{
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
{
"tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
{
"exchange": "uniswapv2",
"tokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toBlock": "16314545"
},
{
"tokenAddress": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
}
]
});
console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
Empty