Class A Endpoints
Introduction
We at Covalent define Class A endpoints as those that return enriched blockchain data and are applicable to all blockchain networks such as balances, transactions, log events, etc. These endpoints are generic and are available via the same API on all supported blockchains. All the user needs to do is simply change a single parameter - the chainId
.
These endpoints are part of our unique value proposition and, we believe, are not matched by any competitor in the blockchain space.
Prerequisites
Endpoints Summary:
The following are the most popular Class A endpoints with a description of the enriched blockchain data they return:
{chainId}/address/{address}/balances_v2/
- Get token balances for
address
. Return a list of all ERC20 and NFT token balances including ERC721 and ERC1155 along with their current spot prices.
- Get token balances for
{chainId}/address/{address}/transactions_v2/
- Retrieve all transactions for
address
including their decoded log events. This endpoint does a deep-crawl of the blockchain to retrieve all kinds of transactions that references the address.
- Retrieve all transactions for
{chainId}/address/{address}/transfers_v2/
- Get ERC20 token transfers for
address
alongwith historical token prices.
- Get ERC20 token transfers for
{chainId}/tokens/{address}/nft_metadata/{tokenId}/
- Given a NFT contract address and a token ID, fetch and return the external metadata. Both ERC751 as well as ERC1155 are supported.
{chainId}/tokens/{contract_address}/token_holders/
- Return a paginated list of token holders
contract_address
as of any historical block height.
- Return a paginated list of token holders
{chainId}/events/address/{contract_address}/
- Return a paginated list of decoded log events emiited by a particular smart contract.
{chainId}/events/topics/{topic}/
- Return a paginated list of decoded log events with one or more topic hashes separated by a comma.
The following tutorials use JavaScript code templates and the Covalent API docs to explore several API endpoints and how they can individually power entire apps. The code templates are hosted on Repl.it.
Tutorials
- This tutorial walks through the details of using the
balances_v2
API endpoint. We will then use the response data and a basic HTML/CSS/JavaScript front-end to create a simple wallet dashboard.
- This tutorial walks through the details of using the
- This tutorial builds upon the previous tutorial to return additional granualar data about the NFTs (both ERC721 and ERC1155 interface standards).
- This tutorial walks through the details of using the
transfers_v2
API endpoint. We will then use the response data and a basic HTML/CSS/JavaScript front-end to create a simple wallet balance and transfers dashboard.
- This tutorial walks through the details of using the