Close all margin positions

post/api/prime/trading/v1/accounts/{accountID}/margin/positions/close

Starts an asynchronous process to automatically close all positions by selling and buying assets to attempt to net them to zero.

Path Parameters

  • accountIDstringRequired
    The ID of the account

Request Body

One of
currencies array[string]

202 Response

closePositionsRequestId string <uuid>required
Unique identifier for the close position request
accountId string required
Account ID associated with the request
enterpriseId string required
Enterprise ID associated with the request
status string required
Current status of the close position request
Allowed values: pending in_progress completed failed cancelled
bitgoUserId string required
BitGo user ID who initiated the request
creationDate string <date-time>required
Timestamp when the request was created