Getting Started with Covalent

Gin Davi
Covalent
Published in
6 min readMar 20, 2021

The Ethereum blockchain has grown very popular. The value/price of Ether, Ethereum’s cryptocurrency, is continuously increasing. Every day, billions of transactions, occur across many smart contracts over the Ethereum blockchain. These smart contracts, together with Ethereum wallets and the tons of digital assets on Ethereum, are part of a huge amount of data, that constitutes the Ethereum network.

Well, it is not just Ethereum. Other blockchains like Binance Chain, Polygon (previously Matic Network), CasperLabs, Elrond, Avalance,… that support smart contracts, all generate tons of data every day. Such blockchain data is indispensable for developers, engineers, analysts, traders, and all those who interact with cryptocurrencies (everyone will definitely do so one day).

The data is huge. Accessing it was usually a big problem. Understanding and breaking down this data was much harder. Worst? one needed lots of technical knowledge and computing power, to make sense of the raw blockchain data. Today, with Covalent, the story is different. With Covalent, all blockchain data is clear and easy-to-use. Also, Covalent is FREE.

Covalent Logo

What is Covalent?

Covalent is your one-stop-shop for all data you will ever need from the Ethereum blockchain. It is a platform that brings full transparency and visibility to assets across all blockchain networks. Covalent provides data that supports diverse use-cases like wallets, exchanges, custodians, taxation amongst many others. It serves as an ecosystem around which many decentralized apps (DApps) are built today. In fact, without Covalent, the cryptocurrency community would have not achieved some progress it has now.

Covalent is built by a smart team of financial analysts, data scientists, blockchain, and database engineers passionate about improving and scaling blockchain technologies. Covalent is the only no code, zero-config solution that does not require an engineer. It has rich indexing and query technology that supports a wide range of use-cases. It is built for enterprise, yet available for all.

About DeFis

Decentralized Finance (DeFi) is a blockchain-based form of finance that does not rely on central financial intermediaries like banks, or exchanges to offer traditional financial funding. Instead, DeFi platforms utilize smart contracts on blockchains to allow people to lend or borrow funds from others, speculate on price movements on a range of assets using derivatives, trade cryptocurrencies, insure against risks, and earn interest in savings-like accounts. DeFi revolves around DApps in which transactions occur directly between peers, mediated by smart contracts, rather than through a centralized intermediary. Examples of DeFi trading platforms include Aave, Balancer, Compound, Curve, MakerDAO, Sushiswap, Uniswap, etc…

Why you should use Covalent

1. For DeFis

Every single DeFi transaction is a taxable event. You can use Covalent to know and calculate trades, fees, liquidities, and profits in DeFis. The biggest funds in the crypto-space use Covalent to calculate liabilities. Every single wallet application on Ethereum aggregates data across various DeFi protocols using Covalent. Besides, there are a lot of rich data structures in crypto networks that are currently inaccessible without Covalent. You can use such data to make well-informed decisions in your crypto journey.

2. For Developers

Developers too can build a lot of DApps on Covalent. Many apps have been built and much more are being built. In fact, Covalent has promised to build a self-serve Software Development Kit (SDK) that will allow developers to build new APIs for all yet to be discovered use-cases.

3. The Community

There is a great community of Covalent lovers and users on Telegram and Discord. In addition, Covalent hosts a variety of events you can take part in. Join us at https://covalenthq.com/events/. Covalent also has an ambassador program where passionate community members help shape the Covalent data infrastructure and helping in building the ecosystem. As an alchemist (how ambassadors are called), you extend the Covalent team and make a huge impact on the Covalent community. You can become an alchemist too! Know more here.

The Covalent API

The data provided by Covalent is in the form of an API. API stands for Application Programming Interface. In non-technical terms, APIs are just standards/means by which anyone or any platform can make data accessible to some people or to everybody. Covalent provides a public API around the Ethereum network over which anyone can access and use rich blockchain data. Anyone can use the Covalent API. All you need is an API Key.

API Key

API keys are unique identifiers that authenticate anyone accessing an API. In other words, through the help of API keys, Covalent can track which users are making calls to (accessing data via) the API. Because Covalent is FREE, to get your API key, all you need is to create your account with Covalent here (without any payments). Once in your account, you can always get your API key at any time.
Note: API keys should always be kept secret. They are secret keys and should be handled as passwords. Keep them safe as they will be useful to you when using Covalent’s API. You can always get them from your dashboard when you log in.

(When we will test the Covalent API (later in this blog), we will need an API key, go get yours and keep it ready.)

Covalent’s API Documentation

APIs are usually documented to make it easy for users to understand how to use them. API documentation is a manual that tells users and developers the parameters to plug into an API, how to plug them in, and the kind of results they should expect.

Covalent’s API Documentation is one of the best out there. It gives proper explanations for everything you should expect about the API. It also has a unique feature that distinguishes it from other documentations: Testing. By testing, you can view the results of API calls, directly from the API docs. You don’t need external API explorer tools like Postman to achieve that. Of course, if you are a developer, you can still use cURL with the command line.

Covalent’s API has two classes of endpoints:
1. Class A — endpoints that return enriched blockchain data applicable to all blockchain networks, eg: balances, transactions, log events, etc.
2. Class B — endpoints for a specific protocol on a blockchain, eg: AAVE is Ethereum-only and is not applicable to other blockchain networks.

Testing Endpoints

At this point, we will get a little technical. If you understand how APIs work, you would find this section easy. If you don’t stay tuned. One thing you should keep in mind is that data would be returned to you in key/value pairs (JSON format).

1. Go here (please right-click and open in a new tab/window), paste your API key into the white box, and click on SET.

2. Scroll down to the second endpoint titled ”Get Aave address balances”. There, enter demo.eth as the address parameter. Click on TRY. The Covalent API should return data with valid token balances for demo.eth

Hooray!!!

You have just used Covalent. Welcome to the Covalent Community! Explore more of the Covalent API!!

Note:

demo.eth is an example of an ENS (Ethereum Name Service), which is a shorten formed for Ethereum wallet addresses. We simply used it here to demo Covalent’s API.

Go and Explore

There is more to using Covalent’s API than testing demo.eth for Aave address balances. You should study and explore the other endpoints, the documentation explains everything. You can use the Covalent API for any analysis, for building DApps, analyzing DeFi profits, etc… The complexity of endpoints you use depends on what you want to do with the data. Go forth, explore the Covalent API, and use the data as you wish.

#CovalentAlchemist #DataScience #Blockchain #DeFi #Covalent

Thank you!

--

--