# Get current wallet balance of all holders for a bsc network token

**URL:** <https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [August 14, 2021, 7:18pm UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403 "2021-08-14T19:18:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cocili](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Cocili](https://community.bitquery.io/u/Cocili)\
**Post date:** [August 14, 2021, 7:18pm UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/1 "2021-08-14T19:18:40Z")

</div>

I’ve been following the development of bitquery for a while now and attempted to gather the current balance of all the holders of a token similar to bscscan balances page.

Here’s for example the balances page of SafeMoon:

> **[SafeMoon (SAFEMOON) Token Tracker | BscScan](https://bscscan.com/token/0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3#balances)**
>
> SafeMoon (SAFEMOON) Token Tracker on BscScan shows the price of the Token $0.00, total supply 1,000,000,000,000,000, number of holders 2,556,400 and updated information of the token. The token tracker page also shows the analytics and historical...

My understanding is that the balances API had some issues and it was turned off. Is there another API that I can use to get to this info?

Would appreciate an example query.

Here’s for example a way to get the balance of a single address on the bsc network for safemoon.  
How would I get the balances of all wallets in the same query?

```auto
query MyQuery {
  ethereum(network: bsc) {
    address(
      address: {in: ["0x0000000000000000000000000000000000000001"]}
  
    ) {
      address
      balances(currency: { in: ["0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3"]}) {
        currency {
          address
          symbol
        }
        value
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [August 15, 2021, 4:53am UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/2 "2021-08-15T04:53:48Z")

</div>

Hi @Cocili to get all the balance of more than 1 address in the same query, you can use the following query where 3 example addresses have been placed instead of 1.

```auto
query MyQuery {
  ethereum(network: bsc) {
    address(
      address: {in: [
        "0x0000000000000000000000000000000000000001",
        "0x8c128dba2cb66399341aa877315be1054be75da8",
        "0x79c4af7c43f500b9ccba9396d079cc03dfcafda1"
      ]}
    ) {
      address
      balances(currency: { in: ["0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3"]}) {
        currency {
          address
          symbol
        }
        value
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Cocili](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Cocili](https://community.bitquery.io/u/Cocili)\
**Post date:** [August 16, 2021, 4:49am UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/3 "2021-08-16T04:49:50Z")

</div>

Thanks @sayon but I know I can list more than 1 address by separating it with a comma.

My question was how to get the balances of “ALL” holders. I can’t manually write 2.5 million addresses.

---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [August 16, 2021, 5:01am UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/4 "2021-08-16T05:01:06Z")

</div>

Very true. So in order to get the addresses you can do one thing. Using the following query, you can find out the available addresses for the currency address

```auto
{
  ethereum(network: bsc){
    dexTrades(
      options: {limit: 10}
      buyCurrency: {is: "0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3"}
    ){
      address{
        address
      }
    }
  }
}

```

and then, you can make the returned address pass through the original query using variables as shown in the below query.

> **[https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-...](https://graphql.bitquery.io/ide/09Bk6CyfqP)**
>
> Bitquery is analytical engine for blockchains

---

<div class="post-metadata">

**Author:** ![mbajpai](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mbajpai](https://community.bitquery.io/u/mbajpai)\
**Post date:** [September 1, 2021, 7:31am UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/5 "2021-09-01T07:31:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [September 1, 2021, 11:38am UTC](https://community.bitquery.io/t/get-current-wallet-balance-of-all-holders-for-a-bsc-network-token/403/6 "2021-09-01T11:38:47Z")

</div>


