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

Emmanuel Odianosen
Covalent
Published in
4 min readMar 24, 2021

--

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:


chain_id {string — required}
address {string — required}
block_height {string — not required}
page_number {int — not required}
page_size {int — not required}
format {json or csv}

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:

11383235

The UNI token address is:

0x1f9840a85d5af5bf1d1762f925bdaddc4201f984

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!

--

--

Emmanuel Odianosen
Covalent

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