The positions API provides information about an account’s current open positions. The response will include information such as cost basis, shares traded, and market value, which will be updated live as price information is updated. Once a position is closed, it will no longer be queryable through this API.
Closes (liquidates) all of the account’s open long and short positions. A response will be provided for each order that is attempted to be cancelled.
If an order is no longer cancelable, the server will respond with status 500 and reject the request.
If true is specified, cancel all open orders before liquidating all positions.
HTTP 207 Multi-Status with body; an array of objects that include the order id and http status code for each status request.
Failed to liquidate.
[DELETE] Close a position
Closes (liquidates) the account’s open position for the given symbol. Works for both long and short positions.