userAccount query returns your account’s complete financial state for a given market deployer: cross equity, margin availability, collateral balances, and all open positions. Pass marketDeployerId: 0 for an account-wide overview that also includes portfolio groups, chain-level balances, and per-contract settings across all deployers.
All numeric values are raw integers. Use
priceScale and qtyScale from the configs response to convert prices and quantities to display values.Request
string
required
Must be
"userAccount".string
required
Your account ID, obtained from the
registerAccount action.integer
required
Market deployer to query. Use
0 to get a global account overview that includes all deployers, portfolio groups, and chain-level balances.Response
Margin Fields
string
Total cross margin equity: the sum of your cross collateral and unrealized PnL across all cross positions (raw integer string).
string
Margin currently reserved to cover the worst-case cost of your open orders (raw integer string).
string
Adverse price difference between your open order prices and the current mark price, representing potential additional margin consumption (raw integer string).
string
Free cross margin:
crossEquity - orderFrozen - orderLoss (raw integer string).string
Margin available to open new positions:
marginAvailable - totalPositionIM (raw integer string).string
Sum of initial margin allocated to all open cross positions (raw integer string).
string
Total maintenance margin across all cross positions. Liquidation is triggered when
crossEquity falls below this value (raw integer string).Collateral[]
List of collateral balances in the cross margin pool. Each entry contains
coinId and amount (raw integer string).Collateral[]
List of collateral balances allocated to isolated margin positions. Each entry contains
posKey (string, the position composite key = contractId + side), coinId, and amount.Position Fields
integer
The contract this position belongs to. Cross-reference with
configs to get the contract name and scales.string
Position mode:
"OneWay" for one-way mode, "L" for hedge-mode long, or "S" for hedge-mode short.string
Absolute position quantity (raw integer string). Divide by
10^qtyScale from configs to get the display value.string
Notional value at which the position was opened (raw integer string). Divide by
10^priceScale from configs to get the display value.boolean
true if the position is long (net buyer); false if short (net seller).string
Current leverage applied to this position.
boolean
true if this position uses isolated margin; false if it draws from the cross margin pool.string
The cumulative funding index recorded when this position was last settled. Used to compute accrued-but-unpaid funding:
(currentFundingIndex - fundingIndex) × size.string
Mark-price unrealized profit or loss (raw integer string). Negative values represent a loss.
string
Maintenance margin allocated to this individual position (raw integer string).
Account-Level Fields
These fields are always returned regardless of themarketDeployerId value you pass.
Account margin model:
"Unified" for standard cross margin, or "Portfolio" for portfolio margin with share groups.string
Account-level monotonic deposit nonce — the value the next deposit should carry. Use this to verify deposit sequencing and detect missing or replayed deposit events.
integer
Per-user taker fee-rate override under this market deployer.
-32768 = unset (falls back to owner/contract fee); 0 = explicit 0%.integer
Per-user maker fee-rate override under this market deployer.
-32768 = unset (falls back to owner/contract fee); 0 = explicit 0%.ChainBalance[]
Chain-level available balances:
{coinId, amount}. These reflect funds available for deposit into the exchange.ContractSetting[]
Per-contract trading settings:
{contractId, marginMode, positionMode, leverage}. Reflects your current configuration for each contract.PortfolioGroup[]
Share group views for PORTFOLIO margin mode accounts. Each entry reflects the combined equity and margin state of a portfolio group. Only populated when
marginShareType is "Portfolio".