Close demo position by units
Rate limit: 20 requests per 60 seconds. This is a shared quota — the same budget is consumed by a group of related endpoints, so calling any of them reduces what is left for the others (you cannot call each at the full rate independently). Endpoints sharing this quota:
DELETE /api/v1/trading/execution/demo/limit-orders/{orderId}DELETE /api/v1/trading/execution/demo/market-close-orders/{orderId}DELETE /api/v1/trading/execution/demo/market-open-orders/{orderId}DELETE /api/v2/trading/execution/demo/orders/{orderId}POST /api/v1/trading/execution/demo/limit-ordersPOST /api/v1/trading/execution/demo/market-open-orders/by-amountPOST /api/v1/trading/execution/demo/market-open-orders/by-unitsPOST /api/v2/trading/execution/demo/orders
This endpoint allows traders to close an entire position or a portion of it at the current market rate. If UnitsToDeduct is provided, only the specified portion will be closed. If UnitsToDeduct is omitted or set to null, the full position will be closed.
Authorizations
eToro OAuth2. Each operation lists the scopes that grant access as separate security requirements (OpenAPI OR semantics): the caller's token only needs ONE of them — you do NOT need all of them. The same scopes back the x-api-key/x-user-key credential pair.
Headers
A unique request identifier.
"d4b97038-d594-4c74-b65b-f92950e07329"
API key for authentication.
"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"
User-specific authentication key.
"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"
Path Parameters
The unique identifier of the position to close.