Reputation: 41
I'm looking at updating the Coinmarketcap listing for a token on the Solana blockchain.
For Total Supply Coinmarketcap asks to provide:
"API endpoint that displays ONLY 'Total Supply' as a numerical value (e.g. http://chainz.cryptoid.info/grs/api.dws?q=totalcoins)"
How would I go about doing this?
Upvotes: 4
Views: 1280
Reputation: 8402
The getTokenSupply
endpoint on the Solana JSON RPC will get you close: https://docs.solana.com/developing/clients/jsonrpc-api#gettokensupply
Unfortunately, it isn't a normal REST API endpoint, so it requires some parameters, and it provides JSON output. In the output, you'll need the uiAmountString
. You may need to add in something to proxy the call and extract the value if CoinMarketCap is so stringent.
Upvotes: 1