Bro
June 2, 2022, 6:03am
1
How to get burned supply of a token?
I want to get the market cap by using the total supply (minus burned supply) multiplied by current/latest price.
That’s the way poocoin shows it, they include locked but exclude burned, so I’m trying to do the same.
I know poocoin uses Web3 for their market cap data, but I don’t know how to do that and looked at the Web3 website I was provided by someone in here.
If I got market cap without excluded burned then it would be a fully diluted valuation instead of market cap.
Any help? Thank you
Sorry for the late reply. You can get the BURN supply of a token using a GraphQL query similar to this
You can get the latest Market Cap of a token using Bitquery through a GraphQL query as shown in this community forum post
Latest Price of a Token
The following is a GraphQL query to get the latest price of a token pair with 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c as the baseCurrency and 0xe9e7cea3dedca5984780bafc599bd69add087d56 as the quoteCurrency.
{
ethereum(network: bsc) {
dexTrades(
baseCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
date: {since: "2021-07-29"}
) {
date{
date(format: "%…
Bro
June 7, 2022, 3:59am
3
And regarding this burn query you provided, it doesn’t show the total burned supply of a token, it shows multiple burn events according to the block height or something like that.
I want the total sum that was burned by an individual token, like the balance that the burn address holds of the token I input.
As mentioned in my other reply, if possible I’d like to get total supply, total burned and price of a token, all within the same query.
Thx for your help
Please check if this GraphQL query solves your issue