REST APITradeMargin

GET

List orders associated with a close position request.

Path Params

  • accountId string required
    The ID of the account
  • closePositionRequestID string uuid required
    The ID of the close position request

Responses

200
Returns orders associated with the close position request. Returns an empty array if no orders exist yet — this endpoint does not validate that the close-position request itself exists. Use GET .../close/requests/{closePositionRequestID} to confirm the request exists.

Response Body

object

  • orders array of objects required
    orders object
    • closePositionsRequestId string uuid required
      The close position request ID associated with this order
    • status string enum required
      Status of a close position request or order
      pendingin_progresscompletedfailed
    • currency string required
      Currency symbol for the order
    • targetCurrency string required
      The target currency to trade into when closing the position
    • creationDate string date-time required
      Timestamp when the order was created
    • modifiedDate string date-time required
      Timestamp when the order was last modified
    • orderId string uuid
      The order ID of the trade created to close this position. Omitted if the trade order has not been created yet.
400
Bad request - Invalid path parameter format

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.
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.