Published in


How to use the Covalent Token Holders Tool to Export Data to a Spreadsheet

Block height refers to a specific location in a blockchain, measured by how many confirmed blocks precede it. The current block height of a blockchain is an indication of its current size or time in existence.

Basically, a Block height represents the number of blocks that have been confirmed in the entire history of a particular blockchain network — from the genesis block until the most recent one. In a blockchain Network, all blocks contain a reference (hash) to the block that came immediately before it. A block height is actually the number of each block in that sequence. So the block height of the genesis block is #0, and the block height of the first block mined is #1 and it goes on and on.

Covalent has an endpoint for querying the number of Token Holders and the amount of token each address holds at a Block Height for a Blockchain network. The endpoint when queried takes in the following information:

Retrieving block height information is a very common use case for individuals or organizations trying to investigate the number of people and/or contract addresses that hold a particular token at block height. Why is this important? There are a plethora of reasons, chief among them being the ability to easily reach conclusive decisions as a result of understanding the data. Also as an easy way to validate the information is correct. Before Covalent, it was not an easy task to achieve as there was no singular way to extract this information from a blockchain network without some programming skill. Now it is easy as any task, where you input information into a form and have the required data returned in an excel sheet.

There are two methods to get this information from the Covalent API. The first method requires some programming experience, where the user will query the endpoint directly and have the data returned in json or CSV format. The second method is to use the Covalent Token Holders tool.

Covalent Token Holders tool

Let us make an example query. We will query the UNI token as of Block Height:

The UNI token address is:

When using the token holders, fill the respective sections with the information, you can leave the page_number and page_size input fields empty. Select Ethereum as the Network.

UNI token at Block Height 11383235

Click on Submit. You will get a Dialogue Box to download the file. Click on Save and it will save it as a CSV document.

To view the file in a Google Spreadsheet (or any other spreadsheet), simply open a blank spreadsheet, click on: File >> Import and upload the CSV.

Spreadsheet containing the downloaded CSV file information

To query the API directly, you can simply head over to the Covalent docs.

Query the endpoint and you will get the response which you can then copy from the docs terminal:

Querying the API on the Covalent Docs

There are a plethora of use cases for the Covalent API. The simplicity of ease of use makes it possible for someone without any knowledge of programming to use Covalent internal built tools and Covalent partners to query blockchain data. The Token Holders tool is one of such examples to return a list of token holders at a particular Block height.

Having learned how to query UNI token address holders with the above example, you can go ahead and use the Token Holders tool to query any token address across the Ethereum, Binance Smart Contract, Polygon and Avalanche C-Chain Networks. In the near future, as more Network data get added to the Covalent API, the Token Holders tool will extend support as well to such Networks.

Thank you for reading the far. I know you found it useful. Please, leave some claps 👏 on the article. I’ll be glad you did! Thank you!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Emmanuel Odianosen

Software Developer living in Lagos, Nigeria. A Technical Writer proficient in JavaScript and Solidity.