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

Get ERC20 Token Price

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

Retrieve the current or historical price of an ERC20 token in the blockchain’s native currency and USD. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.

PATH PARAMS
addressstringrequired
The address of the token contract
QUERY PARAMS
chainstring
The chain to query
exchangestring
The factory name or address of the token exchange
to_blocknumber
The block number from which the token price should be checked
includestring
This parameter is now deprecated as percentage change are included by default
max_token_inactivitynumber
Exclude tokens inactive for more than the given amount of days
min_pair_side_liquidity_usdnumber
Exclude tokens with liquidity less than the specified amount in USD. This parameter refers to the liquidity on a single side of the pair.
Responses
200Returns the price denominated in the blockchain's native token and USD for a given token contract address
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
API KEY
curl --request GET \
--url 'https://deep-index.moralis.io/api/v2.2/erc20/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0/price?chain=eth' \
--header 'accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY'
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",
"possibleSpam": "false",
"verifiedContract": true,
"pairAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"pairTotalLiquidityUsd": "123.45",
"usdPrice24h": 1,
"usdPrice24hrUsdChange": -0.00008615972490000345,
"usdPrice24hrPercentChange": -0.008615972490000345,
"securityScore": 1
}