getPortfolios
The getPortfolios
function returns an object containing an array of
portfolios for the provided addresses. Each portfolio is an object with the address
of the wallet, the fiat value of the portfolio, and an array of tokens held by the
provided address.
Usage
code
import { setOnchainKitConfig } from '@coinbase/onchainkit';
import { getPortfolios } from '@coinbase/onchainkit/api';
const response = await getPortfolios({
addresses: ['0x...'],
});
Returns
Promise<GetPortfoliosResponse>