REST APITradeMargin

GET

Runs margin calculations and returns the margin risk profile for the specified account.

Path Params

  • accountId string required
    The ID of the account

Responses

200
Margin risk profile

Response Body

object

  • riskProfile object required
    riskProfile object
    • netOpenPosition object required
      Quantity representing the total NOP limit across all currencies. It sets a limit that is compared to the total short position across all currencies (eg. 1000000). Currency represents the currency that the quantity is valued in (eg. USD)
      netOpenPosition object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • transferredCollateral object required
      Quantity representing the notional value of all collateral balances. This may change as the value of collateral changes with market movements. Currency represents the notional currency (eg. USD)
      transferredCollateral object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • unrealizedPnL object required
      Quantity representing the sum of unrealized profit and loss across all per-asset open positions. Currency represents the notional currency (eg. USD)
      unrealizedPnL object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • marginBalance object required
      Quantity representing the sum of the transferredCollateral and unrealizedPnL. Currency represents the notional currency (eg. USD)
      marginBalance object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • marginRequirement object
      Quantity representing the marginBalance required to continue trading without risk of margin call or liquidation. If margin requirement is not present, either netOpenPosition is zero or there is no requirement. Currency represents the notional currency (eg. USD)
      marginRequirement object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • marginUtilizationPercentage string nullable
      Quantity representing the ratio of marginRequirement to marginBalance, measured directly against liquidation and margin call thresholds. This is null if there is no margin requirement.

      matches ^[0-9]+(\.[0-9]+)?$

401
Unauthorized - Invalid or missing authentication

Response Body

object

  • error string required
  • errorName string required
  • reqId string required
  • context object
    Optional structured metadata for REST validation failures. The schema is fixed for client contract stability.
    context object
    • errorName string required
      Same value as the top-level errorName.
    • field string
      Request field associated with the validation failure.
    • message string
      Human-readable field-level validation message.
403
Forbidden - Insufficient permissions

Response Body

object

  • error string required
  • errorName string required
  • reqId string required
  • context object
    Optional structured metadata for REST validation failures. The schema is fixed for client contract stability.
    context object
    • errorName string required
      Same value as the top-level errorName.
    • field string
      Request field associated with the validation failure.
    • message string
      Human-readable field-level validation message.
500
Internal Server Error

Response Body

object

  • error string required
  • errorName string required
  • reqId string required
  • context object
    Optional structured metadata for REST validation failures. The schema is fixed for client contract stability.
    context object
    • errorName string required
      Same value as the top-level errorName.
    • field string
      Request field associated with the validation failure.
    • message string
      Human-readable field-level validation message.