Liquidations

public/margin_watch

Calculates the mark-to-market value and initial/maintenance margin for a given subaccount, with per-position and per-collateral breakdowns, computed from live feed data at request time. Margins use the subaccount's manager's params. Set is_delayed_liquidation to get them under the subaccount's delayed-liquidation override instead; the request is rejected for a subaccount without one. has_delayed_liquidation reports whether the subaccount has one. A maintenance margin below zero means the subaccount is flagged for liquidation.

post/public/margin_watch

Request

  • Base URL: https://api.derive.xyz/v3
  • URL: https://api.derive.xyz/v3/public/margin_watch
  • Auth: none declared

Request body

is_delayed_liquidationboolean

true returns margins under the subaccount's delayed-liquidation override. Rejected for a subaccount without one.

subaccount_idinteger required

Response

Success

currencystring[] required
has_delayed_liquidationboolean required

true when the subaccount has a delayed-liquidation override.

initial_marginstring required
is_delayed_liquidationboolean required

true when the margins above use the delayed-liquidation override.

maintenance_marginstring required

Below zero the subaccount is flagged for liquidation.

margin_typestring required
regular_margin_flagged_secinteger nullable

Unix seconds at which a subaccount with a delayed-liquidation override was first seen below its manager's maintenance margin. Its grace period before liquidation counts from here. Null otherwise.

risk_universe_idinteger required
subaccount_idinteger required
subaccount_valuestring required
valuation_timestampinteger required

Unix seconds at which margin and MtM were computed.

Changes

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