DEV Community

Divyasshree
Divyasshree

Posted on • Updated on

All questions on the token holders from StackOverflow answered

How to get Ethereum token holders' amount history and analysis daily

https://stackoverflow.com/questions/68980485/how-to-get-ethereum-token-holders-amount-history-and-analysis-daily

You can do a complete analysis of token holders with Bitquery's Token Holder API. You can get top holders for a Token for example, by simply writing a click-select query. The below example gets the top holders of Mutant Ape Yacht Club: MAYC Token on 22nd October 2023.

{
  EVM(dataset: archive, network: eth) {
    TokenHolders(
      date: "2023-10-22"
      tokenSmartContract: "0x60E4d786628Fea6478F785A6d7e704777c86a7c6"
      limit: {count: 10}
      orderBy: {descending: Balance_Amount}
    ) {
      Holder {
        Address
      }
      Balance {
        Amount
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Getting a list of ERC20 token holders in solidity

https://stackoverflow.com/questions/52601289/getting-a-list-of-erc20-token-holders-in-solidity

You could try using an on-chain indexer that has token holder data.

Bitquery, for example, has an API for token holders that provides information on holders, their holdings, top holders, and other details.

Here's an example. This query gives you top holders for USDT
You can run it here.

query MyQuery {
  EVM(dataset: archive, network: eth) {
    TokenHolders(
      date: "2023-10-29"
      tokenSmartContract: "0xdAC17F958D2ee523a2206206994597C13D831ec7"
      orderBy: {descending: Balance_Amount}
      limit: {count: 10}
    ) {
      Balance {
        Amount
      }
      Holder {
        Address
      }
      Currency {
        Name
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

enter image description here

Token Holder History By Date Query

https://stackoverflow.com/questions/77161497/token-holder-history-by-date-query-in-dune-analytics

Get token balance as of x Date

https://stackoverflow.com/questions/48665783/get-token-balance-as-of-x-date

How to get transfer with token USDT of address balance in web3 python in ethereum

https://stackoverflow.com/questions/76753381/how-to-get-transfer-with-token-usdt-of-address-balance-in-web3-python-in-ethereu/77388621#77388621
You can use a blockchain data indexer to get it without contacting the ABI.

Bitquery has a transfers API and token holders API. For the address you have mentioned, you can get all transfers from this address with this query. There is an auto-code generator that will generate the code in Python for you.
enter image description here

{
  ethereum(network: ethereum) {
    transfers(
      options: {desc: "block.height", limit: 10, offset: 0}
      sender: {is: "0x28C6c06298d514Db089934071355E5743bf21d60"}
      amount: {gt: 0}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      sender {
        address
        annotation
      }
      receiver {
        address
        annotation
      }
      currency {
        address
        symbol
      }
      amount
      amount_usd: amount(in: USD)
      transaction {
        hash
      }
      external
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

run it here

Top comments (0)