accountId.
Every list on this page is paged. Omit
cursor for the first page and send each nextCursor back with the same query until it is null, even if you usually get everything in one page.Balances
List wallets returns one entry per asset, and per wallet where the host keeps several:totalBalance is everything the wallet holds; availableBalance is what is free to use. id and name are null when the host has a single unnamed wallet per asset.
Positions
List open positions returns one entry per derivative market with an open position. Every entry has both along and a short leg, so the same shape covers hedged and netted positions:
- Sizes are in native contracts, not base units. Convert with the market’s
contractDetails; see Instruments. - A leg with no exposure has size
"0". InHedgingmode both legs can be open at once. entryPriceandmodearenullwhen the host does not report them.
Margin
List margin states returns the account’s margin per margin group: the collateral asset, total collateral value, initial and maintenance margin, andaccountMarginRatio when the host reports it.
One market at a glance
Get market account state gathers what matters for one market into a single read. The result’stype depends on the market:
- Derivative
- Spot
- SpotMargin
Leverage setting, collateral and the position:
Leverage
Leverage is a setting on a market, never a field on an order. Whether you can read or change it depends on two levels:- The host’s
capabilities.marketSettings.getMarketLeverageandsetMarketLeveragemust not beNotSupported. - The market’s
settings.leverage(from List host markets) must be non-null. Inside it,getsays whether you can read it, andsetEffectScopeisnullwhen it cannot be set.
Read it
Get market leverage returns one of three settings:Disabled is different from a null settings.leverage, which means the market has no leverage control at all.
Set it
Set market leverage takes a value on the market’s grid: betweenmin and max inclusive, and exactly min plus a whole number of steps. With the example above, 12.34 is valid, 12.345 is not. When min equals max, that single value is the only one accepted. Plurex does not round an off-grid value; it rejects it with 422 Rejected.
Position mode
Position mode decides whether a market holds long and short exposure separately (Hedging) or as one net position (Netting). The market’s settings.positionMode lists the modes it accepts in values, whether you can read the mode (get), and the blast radius of a change (setEffectScope, null when it cannot be set). The host’s marketSettings.getMarketPositionMode and setMarketPositionMode capabilities must also allow it.
positionEffect are independent. Whether you may send positionEffect (Open or Close) is decided only by the order type’s supportsPositionEffect flag on the market, never by the position mode. Read each flag on its own.
Transactions
List account transactions returns the account’s balance postings: trading fees, funding payments, interest, deposits, withdrawals and so on. Check the host’saccountTransactions.listTransactions capability first; a host without transaction history returns 422 NotSupported.
amountis signed from your side: positive increases the balance, negative decreases it. A fee you pay is negative; a deposit is positive.typeclassifies the posting:TradingFee,FundingPayment,BorrowInterest,Financing,LiquidationFee,Settlement,Rebate,Deposit,Withdrawal,Transfer,Conversion,AdjustmentorOther.nativeTypekeeps the host’s own label. The host’ssupportedTransactionTypeslists the types it reports. Treat a type you do not recognise asOther.- Links to an
instrument, order, fill or position are present only when the host reports them reliably; otherwise they arenull. groupIdlinks postings that come from one host record, such as the legs of a conversion and its fee, when the host reports it.idis stable: it never changes and is the same ID the transaction stream sends.effectiveAtis when the posting took effect.
listTransactions capability’s defaultOrdering states, Chronological or ReverseChronological, across all pages.
Reconcile postings
Because IDs are stable, deduplicate byid. To stay complete:
- Combine history with the transaction stream where
subscribeToAccountTransactionsis supported: connect, read history, then add streamed postings you do not have. - After a disconnect, or on each polling pass, re-read recent history back past the newest posting you already hold, and add any IDs you have not seen. Overlap with what you already hold instead of stopping at the first known ID, so a posting that appears late is still picked up.
- Do not rebuild a ledger from wallet balances, fills or orders. Postings are the record of what changed a balance.
Related
- Instruments: native contract sizes and canonical symbols.
- Host capabilities: market settings and transaction capabilities.
- Order rules:
positionEffect,reduceOnlyand the other order flags. - Stream account updates: live order and transaction events.