# How do you get total supply/market cap?

**URL:** <https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193>\
**Category:** GraphQL API\
**Tags:** support, closed\
**Created:** [June 17, 2021, 7:44am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193 "2021-06-17T07:44:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![twinnie](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@twinnie](https://community.bitquery.io/u/twinnie)\
**Post date:** [June 17, 2021, 7:44am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/1 "2021-06-17T07:44:22Z")

</div>

I’m trying to put something together and I need to know the market cap for a BSC token. I can get the token price but I can’t get the total supply. It must be possible to get it somehow mustn’t it? Poocoin uses BitQuery and they get all these details.

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [June 18, 2021, 6:18am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/2 "2021-06-18T06:18:10Z")

</div>

They get it directly from Web3, however, we have Supply but not for all tokens…

```auto
{
  ethereum(network: bsc) {
    address(address: {is: "0x55d398326f99059ff775485246999027b3197955"}) {
      annotation
      address
      smartContract {
        attributes {
          name
          type
          value
        }
        contractType
        currency {
          symbol
          name
          decimals
          tokenType
        }
      }
      balance
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Bro](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Bro](https://community.bitquery.io/u/Bro)\
**Post date:** [May 5, 2022, 8:39am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/3 "2022-05-05T08:39:42Z")

</div>

What do you mean by “They get it directly from Web3”?

Isn’t Web3 just a term for Blockchain-integrated internet? Or Is there some company with that name? Or how would someone access “Web3” in the way that poocoin does for supply and market cap info?

Sorry if that’s a stupid question.

Thank you

---

<div class="post-metadata">

**Author:** ![aman](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@aman](https://community.bitquery.io/u/aman)\
**Post date:** [May 5, 2022, 3:30pm UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/4 "2022-05-05T15:30:26Z")

</div>

Web3.js is a utility that could be used for directly communicating with the blockchain. Here is a documentation that could assist you further.

[https://web3js.readthedocs.io/](https://web3js.readthedocs.io/)

---

<div class="post-metadata">

**Author:** ![Bro](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Bro](https://community.bitquery.io/u/Bro)\
**Post date:** [June 2, 2022, 6:07am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/5 "2022-06-02T06:07:53Z")

</div>

Thank you for this, but I don’t see circulating supply anywhere, or supply info in general.

I tried to do a search of the text on the website with “find in page” and couldn’t find “supply” or anything like that.

Do you have any insight on this?

I would like to get circulating supply.

I think of circulating as total supply minus locked and burned supply.

I’d be ok with total supply minus burned supply… if subtracting locked was an issue.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![sayon-bitquery](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/sayon-bitquery/32/522_2.png) [@sayon-bitquery](https://community.bitquery.io/u/sayon-bitquery)\
**Post date:** [June 5, 2022, 7:19pm UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/6 "2022-06-05T19:19:36Z")

</div>

If you are looking for getting the Total Supply of a token, you can get it using Bitquery’s Address API as shown in the following GraphQL query.

> **[Getting the total supply of a coin via Address API](https://graphql.bitquery.io/ide/HDFuI26Lnw)**
>
> Bitquery is analytical engine for blockchains

---

<div class="post-metadata">

**Author:** ![Bro](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Bro](https://community.bitquery.io/u/Bro)\
**Post date:** [June 7, 2022, 3:40am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/7 "2022-06-07T03:40:08Z")

</div>

Hello,

Thx for reply. I want to calculate market cap based on this methodology…

Total supply (minus burned) multiplied by current/latest price.

Is there a single query that could give me all three, total supply, burned supply and price of a token?

Someone in the telegram group gave me this query to get burned supply and total minted, but I also want current/latest price within same query if possible.

Take a look at this…

{  
ethereum(network: bsc) {  
transfers(date: {since: null, till: null}, amount: {gt: 0}) {  
burned: amount(  
calculate: sum  
receiver: {in: [“0x0000000000000000000000000000000000000000”, “0x000000000000000000000000000000000000dead”]}  
)  
minted: amount(  
calculate: sum  
sender: {in: [“0x0000000000000000000000000000000000000000”]}  
)  
currency(currency: {in: [“coin1”,“coin2”, “coin3”]}) {  
symbol  
name  
address  
}  
}  
}  
}

Thx for your help!

---

<div class="post-metadata">

**Author:** ![sayon-bitquery](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/sayon-bitquery/32/522_2.png) [@sayon-bitquery](https://community.bitquery.io/u/sayon-bitquery)\
**Post date:** [June 10, 2022, 5:15am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/8 "2022-06-10T05:15:59Z")

</div>

> [@Bro](#):
>
> Is there a single query that could give me all three, total supply, burned supply and price of a token?

Check this thread

> [@How to get burned supply of a token?](https://community.bitquery.io/t/how-to-get-burned-supply-of-a-token/1074/4):
>
> Please check if this GraphQL query solves your issue

---

<div class="post-metadata">

**Author:** ![sayon-bitquery](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/sayon-bitquery/32/522_2.png) [@sayon-bitquery](https://community.bitquery.io/u/sayon-bitquery)\
**Post date:** [June 10, 2022, 5:17am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/9 "2022-06-10T05:17:36Z")

</div>

> [@Bro](#):
>
> {  
> ethereum(network: bsc) {  
> transfers(date: {since: null, till: null}, amount: {gt: 0}) {  
> burned: amount(  
> calculate: sum  
> receiver: {in: [“0x0000000000000000000000000000000000000000”, “0x000000000000000000000000000000000000dead”]}  
> )  
> minted: amount(  
> calculate: sum  
> sender: {in: [“0x0000000000000000000000000000000000000000”]}  
> )  
> currency(currency: {in: [“coin1”,“coin2”, “coin3”]}) {  
> symbol  
> name  
> address  
> }  
> }  
> }  
> }

Does the above GraphQL query provides a solution to what you are referring to as **“Total Burned Supply”**??

---

<div class="post-metadata">

**Author:** ![Bro](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Bro](https://community.bitquery.io/u/Bro)\
**Post date:** [June 18, 2022, 3:50am UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/10 "2022-06-18T03:50:08Z")

</div>

No, that’s the query I provided to you guys in here earlier.

It sometimes works and sometimes doesn’t.

Because its calculating the burned sum based on specific transfers… it leaves some burned tokens out of the total because there’s other scenarios that result in tokens getting burned I guess.

Sometimes its correct, but a lot of the time it leaves some things out.

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [November 3, 2023, 2:36pm UTC](https://community.bitquery.io/t/how-do-you-get-total-supply-market-cap/193/11 "2023-11-03T14:36:12Z")

</div>

Updated here [Blockchain API Documentation (V1 Graphql Docs) | Blockchain GraphQL API (V1 API Docs)](https://docs.bitquery.io/v1/docs/building-queries/FAQ/#how-to-calculate-the-marketcap-of-a-token-)
