Skip to main content
Version: 2.0

Get ERC20 token price

GEThttps://deep-index.moralis.io/api/v2/erc20/:address/price

Get the token price denominated in the blockchain's native token and USD. View supported exchanges here.

PATH PARAMS
addressstringrequired
The address of the token contract
QUERY PARAMS
chainstring
The chain to query
includestring
If the result should contain the 24hr percent change
exchangestring
The factory name or address of the token exchange. View supported exchanges here
to_blocknumber
The block number from which the token price should be checked
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.token.getTokenPrice({
"chain": "0x1",
"include": "percent_change",
"address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"tokenName": "Kylin Network",
"tokenSymbol": "KYL",
"tokenLogo": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png",
"tokenDecimals": "18",
"nativePrice": "",
"usdPrice": 19.722370676,
"usdPriceFormatted": "19.722370676",
"24hrPercentChange": "-0.8842730258590583",
"exchangeAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"exchangeName": "Uniswap v3",
"tokenAddress": "0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c",
"toBlock": "16314545"
}