> For the complete documentation index, see [llms.txt](https://snowdot.gitbook.io/a-closer-look-at-chi-gastoken/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://snowdot.gitbook.io/a-closer-look-at-chi-gastoken/first-covalent-api-call.md).

# First Covalent API call

Now that we are all set with the Covalent API key and an IDE to run code, let's start finding the answer for our question. So, how many Chi tokens were minted, burned and transferred on the 1st of May, 2021 on the Ethereum network?

Let's break it down in smaller steps so it's easier to follow\..

### Step 1: Get the token address

As mentioned previously, a simple search on [etherscan.io](https://etherscan.io/) will retrieve the contract address for the Chi GasToken `0x0000000000004946c0e9F43F4Dee607b0eF1fA1c`

![](https://2755392393-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaowIeKpKCak6HuOwFp%2F-MasYVbyBcXPFIdrNN3j%2F-MasZQgNodnq003Q8bu3%2Fetherscan.PNG?alt=media\&token=47d6c2b4-41d4-4259-a9b6-8f2849ec6427)

### Step 2: Get the Ethereum chain id

We know that Chi is available on multiple networks so we need to get our hands on the Ethereum chain id. Looking at the [Covalent documentation](https://www.covalenthq.com/docs/api/#overview--supported-networks) in the **Supported Networks** section and there we see that the chain id for Ethereum is `1`.

![](https://2755392393-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaowIeKpKCak6HuOwFp%2F-MasZSSFGpfLw_Ohwr4A%2F-Mas_60_USVQEQvbI1rD%2Fnetworks.PNG?alt=media\&token=0fe6a2c1-5757-41ec-8921-a2f0ddc0660e)

### Step 3: Get block heights for the 1st of May, 2021

Blockchain data is stored in blocks. This is a bit different from the traditional timestamp we are used to when querying data. The good news is that blocks have timestamps too and there is a Restful API that serves exactly this purpose, to provide a block based on the date you provide it: `GET /v1/{chain_id}/block_v2/{start_date}/{end_date}/`

We have all the necessary parameters to perform our first API call. I do suggest making this call in parallel from the browser on [Covalent's documentation](https://www.covalenthq.com/docs/api/#get-/v1/{chain_id}/block_v2/{start_date}/{end_date}/) page so that it is easier to test and follow.&#x20;

If we look at the response we'll notice the following:\
\- the blocks are in ascending order so it's easy to spot the `starting_block` that we need;\
\- it has pagination and contains a `total_count` that allows us to compute the `ending_block` without the need to make an additional call;

{% embed url="<https://replit.com/@snowdot/getBlockHeights>" %}

After running the code we get the block heights we need for the 1st of May, 2021, respectively `starting_block = 12344945` and `ending_block = 12351433`

{% hint style="info" %}
**Tip!** At the time of writing this article, the number of **Ethereum Blocks Per Day** is at a current level of **6463**, up from 6425 yesterday and up from 6413 one year ago.&#x20;
{% endhint %}

Now we are all set to have a closer look at the mints, burns and transfers for the Chi GasToken so make sure to follow this tutorial until the end.
