This guide explains how to track the Virtual Price of a token by deriving its value directly from a smart contract using the Etherscan API. Please note that this tracking method only applies if your token already meets our standard coin listing requirements.
Eligibility & Supported Chains
Currently, we only support virtual price tracking for smart contracts on the following chains:
- Ethereum
- BNB Smart Chain (BSC)
- Polygon
- Fantom
- Optimism
- Avalanche
- Arbitrum
- Base
- ZKsync
Required API Details
The virtual price data is supplied by the Etherscan API. You must configure a specific endpoint to integrate the price. Please refer to the Etherscan documentation on how to derive the required eth_call endpoint.
You will need to identify the following details for your proxy endpoint call:
- Chain: The specific blockchain network of your token.
- Virtual Price Contract Address: The contract address of the proxy or virtual contract.
- Virtual Price Method Hash: The hash function used to derive the price (you must include the 0x prefix).
- Decimal Places: The number of decimal places for the returned price on the contract.
- Underlying Asset: The unit the price is returned in. Accepted values include standard fiat currencies (e.g., usd, eur, gbp) and major crypto assets (e.g., btc, eth, bnb, link). If the underlying asset is listed on CoinGecko, please provide its CoinGecko API ID.
What Information to Submit
To request virtual price tracking, you must submit a support ticket containing the following information:
- Expected price
- Contract address that returns the price
- Function name (e.g., convertToAssets or pricePerShare)
- Return unit (e.g., USD, ETH, or the underlying token)
- Decimal places of the return value
- The full eth_call URL
Example Breakdown
If your full eth_call URL is: https://api.etherscan.io/v2/api?chainid=1&module=proxy&action=eth_call&to=0x69dD4D44eed6BbC33B8A0bdFe17897Ab9044372e&data=fb34cbea000000000000000000000000000000000001cdb57e58fa75fe420a0f4d6640d50000000000000000000000000000000000000000000000000de0b6b3a7640000&tag=latest&apikey=[]
You would extract and submit the following values in your ticket:
- Virtual Price Contract Address: 0x69dD4D44eed6BbC33B8A0bdFe17897Ab9044372e
- Virtual Price Currency: usd
- Virtual Price Decimal Places: 18
- Virtual Price Method Hash: 0xfb34cbea000000000000000000000000000000000001cdb57e58fa75fe420a0f4d6640d50000000000000000000000000000000000000000000000000de0b6b3a7640000
How to Submit Your Request
Once you have gathered all the required information, please submit a ticket by clicking the Submit a request button at the top right corner of the Help Center. Our operations team will review your details and assist you with the integration.
Comments
0 comments
Article is closed for comments.