Cross Chain
Balances
Transactions
- GETGet a transaction
- GETGet transaction summary for address
- GETGet earliest transactions for address (v3)
- GETGet recent transactions for address (v3)
- GETGet paginated transactions for address (v3)
- GETGet bulk time bucket transactions for address (v3)
- GETGet all transactions in a block by page (v3)
- GETGet all transactions in a block (v3)
NFT
- Core Rendering
- Market Data
- Ownership & Token Gating
Bitcoin
Get ERC20 token transfers for address
Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getErc20TransfersForWalletAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"address": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"quote_currency": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"miner_address": "<string>",
"from_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"transfers": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"from_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"logo_url": "<string>",
"transfer_type": "<string>",
"delta": "<string>",
"balance": "<string>",
"quote_rate": 123,
"delta_quote": 123,
"pretty_delta_quote": "<string>",
"balance_quote": 123,
"method_calls": [
{
"sender_address": "<string>",
"method": "<string>"
}
],
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
]
}
]
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}
Processing: Realtime
Path Parameters
The chain name eg: eth-mainnet
.
The requested address. Passing in an ENS
, RNS
, Lens Handle
, or an Unstoppable Domain
resolves automatically.
Query Parameters
The currency to convert. Supports USD
, CAD
, EUR
, SGD
, INR
, JPY
, VND
, CNY
, KRW
, RUB
, TRY
, NGN
, ARS
, AUD
, CHF
, and GBP
.
The requested contract address. Passing in an ENS
, RNS
, Lens Handle
, or an Unstoppable Domain
resolves automatically.
The block height to start from, defaults to 0
.
The block height to end at, defaults to current block height.
Number of items per page. Omitting this parameter defaults to 100.
0-indexed page number to begin pagination.
Response
The requested address.
The timestamp when the response was generated. Useful to show data staleness to users.
The requested quote currency eg: USD
.
The requested chain ID eg: 1
.
The requested chain name eg: eth-mainnet
.
List of response items.
The block signed timestamp in UTC.
The height of the block.
The hash of the block. Use it to remove transactions from re-org-ed blocks.
The requested transaction hash.
The offset is the position of the tx in the block.
Whether or not transaction is successful.
The address of the miner.
The sender's wallet address.
The label of from
address.
The receiver's wallet address.
The label of to
address.
b;The value attached to this tx.
The value attached in quote-currency
to this tx.
A prettier version of the quote for rendering purposes.
The requested chain native gas token metadata.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The string returned by the name()
method.
The ticker symbol for this contract. This field is set by a developer and non-unique across a network.
Use the relevant contract_address
to lookup prices, logos, token transfers, etc.
A list of supported standard ERC interfaces, eg: ERC20
and ERC721
.
The contract logo URL.
The gas spent for this tx.
The gas price at the time of this tx.
b;The transaction's gas_price * gas_spent, denoted in wei.
The gas spent in quote-currency
denomination.
A prettier version of the quote for rendering purposes.
The native gas exchange rate for the requested quote-currency
.
The block signed timestamp in UTC.
The requested transaction hash.
The sender's wallet address.
The label of from
address.
The receiver's wallet address.
The label of to
address.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The string returned by the name()
method.
The ticker symbol for this contract. This field is set by a developer and non-unique across a network.
Use the relevant contract_address
to lookup prices, logos, token transfers, etc.
The contract logo URL.
Categorizes token transactions as either transfer-in
or transfer-out
, indicating whether tokens are being received or sent from an account.
b;The delta attached to this transfer.
b;The asset balance. Use contract_decimals
to scale this balance for display purposes.
The exchange rate for the requested quote currency.
The current delta converted to fiat in quote-currency
.
A prettier version of the quote for rendering purposes.
The current balance converted to fiat in quote-currency
.
Pagination metadata.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.BalanceService.getErc20TransfersForWalletAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"address": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"quote_currency": "<string>",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"miner_address": "<string>",
"from_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"transfers": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"from_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"logo_url": "<string>",
"transfer_type": "<string>",
"delta": "<string>",
"balance": "<string>",
"quote_rate": 123,
"delta_quote": 123,
"pretty_delta_quote": "<string>",
"balance_quote": 123,
"method_calls": [
{
"sender_address": "<string>",
"method": "<string>"
}
],
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
]
}
]
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}