# MarketCap of a Token

**URL:** <https://community.bitquery.io/t/marketcap-of-a-token/117>\
**Category:** GraphQL Tutorials\
**Created:** [June 6, 2021, 3:57am UTC](https://community.bitquery.io/t/marketcap-of-a-token/117 "2021-06-06T03:57:32Z")\
**Posts on this page:** 4\
**Page:** 1

<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 6, 2021, 3:57am UTC](https://community.bitquery.io/t/marketcap-of-a-token/117/1 "2021-06-06T03:57:32Z")

</div>

Let’s say if you want the Marketcap of a Binance Smart Chain token (BSC token) or Etheruem token or any other chain token.

Here are the steps

1- Get total Supply  
2- Getting Latest Price

**Getting the Total supply of a token**

To get the total supply, you can use our Address APIs to get the smart contract attributes. For example check the following query

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

```

To get the latest price, try following example query

> **[GraphQL IDE](https://graphql.bitquery.io/ide/CYi1LCfkDh?v=1)**
>
> Bitquery is analytical engine for blockchains

---

<div class="post-metadata">

**Author:** ![haxtuf](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@haxtuf](https://community.bitquery.io/u/haxtuf)\
**Post date:** [October 30, 2021, 2:58pm UTC](https://community.bitquery.io/t/marketcap-of-a-token/117/2 "2021-10-30T14:58:03Z")

</div>

Admins keep referring to this. It doesn’t work. It often returns a supply of 0.

---

<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:** [November 1, 2021, 2:25pm UTC](https://community.bitquery.io/t/marketcap-of-a-token/117/3 "2021-11-01T14:25:03Z")

</div>

Yes, we don’t have supply for many tokens, i suggest to fetch them on web3 apis directly.

---

<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:** [February 12, 2024, 6:15pm UTC](https://community.bitquery.io/t/marketcap-of-a-token/117/4 "2024-02-12T18:15:33Z")

</div>

MarketCap = Supply \* Price

To get supply, you can use token holder API

[Supply of a SAND token - Blockchain Data API](https://ide.bitquery.io/Supply-of-a-SAND-token) (more on docs [Token Holders API | Blockchain Data API (V2)](https://docs.bitquery.io/docs/examples/token-holders/token-holder-api/))

To get the latest price, use dex trade API

> **[Price in USD for SAND Token - Blockchain Data API](https://ide.bitquery.io/Price-in-USD-for-SAND-Token)**
>
> Price in USD for SAND Token

more on docs ([Bitquery V1 API Documentation | Blockchain Data API (V1 Docs)](https://docs.bitquery.io/v1/docs/Examples/dexTrades/dex-trading-data-api))
