Skip to main content

ankr_getTokenPrice

Look up the USD price of a token or native coin

POST 

/?ankr_getTokenPrice

Returns Ankr's current USD price for the specified token. Pass a contractAddress for an ERC-20 token, or omit it to fetch the price of the chain's native coin.

Prices are normalized to decimal strings; treat them as USD per unit token. The same call returns the queried contract address so you can round-trip the result.

Part of the Token API product (700 compute units per call, $0.00007 at base rate).

Request

Responses

Success. JSON-RPC result contains chain, contract address, and a decimal-string USD price. JSON-RPC errors are returned with HTTP 200; check the response body for an error key.