omnia_getTokenPrice
Return the price of an ERC-20 token.
Please make sure that the token address for which the price is requested is corresponding to an ERC-20 token and the token is available on the network (endpoint) the request is sent to.
Parameters
DATA
, 20 Bytes - tokenAddress. ERC-20 token address for which the price is requested. REQUIREDDATA
, positive number - pricingDecimals. Number of decimals used for the returned price. Default value: 5. OPTIONAL
Returns
tokenAddress: address of the ERC-20 token
tokenSymbol: ERC-20 symbol as stored in the token smart contract
tokenDecimals: ERC-20 decimals as stored in the token smart contract
usdPrice: Positive number representing token price denominated in U.S. dollars. (0 if the price of the token cannot be determined)
Example
Response
Last updated