getVirtualAccountsCountOfSubAccount
Read how many Virtual Accounts (VAs) a subaccount holds. Use it to page the VA lists past their default limit of 200; below that, one list call already returns every VA.
import { getVirtualAccountsCountOfSubAccount } from "@symmio/trading-core";
const count = await getVirtualAccountsCountOfSubAccount(config, { subAccount });Parameters
subAccountAddressrequiredThe subaccount whose VAs to count.
chainIdnumberoptionalOptional chain override.
Returns
bigintThe number of VAs the subaccount holds.
Query options
import { getVirtualAccountsCountOfSubAccountQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getVirtualAccountsCountOfSubAccountQueryOptions(config, { subAccount }));Raw ABI
For consumers that want to call viem directly:
import { accountLayerAbi } from "@symmio/trading-core";
await publicClient.readContract({
abi: accountLayerAbi,
address: accountLayerAddress,
functionName: "getVirtualAccountsCountOfSubAccount",
args: [subAccount],
});Last updated on