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
accountAddressrequiredAccount address passed as PartyA to balanceInfoOfPartyA.
chainIdnumberoptionalOptional chain override.
Returns
AccountBalanceInfoallocatedBalancebigintTotal allocated balance.
lockedCVAbigintLocked CVA margin.
lockedLFbigintLocked LF margin.
lockedPartyAMMbigintLocked PartyA maintenance margin.
lockedPartyBMMbigintLocked PartyB maintenance margin.
pendingLockedCVAbigintPending locked CVA margin.
pendingLockedLFbigintPending locked LF margin.
pendingLockedPartyAMMbigintPending locked PartyA maintenance margin.
pendingLockedPartyBMMbigintPending 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..."],
});