Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreAccountLayergetVirtualAccountsCountOfSubAccount

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

subAccountAddressrequired

The subaccount whose VAs to count.

chainIdnumberoptional

Optional chain override.

Returns

bigint
The 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