Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.
Overview
Welcome to the Covalent API!
The Covalent Unified API can be used to pull token balances, positions and historical granular transaction data from dozens of blockchain networks. This data enables hundreds of end-user use-cases like wallets, investor dashboards, taxation tools and as-of-yet unknown use-cases.
Switching from one blockchain network to another is simply changing the chain_name
path parameter. It's really that simple.
One Unified API. One Billion Possibilities.
The Covalent API is RESTful. The API is designed around the main resources that's available through the web interface. Sample API calls are provided next to each method using cURL
.
Broadly speaking, there are three classes of APIs:
Class A - APIs that return enriched blockchain data applicable to all blockchain networks, eg: token balances, transactions, log events, etc.
Class B - APIs maintained by Covalent for a specific protocol on a specific blockchain, eg: Constant Product AMMs (
XY=K
) on various blockchains.Class C - APIs created and maintained by the community.
URL Patterns
expand_moreAuthentication
expand_moreAuthentication via Query parameter
Simply append key=API_KEY
as a query parameter to all requests. The main advantage of this method is to embed the API endpoints within applications that do not support more sophisticated auth mechanisms, like Google Sheets or as IFrames.
curl -X GET https://api.covalenthq.com/v1/ENDPOINT/?key=API_KEY
Authentication via Basic Auth
Provide your API key as the basic auth username. You can find your API key in the web interface. You do not need to provide a password.
curl -X GET https://api.covalenthq.com/v1/ENDPOINT/ \ -u API_KEY: -H 'Content-Type: application/json' # The colon prevents curl from asking for a password.
Use of $CQT (Covalent Query Token)
expand_moreResponse format
By default, the Covalent API returns JSON responses with the same shape for all endpoints. The main keys are data
, error
, error_message
and error_code
.
You can ask for a CSV format by sending the format=csv
query parameter.
❴ "data": ..., "error": false, "error_message": null, "error_code": null ❵
Supported Networks
expand_moreRate limiting & Premium Tier
expand_moreRefresh rate
expand_morePagination
expand_moreError codes
Covalent uses standard HTTP response codes to indicate the success or failure of an API request. In general: codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx
range indicate an error with Covalent's servers (these are rare).
Support channels
Support is available via multiple channels:
Covalent Knowledge Base
Tutorials, Guides and References on the Unified API.
Covalent Discord Channel
Join our Discord server to see how others are using Covalent. The blah blah channel.
Frequently Asked Questions
FAQs on general use, class A/B/C endpoints, pricing, and more.
Change log
Available here.
Class A
APIs that return enriched blockchain data applicable to all blockchain networks, eg: token balances, transactions, log events, etc.
Get token balances for address
/v1/{chainName}/address/{walletAddress}/balances_v2/
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BalanceService.getTokenBalancesForWalletAddress(); console.log(resp.data); }
Get historical token balances for address
/v1/{chainName}/address/{walletAddress}/historical_balances/
Commonly used to fetch the historical native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address at a given block height or date. Response includes daily prices and other metadata.
Costs:
Processing:
Supports only Ethereum, Binance Smart Chain and Polygon.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BalanceService.getHistoricalTokenBalancesForWalletAddress(); console.log(resp.data); }
Get native token balance for address
/v1/{chainName}/address/{walletAddress}/balances_native/
Commonly used to get the native token balance for an address. This endpoint is required because native tokens are usually not ERC20 tokens and sometimes you want something lightweight.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BalanceService.getNativeTokenBalance(); console.log(resp.data); }
Get historical portfolio value over time
/v1/{chainName}/address/{walletAddress}/portfolio_v2/
Commonly used to render a daily portfolio balance for an address broken down by the token. The timeframe is user-configurable, defaults to 30 days.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BalanceService.getHistoricalPortfolioForWalletAddress(); console.log(resp.data); }
Get ERC20 token transfers for address
/v1/{chainName}/address/{walletAddress}/transfers_v2/
Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.BalanceService.getErc20TransfersForWalletAddress()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get token holders as of any block height (v2)
/v1/{chainName}/tokens/{tokenAddress}/token_holders_v2/
Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to latest
). Useful for building pie charts of token holders.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.BalanceService.getTokenHoldersV2ForTokenAddress()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get NFTs for address
/v1/{chainName}/address/{walletAddress}/balances_nft/
Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftsForAddress(); console.log(resp.data); }
Get NFTs from contract with metadata
/v1/{chainName}/nft/{contractAddress}/metadata/
Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.NftService.getTokenIdsForContractWithMetadata()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get single NFT with cached metadata from contract
/v1/{chainName}/nft/{contractAddress}/metadata/{tokenId}/
Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
Costs:
Processing:
This endpoint defaults to serving cached metadata for certain chains. If attempted on a non-cached chain, it issues a warning, advising the setting of with-uncached=true
.
For any given asset, if it's cached, the asset_cached
field on the response returns true
, providing the URL and other related data. If not cached yet, asset_cached
shows false
, with null values for the URL and other fields.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftMetadataForGivenTokenIdForContract(); console.log(resp.data); }
Get NFT transactions for contract
/v1/{chainName}/tokens/{contractAddress}/nft_transactions/{tokenId}/
Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftTransactionsForContractTokenId(); console.log(resp.data); }
Get traits for a collection
/v1/{chainName}/nft/{collectionContract}/traits/
Commonly used to fetch and render the traits of a collection as seen in rarity calculators.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getTraitsForCollection(); console.log(resp.data); }
Get trait summary for collection
/v1/{chainName}/nft/{collectionContract}/traits_summary/
Commonly used to calculate rarity scores for a collection based on its traits.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getCollectionTraitsSummary(); console.log(resp.data); }
Get attributes for a collection trait
/v1/{chainName}/nft/{collectionContract}/traits/{trait}/attributes/
Commonly used to get the count of unique values for traits within an NFT collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getAttributesForTraitInCollection(); console.log(resp.data); }
Get chain collections
/v1/{chainName}/nft/collections/
Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.NftService.getChainCollections()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get historical floor prices for a collection
/v1/{chainName}/nft_market/{contractAddress}/floor_price/
Commonly used to render a price floor chart for an NFT collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftMarketFloorPrice(); console.log(resp.data); }
Get historical volume for a collection
/v1/{chainName}/nft_market/{contractAddress}/volume/
Commonly used to build a time-series chart of the transaction volume of an NFT collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftMarketVolume(); console.log(resp.data); }
Get historical sales count for a collection
/v1/{chainName}/nft_market/{contractAddress}/sale_count/
Commonly used to build a time-series chart of the sales count of an NFT collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.getNftMarketSaleCount(); console.log(resp.data); }
Check ownership in NFT collection
/v1/{chainName}/address/{walletAddress}/collection/{collectionContract}/
Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.checkOwnershipInNft(); console.log(resp.data); }
Check ownership in NFT collection for specific token
/v1/{chainName}/address/{walletAddress}/collection/{collectionContract}/token/{tokenId}/
Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.NftService.checkOwnershipInNftForSpecificTokenId(); console.log(resp.data); }
Get token approvals for address
/v1/{chainName}/approvals/{walletAddress}/
Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.SecurityService.getApprovals(); console.log(resp.data); }
Get NFT approvals for address
/v1/{chainName}/nft/approvals/{walletAddress}/
Commonly used to get a list of NFT approvals across all token contracts categorized by spenders for a wallet’s assets.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.SecurityService.getNftApprovals(); console.log(resp.data); }
Get a transaction
/v1/{chainName}/transaction_v2/{txHash}/
Commonly used to fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales.
Costs:
Processing:
Enriched data when using with-dex
, with-lending
and with-nft-sales
is currently behind by ~40mins.
Safe data for L2 chains is currently available by using with-safe
. L1 data is coming soon.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.TransactionService.getTransaction(); console.log(resp.data); }
Get transaction summary for address
/v1/{chainName}/address/{walletAddress}/transactions_summary/
Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Calculate the age of the wallet and the time it has been idle and quickly gain insights into their engagement with web3.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.TransactionService.getTransactionSummary(); console.log(resp.data); }
Get earliest transactions for address (v3)
/v1/{chainName}/bulk/transactions/{walletAddress}/
Commonly used to fetch and render the earliest transactions involving an address. Frequently seen in wallet applications.
Costs:
Processing:
Returns the same results as the first timebucket for an address in the Get recent transactions endpoint.
curl -X GET https://api.covalenthq.com/v1/{chainName}/bulk/transactions/{walletAddress}/ \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get recent transactions for address (v3)
/v1/{chainName}/address/{walletAddress}/transactions_v3/
Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
Costs:
Processing:
Safe data for L2 chains is currently available by using with-safe
. L1 data is coming soon.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.TransactionService.getAllTransactionsForAddress()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get paginated transactions for address (v3)
/v1/{chainName}/address/{walletAddress}/transactions_v3/page/{page}/
Commonly used to fetch the transactions involving an address including the decoded log events in a paginated fashion.
Costs:
Processing:
This endpoint returns paginated transactions, starting with the earliest transactions on page 0. For the most recent transactions, refer to the Get recent transactions for address (v3) endpoint.
Safe data for L2 chains is currently available by using with-safe
. L1 data is coming soon.
curl -X GET https://api.covalenthq.com/v1/{chainName}/address/{walletAddress}/transactions_v3/page/{page}/ \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get bulk time bucket transactions for address (v3)
/v1/{chainName}/bulk/transactions/{walletAddress}/{timeBucket}/
Commonly used to fetch all transactions including their decoded log events in a 15-minute time bucket interval.
Costs:
Processing:
Safe data for L2 chains is currently available by using with-safe
. L1 data is coming soon.
curl -X GET https://api.covalenthq.com/v1/{chainName}/bulk/transactions/{walletAddress}/{timeBucket}/ \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all transactions in a block (v3)
/v1/{chainName}/block/{blockHeight}/transactions_v3/
Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.TransactionService.getTransactionsForBlock(); console.log(resp.data); }
Get all transactions in a block by page (v3)
/v1/{chainName}/block/{blockHeight}/transactions_v3/page/{page}/
Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
Costs:
Processing:
curl -X GET https://api.covalenthq.com/v1/{chainName}/block/{blockHeight}/transactions_v3/page/{page}/ \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get a block
/v1/{chainName}/block_v2/{blockHeight}/
Commonly used to fetch and render a single block for a block explorer.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getBlock(); console.log(resp.data); }
Get block heights
/v1/{chainName}/block_v2/{startDate}/{endDate}/
Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.BaseService.getBlockHeights()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get logs
/v1/{chainName}/events/
Commonly used to get all the event logs of the latest block, or for a range of blocks. Includes sender contract metadata as well as decoded logs.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getLogs(); console.log(resp.data); }
Get log events by contract address
/v1/{chainName}/events/address/{contractAddress}/
Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.BaseService.getLogEventsByAddress()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get log events by topic hash(es)
/v1/{chainName}/events/topics/{topicHash}/
Commonly used to get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); try { for await (const resp of client.BaseService.getLogEventsByTopicHash()) { console.log(resp); } } catch (error) { console.log(error.message); } }
Get resolved address for registered address
/v1/{chainName}/address/{walletAddress}/resolve_address/
Commonly used to resolve ENS, RNS and Unstoppable Domains addresses.
Costs:
Processing:
Note: all our endpoints support address resolution natively allowing an ENS, RNS or Unstoppable Domains address to be passed in directly.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getResolvedAddress(); console.log(resp.data); }
Get all chains
/v1/chains/
Commonly used to build internal dashboards for all supported chains on Covalent.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getAllChains(); console.log(resp.data); }
Get all chain statuses
/v1/chains/status/
Commonly used to build internal status dashboards of all supported chains.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getAllChainStatus(); console.log(resp.data); }
Get gas prices
/v1/{chainName}/event/{eventType}/gas_prices/
Get real-time gas estimates for different transaction speeds on a specific network, enabling users to optimize transaction costs and confirmation times.
Costs:
Processing:
Currently support these event types: erc20
token transfers, nativetokens
transfer, and uniswapv3
swap events.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getGasPrices(); console.log(resp.data); }
Get cross-chain activity for address
/v1/address/{walletAddress}/activity/
Commonly used to locate chains which an address is active on with a single API call.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.BaseService.getAddressActivity(); console.log(resp.data); }
Class B
APIs maintained by Covalent for a specific protocol on a specific blockchain, eg: Constant Product AMMs (XY=K
) on various blockchains.
Get XY=K pools
/v1/{chainName}/xy=k/{dexName}/pools/
Commonly used to get all the pools of a particular DEX. Supports most common DEXs (Uniswap, SushiSwap, etc), and returns detailed trading data (volume, liquidity, swap counts, fees, LP token prices).
Costs:
Processing:
The returned list of pools only contains the active ones and we define active as pools that have had atleast one swap in the last days.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getPools(); console.log(resp.data); }
Get XY=K pool by address
/v1/{chainName}/xy=k/{dexName}/pools/address/{poolAddress}/
Commonly used to get the 7 day and 30 day time-series data (volume, liquidity, price) of a particular liquidity pool in a DEX. Useful for building time-series charts on DEX trading activity.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getPoolByAddress(); console.log(resp.data); }
Get XY=K pools for ERC20 token address
/v1/{chainName}/xy=k/tokens/address/{tokenAddress}/pools/page/{page}/
Commonly used to get all pools and the supported DEX for a token. Useful for building a table of top pairs across all supported DEXes that the token is trading on.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getPoolsForTokenAddress(); console.log(resp.data); }
Get XY=K pools for wallet address
/v1/{chainName}/xy=k/address/{walletAddress}/pools/page/{page}/
Commonly used to get all pools and supported DEX for a wallet. Useful for building a personal DEX UI showcasing pairs and supported DEXes associated to the wallet.
Costs:
Processing:
Supports only Ethereum, Binance Smart Chain and Polygon.
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getPoolsForWalletAddress(); console.log(resp.data); }
Get XY=K address exchange balances
/v1/{chainName}/xy=k/{dexName}/address/{accountAddress}/balances/
Commonly used to return balance of a wallet/contract address on a specific DEX.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getAddressExchangeBalances(); console.log(resp.data); }
Get XY=K network exchange tokens
/v1/{chainName}/xy=k/{dexName}/tokens/
Commonly used to retrieve all network exchange tokens for a specific DEX. Useful for building a top tokens table by total liquidity within a particular DEX.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getNetworkExchangeTokens(); console.log(resp.data); }
Get XY=K supported DEXes
/v1/xy=k/supported_dexes/
Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getSupportedDEXes(); console.log(resp.data); }
Get XY=K DEX for pool address
/v1/{chainName}/xy=k/address/{poolAddress}/dex_name/
Commonly used to get the corresponding supported DEX given a pool address, along with the swap fees, DEX's logo url, and factory addresses. Useful to identifying the specific DEX to which a pair address is associated.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getDexForPoolAddress(); console.log(resp.data); }
Get XY=K swap count for exchange token
/v1/{chainName}/xy=k/{dexName}/tokens/address/{tokenAddress}/
Commonly used to get historical daily swap count for a single network exchange token.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getSingleNetworkExchangeToken(); console.log(resp.data); }
Get XY=K network liquidity pool token details
/v1/{chainName}/xy=k/{dexName}/tokens/address/{tokenAddress}/view/
Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getLpTokenView(); console.log(resp.data); }
Get XY=K transactions for account address
/v1/{chainName}/xy=k/{dexName}/address/{accountAddress}/transactions/
Commonly used to get all the DEX transactions of a wallet. Useful for building tables of DEX activity segmented by wallet.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getTransactionsForAccountAddress(); console.log(resp.data); }
Get XY=K transactions for token address
/v1/{chainName}/xy=k/{dexName}/tokens/address/{tokenAddress}/transactions/
Commonly used to get all the transactions of a token within a particular DEX. Useful for getting a per-token view of DEX activity.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getTransactionsForTokenAddress(); console.log(resp.data); }
Get XY=K transactions for DEX
/v1/{chainName}/xy=k/{dexName}/transactions/
Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getTransactionsForDex(); console.log(resp.data); }
Get XY=K transactions for exchange pool
/v1/{chainName}/xy=k/{dexName}/pools/address/{poolAddress}/transactions/
Commonly used for getting all the transactions of a particular DEX liquidity pool. Useful for building a transactions history table for an individual pool.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getTransactionsForExchange(); console.log(resp.data); }
Get XY=K ecosystem chart data
/v1/{chainName}/xy=k/{dexName}/ecosystem/
Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getEcosystemChartData(); console.log(resp.data); }
Get XY=K health data
/v1/{chainName}/xy=k/{dexName}/health/
Commonly used to ping the health of xy=k endpoints to get the synced block height per chain.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.XykService.getHealthData(); console.log(resp.data); }
Pricing
Get historical token prices
/v1/pricing/historical_by_addresses_v2/{chainName}/{quoteCurrency}/{contractAddress}/
Commonly used to get historic prices of a token between date ranges. Supports native tokens.
Costs:
Processing:
npm install @covalenthq/client-sdk
import { CovalentClient } from "@covalenthq/client-sdk"; const ApiServices = async () => { const client = new CovalentClient("YOUR_API_KEY"); const resp = await client.PricingService.getTokenPrices(); console.log(resp.data); }
Class C
APIs created and maintained by the community.
Get market data by address
/v1/cq/covalent/app/aave/market_data/
Processing:
Get market data for a specific Aave lending pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/aave/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/aave/markets/
Processing:
Get all markets for Aave including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/aave/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/aave/balances/
Processing:
Get balances for a Aave wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/aave/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/aave/transactions/
Processing:
Get transactions for a Aave wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/aave/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get redeemable token balance
/v1/cq/covalent/app/balancer/tokens/
Processing:
Get underlying tokens for a wallet's LP tokens.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/balancer/tokens \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/balancer/market_data/
Processing:
Get market data for a specific Balancer pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/balancer/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/balancer/markets/
Processing:
Get all markets for Balancer including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/balancer/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/balancer/transactions/
Processing:
Get transactions for a Balancer wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/balancer/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/balancer/balances/
Processing:
Get balances for a Balancer wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/balancer/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/bitcoin/transactions/
Processing:
Get transactions for a Bitcoin wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/bitcoin/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/compound/market_data/
Processing:
Get market data for a specific Compound lending pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/compound/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/compound/markets/
Processing:
Get all markets for Compound including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/compound/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/compound/balances/
Processing:
Get balances for a Compound wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/compound/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/compound/transactions/
Processing:
Get transactions for a Compound wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/compound/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get redeemable token balance
/v1/cq/covalent/app/curve/tokens/
Processing:
Get underlying tokens for a wallet's LP tokens.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/curve/tokens \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/curve/market_data/
Processing:
Get market data for all Curve pools.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/curve/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/curve/markets/
Processing:
Get all markets for Curve including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/curve/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/curve/transactions/
Processing:
Get transactions for a Curve wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/curve/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/curve/balances/
Processing:
Get balances for a Curve wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/curve/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/dodo/market_data/
Processing:
Get market data for a specific Dodo pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/dodo/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/dodo/markets/
Processing:
Get all markets for Dodo.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/dodo/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/dodo/transactions/
Processing:
Get transactions for a Dodo wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/dodo/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/dodo/balances/
Processing:
Get balances for a Dodo wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/dodo/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get redeemable token balance
/v1/cq/covalent/app/frax/tokens/
Processing:
Get underlying tokens for a wallet's LP tokens.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/frax/tokens \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/frax/market_data/
Processing:
Get market data for a specific Frax lending pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/frax/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/frax/markets/
Processing:
Get all markets for Frax including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/frax/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/frax/balances/
Processing:
Get balances for a Frax wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/frax/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/frax/transactions/
Processing:
Get transactions for a Frax wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/frax/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/instadapp/markets/
Processing:
Get all markets for InstaDapp.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/instadapp/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/instadapp/market_data/
Processing:
Get market data for all InstaDapp vaults.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/instadapp/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/instadapp/transactions/
Processing:
Get transactions for a InstaDapp wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/instadapp/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/instadapp/balances/
Processing:
Get balances for a InstaDapp wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/instadapp/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/lido/market_data/
Processing:
Get market data for a specific Lido lending pool.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/lido/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/lido/balances/
Processing:
Get balances for a Lido wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/lido/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/lido/transactions/
Processing:
Get transactions for a Lido wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/lido/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get market data by address
/v1/cq/covalent/app/yearn/market_data/
Processing:
Get market data for all Yearn vaults.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/yearn/market_data \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get all markets
/v1/cq/covalent/app/yearn/markets/
Processing:
Get all markets for Yearn including TVL, Supply and Borrow rates.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/yearn/markets \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get transactions by wallet address
/v1/cq/covalent/app/yearn/transactions/
Processing:
Get transactions for a Yearn wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/yearn/transactions \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password
Get balances for a wallet address
/v1/cq/covalent/app/yearn/balances/
Processing:
Get balances for a Yearn wallet.
curl -X GET https://api.covalenthq.com/v1/cq/covalent/app/yearn/balances \ -H 'Content-Type: application/json' \ -u YOUR_API_KEY: \ # The colon prevents curl from asking for a password