API Overview
Covalent provides a unified API to bring full transparency and visibility to assets across all blockchain networks.
To get started, sign up for an API Key.
JSON support | CSV support |
---|---|
![]() |
![]() |
The Covalent API is RESTful and offers the following out-of-the-box for each supported blockchain:
Covalent API | |
---|---|
Response formats | JSON and CSV |
Real time response | 2 blocks |
Batch response | 30 minutes |
Request volume limit | None |
Request rate limit | 5 requests per second |
Base URL | https://api.covalenthq.com/v1/ |
Sample Endpoints | Class A - Balances - Transactions - Transfers - Token Holders - Log Events (Contract Address) - Log Events (Topic Hash) |
Try the Covalent API directly in your browser from our API Reference or use the code examples below. The following JSON response format is the same for all endpoints:
❴
"data": ...,
"error": false,
"error_message": null,
"error_code": null
❵
Curl
curl -X GET "https://api.covalenthq.com/v1/{chain_id}/address/{address}/balances_v2/?key={YOUR API KEY}" -H "Accept: application/json"
JavaScript
const APIKEY = 'YOUR API KEY';
const baseURL = 'https://api.covalenthq.com/v1'
const blockchainChainId = '1'
const demoAddress = 'demo.eth'
async function getWalletBalance(chainId, address) {
const url = new URL(`${baseURL}/${chainId}/address/${address}/balances_v2/?key=${APIKEY}`);
const response = await fetch(url);
const result = await response.json();
const data = result.data;
console.log(data)
return data;
}
// Example address request
getWalletBalance(blockchainChainId, demoAddress);
Python
import requests
API_KEY = 'YOUR API KEY'
base_url = 'https://api.covalenthq.com/v1'
blockchain_chain_id = '1'
demo_address = 'demo.eth'
def get_wallet_balance(chain_id, address):
endpoint = f'/{chain_id}/address/{address}/balances_v2/?key={API_KEY}'
url = base_url + endpoint
result = requests.get(url).json()
data = result["data"]
print(data)
return(data)
# Example address request
get_wallet_balance(blockchain_chain_id, demo_address)
Use Cases
The Covalent API supports a broad range of Web3 data use cases including:
Check out our collection of ready-to-ship Code Templates that you can use to build your Web3 data-powered apps.
Resources
Here are some additional resources to help you get started with the Covalent API:
Sections
Last modified: October 27, 2022: october-changelog-2022 (#243) (b6121bb)