REST APITradeMargin

GET

List all close position requests for an account with optional filters on status and creation date.

Path Params

  • accountId string required
    The ID of the account

Query Params

  • offset integer
    Pagination offset.

    Defaults to 0

  • limit integer
    Number of items per page.

    <= 500

    Defaults to 500

  • status string enum
    Filter by close position request status. Multiple statuses can be provided as comma-separated values.
    pendingin_progresscompletedfailedcancelled
  • dateGte string date-time
    Return close position requests with a creationDate that is greater than or equal to the given timestamp.
  • dateLt string date-time
    Return close position requests with a creationDate that is less than the given timestamp.

Responses

200
List of close position requests

Response Body

object

  • data array of objects required
    data object
    • closePositionsRequestId string uuid required
      Unique identifier for the close position request
    • accountId string required
      The ID of the account
    • enterpriseId string required
      Enterprise ID associated with the request
    • status string enum required
      Status of a close position request or order
      pendingin_progresscompletedfailed
    • bitgoUserId string required
      BitGo user ID who initiated the request
    • creationDate string date-time required
      Timestamp when the request was created
400
Bad request - Invalid query 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.
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.