Close All Positions for an Account

Close every open position on one account at market.

This is irreversible. Use with caution. Pending orders are untouched — cancel those with POST /v1/orders/cancel-all.

Request Body:

{ "account_number": "11111115" }

Replaces: POST /api/v1/accounts/{account_number}/close-trades and POST /api/v1/crm/users/{login_id}/close-trades. Note the old endpoints also cancelled pending orders; this one does not.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Body for account-wide actions (close-all / cancel-all).

string
required
Responses

400

Rejected — market closed or trading disabled on the account

401

Invalid or missing API key

403

Access denied (credential scope)

404

Account not found

429

Rate limit exceeded

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json