GET
/
v1
/
{chainName}
/
approvals
/
{walletAddress}
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>"
        }
      ]
    }
  ]
}
Credit Cost: 2 per call.
Processing: Realtime

Path Parameters

chainName
string
required

The chain name eg: eth-mainnet.

walletAddress
string
required

The requested address. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.

Response

200 - application/json
Successful response
address
string

The requested address.

updated_at
string

The timestamp when the response was generated. Useful to show data staleness to users.

quote_currency
string

The requested quote currency eg: USD.

chain_id
integer

The requested chain ID eg: 1.

chain_name
string

The requested chain name eg: eth-mainnet.

items
object[]

List of response items.