API Dokumentation
Close Position
post
/api/v1/Trade/positions/closeCloses an open position with a market order for the full position quantity. The order goes through the same account and risk checks as any other order on the account.
Trade
Parameter
version
path · string
Erforderlich
Anforderungstext
{
"accountId": 1001,
"instrument": "EURUSD"
}Antworten
- 202Close order accepted; {orderId} is the closing order.application/json
{ "status": "accepted", "message": "Close position accepted.", "orderId": -46 } - 400Validation failed, no open position for the instrument, or the order was rejected (for example the account may not trade); the message gives the reason.application/json
{ "status": "rejected", "message": "Instrument is required." }