Function: useBalances()
useBalances(
params
: {address
:string
;chain
:ChainId
|Chain
;currencies
:Currency
|Currency
[];query
:QueryOptions
<Balances
>; }):UseQueryResult
<Balances
,Error
>
Get balance for a an address on a give chain
Parameters
Parameter | Type | Description |
---|---|---|
params | object | |
params.address | string | The address to fetch the balance for. |
params.chain | ChainId | Chain | The chain to fetch the balance for. |
params.currencies ? | Currency | Currency [] | One or many: eur , usd , gbp , isk |
params.query ? | QueryOptions <Balances > | See Tanstack Query - useQuery options. |
Returns
UseQueryResult
<Balances
, Error
>
Example
const {
data,
isLoading,
isError,
error,
refetch,
...moreUseQueryResults
} = useBalances();