getCollateralBalance
Read the ERC-20 balance of the collateral token for one owner (usually the connected EOA).
import { getCollateralBalance } from "@symmio/trading-core";
const balance = await getCollateralBalance(config, { owner });Parameters
ownerAddressrequiredAddress whose collateral-token balance to read (usually the connected EOA).
chainIdnumberoptionalOptional chain override.
Returns
bigintThe wallet balance, in the collateral token’s units.
Query options
import { getCollateralBalanceQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getCollateralBalanceQueryOptions(config, { owner }));Last updated on