Documentation API
Close All Positions
post
/api/v1/Trade/positions/close-allCloses all open (non-zero) positions on the account.
Trade
Paramètres
version
path · string
Requis
Corps de la demande
{
"accountId": 1001,
"instrument": "EURUSD"
}Réponses
- 202Close orders accepted for at least one position; {cancelledCount} is how many.application/json
{ "status": "accepted", "message": "Close requested for 3 position(s).", "cancelledCount": 3 } - 400Validation failed, or every close order was rejected; the message gives the first reason.application/json
{ "status": "rejected", "message": "Request body is required." }