eToro private
Order and transaction updates for the logged in user. It needs a successful Authenticate first. Each push carries an order update: the order, its status, the instrument and the units asked for and executed.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
This is a subscription of the eToro WebSocket API, not an HTTP endpoint. It has no method and no path: it is sent as JSON over an open WebSocket connection.
Subscribed to with the Subscribe request and the topic private. The page names Trading.OrderForOpen.Update and Trading.OrderForCloseMultiple.Update as types of order update. It also describes Trading.Position.Closed and Trading.Position.Opened pushes on this topic and marks the second as an illustrative example, so neither is recorded field by field here. The status and type codes are numbers, and the page does not list their meanings.
The message
- Name
- private
- Direction
- Subscription, opened by the client and then fed by the server
- Subscribed to as
- private
- Carried by
- WebSocket.
- WebSocket address
- wss://ws.etoro.com/ws
- Answers
Fields
| Name | Type | Description |
|---|---|---|
| messagesrequired | array of objects | The envelope of every push. It holds one update or several. |
| messages[].topicrequired | string | The topic the update belongs to. Always private here. |
| messages[].typerequired | string | Says what kind of update it is, for example Trading.OrderForOpen.Update or Trading.OrderForCloseMultiple.Update. |
| messages[].idrequired | string (uuid) | The id of this push message. |
| messages[].contentrequired | string | The update itself, as a string of JSON that has to be parsed a second time. The fields below, written content.Name, are what that string holds. |
| content.OrderID | integer (int64) | The id of the order. |
| content.OrderType | integer | A code for the type of order. |
| content.CID | integer (int64) | The customer, or account, id. |
| content.StatusID | integer | A code for the status of the order. |
| content.InstrumentID | integer | The instrument the order is in. |
| content.RequestGuid | string (uuid) | An id of the request that made the order. |
| content.RequestOccurred | string (date-time) | When the request was made. |
| content.RequestToken | string (uuid) | A token of the request. |
| content.ErrorCode | integer | 0 where the order succeeded. |
| content.RequestedUnits | number (float) | The units asked for. |
| content.ExecutedUnits | number (float) | The units executed. |
| content.EndRate | number (float) | The rate the order ended at. |
| content.NetProfit | number (float) | The net profit or loss. |
| content.CloseReason | integer | A code for why a position was closed. |
| content.PendingClosePositionIDs | array of integers | The ids of positions waiting to be closed by this order. |
| content.OpenDateTime | string (date-time) | When the order was opened. |
| content.IsInMirror | boolean | The page gives no description of this field. |
Limits that apply at eToro
| Limit | Value | Scope | Source |
|---|---|---|---|
| Headline limit | 60/min reads per key | user | api-portal.etoro.comchecked |