API ReferencePrice APIToken PricesGet ERC20 token priceGet ERC20 Token PriceGEThttps://deep-index.moralis.io/api/v2.2/erc20/:address/priceRetrieve 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 PARAMSaddressstringrequiredThe address of the token contractQUERY PARAMSchainstringThe chain to queryeth0x1sepolia0xaa36a7polygon0x89bsc0x38bsc testnet0x61avalanche0xa86afantom0xfacronos0x19arbitrum0xa4b1chiliz0x15b38chiliz testnet0x15b32gnosis0x64gnosis testnet0x27d8base0x2105base sepolia0x14a34optimism0xaholesky0x4268polygon amoy0x13882linea0xe708moonbeam0x504moonriver0x505moonbase0x507linea sepolia0xe705flow0x2ebflow-testnet0x221ronin0x7e4ronin-testnet0x7e5lisk0x46flisk-sepolia0x106apulse0x171sei0x531exchangestringThe factory name or address of the token exchangeto_blocknumberThe block number from which the token price should be checkedincludestringThis parameter is now deprecated as percentage change are included by defaultmax_token_inactivitynumberExclude tokens inactive for more than the given amount of daysmin_pair_side_liquidity_usdnumberExclude tokens with liquidity less than the specified amount in USD. This parameter refers to the liquidity on a single side of the pair.Responses200Returns the price denominated in the blockchain's native token and USD for a given token contract address400Bad Request404Not Found429Too Many Requests500Internal Server ErrorAPI KEYTest Live APIcURLNode.jsPythonGoPHPcurl --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' // Node.js v18+ has native fetch support// No additional dependencies requiredconst options = { method: 'GET', headers: { accept: 'application/json', 'X-API-Key': 'YOUR_API_KEY' },};fetch('https://deep-index.moralis.io/api/v2.2/erc20/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0/price?chain=eth', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://deep-index.moralis.io/api/v2.2/erc20/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0/price?chain=eth"headers = { "Accept": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("GET", url, headers=headers)print(response.text)package mainimport ( "fmt" "net/http" "io")func main() { url := "https://deep-index.moralis.io/api/v2.2/erc20/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0/price?chain=eth" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2.2/erc20/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0/price?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns the price denominated in the blockchain's native token and USD for a given token contract address{ "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}