REST APITradeMargin

GET

Returns the net open positions for the specified account.

Path Params

  • accountId string required
    The ID of the account

Query Params

  • currency array of strings
    Filters on provided currencies if provided, otherwise returns net open positions for all currencies

Responses

200
Net open positions

Response Body

object

  • netOpenPositions array of objects
    netOpenPositions object
    • currency string required
      Symbol of the instrument (ex. BTC)
    • enterpriseId string uuid required
      Enterprise ID for the margin NOP limit
    • netOpenPosition string required
      The current net open position for the NOP instrument in question (ex. -10 BTC). Negative means a short position and positive means a long position.

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

    • netOpenPositionValue object required
      The net open position denoted in notional amount (ex 600,000 USD)
      netOpenPositionValue object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • shortMarginPositionNotionalLimit object required
      The maximum open margin position that can be short in terms of the notional instrument (ex. 10,000 USD) in absolute notional terms, as the NOP is signed
      shortMarginPositionNotionalLimit object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • longMarginPositionNotionalLimit object required
      The maximum open margin position that can be long in terms of the notional instrument (ex. 10,000 USD)
      longMarginPositionNotionalLimit object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • unrealizedPnL object required
      The unrealized profit and loss. Difference between the NOP value at the time of creation and the NOP value as of now.
      unrealizedPnL object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
    • lastModified string date-time required
      ISO format datetime for date and time the record was last updated in the database
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.