Subaccounts

private/get_subaccount

Returns the complete portfolio for a single subaccount: its label, manager and risk-universe identifiers, margin type and liquidation status, aggregate valuation and margin figures (positions, collaterals, initial and maintenance margin, open-order margin) as decimal strings, plus the full lists of open orders, positions, and collateral balances. Margin, mark price, and Greek values are computed from live feed data at request time.

post/private/get_subaccount

Request

  • Base URL: https://api.derive.xyz/v3
  • URL: https://api.derive.xyz/v3/private/get_subaccount
  • Auth: none declared

Request body

subaccount_idinteger required

Response

Success

collaterals_initial_marginstring required
collaterals_maintenance_marginstring required
collaterals_valuestring required
currencystring[] required
failed_to_fetchboolean required

true if this subaccount's portfolio could not be loaded; such subaccounts are returned as placeholders by get_all_portfolios.

initial_marginstring required
is_under_liquidationboolean required
labelstring required
maintenance_marginstring required
manager_idinteger required
margin_typestring required
mm_creditsstring required

MM credit from universe loss-socialization events: the socialized USDC debit lands on cash in full, and debit × (1 − write_down) is added back to maintenance margin while the 15-minute write-down runs. Events this subaccount has not yet realized contribute their expected credit, with the current subaccount value standing in for the MtM at realization. Zero while under auction — the credit is cleared when liquidation starts.

open_orders_marginstring required

Uses the manager's params, as initial_margin does, even for a subaccount with a delayed-liquidation override. Order checks use the override, so the two can differ. This is rare: an override usually loosens maintenance margin only, and this is an initial-margin figure.

positions_initial_marginstring required
positions_maintenance_marginstring required
positions_valuestring required
projected_margin_changestring required

Change in maintenance_margin a minute past the account's next option expiry, once the options expiring by then settle into cash at today's forward. maintenance_margin + projected_margin_change < 0 signals liquidation right after that expiry. Excludes open orders; "0" for an account without an unexpired option.

risk_universe_idinteger required
subaccount_idinteger required
subaccount_valuestring required

Changes

No recorded changes to this operation across all 1 revision of this API.