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 token approvals for address
Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.SecurityService.getApprovals({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": [
{
"token_address": "<string>",
"token_address_label": "<string>",
"ticker_symbol": "<string>",
"contract_decimals": 123,
"logo_url": "<string>",
"quote_rate": 123,
"balance": "<string>",
"balance_quote": 123,
"pretty_balance_quote": "<string>",
"value_at_risk": "<string>",
"value_at_risk_quote": 123,
"pretty_value_at_risk_quote": "<string>",
"spenders": [
{
"block_height": 123,
"tx_offset": 123,
"log_offset": 123,
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"spender_address": "<string>",
"spender_address_label": "<string>",
"allowance": "<string>",
"allowance_quote": 123,
"pretty_allowance_quote": "<string>",
"value_at_risk": "<string>",
"value_at_risk_quote": 123,
"pretty_value_at_risk_quote": "<string>",
"risk_factor": "<string>"
}
]
}
]
}
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.
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 address for the token that has approvals.
The name for the token that has approvals.
The ticker symbol for this contract. This field is set by a developer and non-unique across a network.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The contract logo URL.
The exchange rate for the requested quote currency.
b;Wallet balance of the token.
Value of the wallet balance of the token.
A prettier version of the quote for rendering purposes.
Total amount at risk across all spenders.
Value of total amount at risk across all spenders.
A prettier version of the quote for rendering purposes.
Contracts with non-zero approvals for this token.
The height of the block.
The offset is the position of the tx in the block.
The offset is the position of the log entry within an event log."
The block signed timestamp in UTC.
Most recent transaction that updated approval amounts for the token.
Address of the contract with approval for the token.
Name of the contract with approval for the token.
Remaining number of tokens granted to the spender by the approval.
Value of the remaining allowance specified by the approval.
A prettier version of the quote for rendering purposes.
Amount at risk for spender.
Value of amount at risk for spender.
A prettier version of the quote for rendering purposes.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.SecurityService.getApprovals({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": [
{
"token_address": "<string>",
"token_address_label": "<string>",
"ticker_symbol": "<string>",
"contract_decimals": 123,
"logo_url": "<string>",
"quote_rate": 123,
"balance": "<string>",
"balance_quote": 123,
"pretty_balance_quote": "<string>",
"value_at_risk": "<string>",
"value_at_risk_quote": 123,
"pretty_value_at_risk_quote": "<string>",
"spenders": [
{
"block_height": 123,
"tx_offset": 123,
"log_offset": 123,
"block_signed_at": "2023-11-07T05:31:56Z",
"tx_hash": "<string>",
"spender_address": "<string>",
"spender_address_label": "<string>",
"allowance": "<string>",
"allowance_quote": 123,
"pretty_allowance_quote": "<string>",
"value_at_risk": "<string>",
"value_at_risk_quote": 123,
"pretty_value_at_risk_quote": "<string>",
"risk_factor": "<string>"
}
]
}
]
}