Token Balances

getTokenBalances(params: WalletBalanceQuery)

Description

Get Current Token Balance, Cost, and Performance data for one or more registered wallets, including Price, Balance, Value, Cost Basis, Realized PnL, and Unrealized PnL. Use this endpoint for real-time pricing and Live or Historical P&L reporting for tokens

  • OpenPool API Endpoint: GET:/wallet/balance/

Parameters

NameTypeDescriptionOptional
paramsWalletBalanceQueryQuery parametersNo
interface WalletBalanceQuery {
	cost_method?: "FIFO" | "LIFO" | "WAC";
	currency?: "AVAX" | "ETH" | "MATIC" | "USD" | "XDAI";
	period?: "1YR" | "3M" | "D" | "M" | "MAX" | "W" | "YTD";
	wallet: string;
}

Response

Interface: PaginatedTokenList

[
  {
    wallet?: string;
    token: Token;
    balance?: string;
    price?: string;
    value?: string;
    average_cost?: string;
    unrealized_pnl?: string;
    total_realized_pnl?: string;
    income: CurrentIncome;
    currency?: string;
    cost_method: string;
    blockchain: Blockchain;
    timestamp: string;
  }
]