Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreAccountLayergetAccountBalanceInfo

getAccountBalanceInfo

Read the account’s classic-pool (allocated) balance info — the collateral allocated to this account, together with the CVA / LF / margin locks currently held against it. Read via balanceInfoOfPartyA(account) on the SYMMIO diamond.

Instant opens do not spend this pool. The instant (lowcap) flow trades from the available balance — read that with getAccountBalanceOf; this read reports the classic pool and, when passed a Virtual Account address, that position’s locks. See Balance Model.

import { getAccountBalanceInfo } from "@symmio/trading-core"; const info = await getAccountBalanceInfo(config, { account: "0xaccount...", }); console.log(info.allocatedBalance);

Parameters

accountAddressrequired

Account address passed as PartyA to balanceInfoOfPartyA.

chainIdnumberoptional

Optional chain override.

Returns

AccountBalanceInfo
allocatedBalancebigint

Total allocated balance.

lockedCVAbigint

Locked CVA margin.

lockedLFbigint

Locked LF margin.

lockedPartyAMMbigint

Locked PartyA maintenance margin.

lockedPartyBMMbigint

Locked PartyB maintenance margin.

pendingLockedCVAbigint

Pending locked CVA margin.

pendingLockedLFbigint

Pending locked LF margin.

pendingLockedPartyAMMbigint

Pending locked PartyA maintenance margin.

pendingLockedPartyBMMbigint

Pending locked PartyB maintenance margin.

All fields are in the protocol’s 18-decimal internal units (not the collateral token’s decimals).

Query options

import { getAccountBalanceInfoQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getAccountBalanceInfoQueryOptions(config, { account: "0xaccount..." }));

Raw ABI

For consumers that want to call viem directly:

import { symmioAbi } from "@symmio/trading-core"; await publicClient.readContract({ abi: symmioAbi, address: symmioAddress, functionName: "balanceInfoOfPartyA", args: ["0xaccount..."], });
Last updated on