REST APITradeMargin

POST

Transfers the exact amount to cover all short margin positions for the specified account.

Path Params

  • accountId string required
    The ID of the account

Body Params

ONE OF

  • currencies array of strings

Responses

200
Margin positions cover response

Response Body

object

  • balances array of objects
    balances object
    • currency string
      Currency symbol
    • quantity string
      Net position after the position transfer
    • balanceValue object
      Returns the value of the margin position. Has 2 fields denoting the currency used and the actual value.
      balanceValue object
      • quantity string decimal required
        The specified quantity.
      • currency string required
        The specified quantity currency.
400
Bad request - Invalid parameters

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.
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.
422
Unprocessable Entity - JSON payload is improperly formatted

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.
429
Too Many Requests - Rate limit exceeded

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.