getSubAccountQuotes
Read a subaccount’s full quote picture across every account that holds it. Lowcap positions are isolated into Virtual Accounts (VAs), so a subaccount’s quotes are spread across its VAs rather than the subaccount itself. This unions the VAs, fetches the off-chain pending instant-opens / instant-closes, and merges everything into one de-duplicated, lifecycle-tagged list.
import { getSubAccountQuotes } from "@symmio/trading-core";
const { quotes, accounts } = await getSubAccountQuotes(config, {
subAccount,
});Parameters
subAccountAddressrequiredThe subaccount whose full quote picture to assemble.
includeVirtualAccountsbooleandefault trueUnion the subaccount’s existing on-chain Virtual Accounts (VAs) into the read. In lowcap, each isolated position lives under a VA, so this is required to see the full picture.
extraAccountsreadonly Address[]optionalExtra accounts to read quotes across (e.g. VAs already known to the consumer).
baseUrlstringoptionalHedger base URL for the off-chain instant-open / instant-close reads. Defaults to the chain config’s solver.url.
chainIdnumberoptionalOptional chain override.
Returns
GetSubAccountQuotesReturnTypequotesUnifiedQuote[]The merged, de-duplicated, lifecycle-tagged quote rows for the subaccount.
accountsAddress[]The on-chain partyA accounts the quotes were read across (subaccount + VAs + extras).
Query options
import { getSubAccountQuotesQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getSubAccountQuotesQueryOptions(config, { subAccount }));