General Use

How do you query an endpoint?

The API host for all requests is https://api.covalenthq.com/v1/.

The endpoint path is appended to the API host (without repeating the /v1/). For example, if the endpoint is GET /v1/{chain_id}/address/{address}/balances_v2/, then an example of the full request URL is:

https://api.covalenthq.com/v1/eth-mainnet/address/0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B/balances_v2/

All GoldRush APIs are called using GET requests (unless specified otherwise).

Each request must include your API_KEY passed either in the request header (Basic Auth) or as a query parameter.

When should you authenticate using a query parameter instead of Basic Auth?

We recommend that you should always use Basic Auth over authenticating via query parameter when possible. Authentication via query parameter is otherwise offered for all endpoints.

curl -X GET "https://api.covalenthq.com/v1/ENDPOINT/?key=API_KEY"

This works well when embedding the API in applications like Google Sheets or as iFrames that don’t support more sophisticated auth methods.

For more details, see Authentication.

What is the chainName?

The chainName or chainID is the unique integer identifier of an EVM-compatible blockchain. A global list of chain IDs can be found at: https://chainlist.org.

Note: the GoldRush APIs support both the global chainID integer and a GoldRush specific chain name such as eth-mainnet.

See the full list of supported chains and their corresponding name and ID.

Balances

What is a "dust" token type in the balances_v2 response?

Token balances for a address that are less than $0.10 USD in quote value are classified as dust.

What ERC interfaces are are listed in supports_erc and how do I use it for filtering token types?

Currently, the following ERC interfaces are supported: erc20, erc721, erc165, and erc1155. This field returns a list of all interfaces that a token contract meets so you will see, for example, both erc20 and erc721 listed for an NFT token contract since the erc721 interface is derived from erc20. To use supports_erc for filtering, use the following guidelines:

  • If erc1155 is returned in the list, the token contract follows the ERC1155 Multi Token Standard.
  • If erc721 is returned in the list, the token contract follows the ERC721 Non-Fungible Token (NFT) Standard.
  • If erc20 is returned without the other ones mentioned above, the token contract follows the ERC20 Fungible Token Standard.

Transactions

How does you determine if an address is involved in a transaction?

An address is deemed to be involved in a transaction if it appears in any of the following:

  • the to or from fields
  • as a sender of an event log
  • in any of the topic fields (e.g. topic1, topic2)