GET
/
v1
/
{chainName}
/
address
/
{walletAddress}
/
portfolio_v2
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    const client = new GoldRushClient("YOUR_API_KEY");
    const resp = await client.BalanceService.getHistoricalPortfolioForWalletAddress({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": [
    {
      "contract_address": "<string>",
      "contract_decimals": 123,
      "contract_name": "<string>",
      "contract_ticker_symbol": "<string>",
      "logo_url": "<string>",
      "holdings": [
        {
          "quote_rate": 123,
          "timestamp": "2023-11-07T05:31:56Z",
          "close": {
            "balance": "<string>",
            "quote": 123,
            "pretty_quote": "<string>"
          },
          "high": {},
          "low": {},
          "open": {}
        }
      ]
    }
  ]
}

Credit Cost

2 per 30 days

Processing

Realtime

Authorizations

Authorization
string
header
required

Bearer authentication header of the form: Bearer <token>, where <token> is your GoldRush API Key.

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.

Query Parameters

quote-currency
string

The currency to convert. Supports USD, CAD, EUR, SGD, INR, JPY, VND, CNY, KRW, RUB, TRY, NGN, ARS, AUD, CHF, and GBP.

days
integer

The number of days to return data for. Defaults to 30 days.

Response

200 - application/json
Successful response

The response is of type object.