Broker API HubMenu

eToro private

messageprivateeToro WebSocket APIWebSocketTopics

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.

Independent and unofficialapi-portal.etoro.comchecked The definition file it was checked against

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

NameTypeDescription
messagesrequiredarray of objectsThe envelope of every push. It holds one update or several.
messages[].topicrequiredstringThe topic the update belongs to. Always private here.
messages[].typerequiredstringSays what kind of update it is, for example Trading.OrderForOpen.Update or Trading.OrderForCloseMultiple.Update.
messages[].idrequiredstring (uuid)The id of this push message.
messages[].contentrequiredstringThe 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.OrderIDinteger (int64)The id of the order.
content.OrderTypeintegerA code for the type of order.
content.CIDinteger (int64)The customer, or account, id.
content.StatusIDintegerA code for the status of the order.
content.InstrumentIDintegerThe instrument the order is in.
content.RequestGuidstring (uuid)An id of the request that made the order.
content.RequestOccurredstring (date-time)When the request was made.
content.RequestTokenstring (uuid)A token of the request.
content.ErrorCodeinteger0 where the order succeeded.
content.RequestedUnitsnumber (float)The units asked for.
content.ExecutedUnitsnumber (float)The units executed.
content.EndRatenumber (float)The rate the order ended at.
content.NetProfitnumber (float)The net profit or loss.
content.CloseReasonintegerA code for why a position was closed.
content.PendingClosePositionIDsarray of integersThe ids of positions waiting to be closed by this order.
content.OpenDateTimestring (date-time)When the order was opened.
content.IsInMirrorbooleanThe page gives no description of this field.

Limits that apply at eToro

LimitValueScopeSource
Headline limit60/min reads per keyuserapi-portal.etoro.comchecked