{
"messages": [
{
"topic": "private",
"content": "{\"OrderID\":981286176,\"OrderType\":20,\"CID\":32612044,\"StatusID\":11,\"InstrumentID\":1111,\"RequestGuid\":\"fca38698-1fcf-407d-b930-3222e57274fa\",\"RequestOccurred\":\"2025-04-01T08:55:53.6910145Z\",\"ErrorCode\":0,\"RequestedUnits\":13.859902,\"ExecutedUnits\":0.0}",
"id": "5263070a-c52f-436b-8ca8-10b3bd6d2970",
"type": "Trading.OrderForCloseMultiple.Update"
}
]
}{
"messages": [
{
"topic": "private",
"content": "{\"PositionID\":2980225895,\"InstrumentID\":1001,\"CloseRate\":188.42,\"NetProfit\":30.62,\"CloseReason\":1,\"CloseDateTime\":\"2025-04-01T09:42:11.1234567Z\"}",
"id": "b81d4e2a-7c3f-4a90-9d12-5e6f7a8b9c01",
"type": "Trading.Position.Closed"
}
]
}{
"messages": [
{
"topic": "private",
"content": "{\"PositionID\":2980225895,\"InstrumentID\":1001,\"IsBuy\":true,\"OpenRate\":182.30,\"Amount\":500.0,\"Leverage\":2,\"OpenDateTime\":\"2025-04-01T08:55:53.6910145Z\"}",
"id": "7c2f0a1b-9d3e-4f6a-8b21-2c4a6e8f1d00",
"type": "Trading.Position.Opened"
}
]
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Authenticate",
"data": {
"userKey": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_",
"apiKey": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"
}
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Subscribe",
"data": {
"topics": [
"instrument:100000"
],
"snapshot": false
}
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Unsubscribe",
"data": {
"topics": [
"instrument:100000"
]
}
}Private portfolio updates
Subscribe with topic private (requires a prior successful Authenticate). Each push carries a content field that is a JSON-encoded string of a trading order update (e.g. Trading.OrderForOpen.Update, Trading.OrderForCloseMultiple.Update).
{
"messages": [
{
"topic": "private",
"content": "{\"OrderID\":981286176,\"OrderType\":20,\"CID\":32612044,\"StatusID\":11,\"InstrumentID\":1111,\"RequestGuid\":\"fca38698-1fcf-407d-b930-3222e57274fa\",\"RequestOccurred\":\"2025-04-01T08:55:53.6910145Z\",\"ErrorCode\":0,\"RequestedUnits\":13.859902,\"ExecutedUnits\":0.0}",
"id": "5263070a-c52f-436b-8ca8-10b3bd6d2970",
"type": "Trading.OrderForCloseMultiple.Update"
}
]
}{
"messages": [
{
"topic": "private",
"content": "{\"PositionID\":2980225895,\"InstrumentID\":1001,\"CloseRate\":188.42,\"NetProfit\":30.62,\"CloseReason\":1,\"CloseDateTime\":\"2025-04-01T09:42:11.1234567Z\"}",
"id": "b81d4e2a-7c3f-4a90-9d12-5e6f7a8b9c01",
"type": "Trading.Position.Closed"
}
]
}{
"messages": [
{
"topic": "private",
"content": "{\"PositionID\":2980225895,\"InstrumentID\":1001,\"IsBuy\":true,\"OpenRate\":182.30,\"Amount\":500.0,\"Leverage\":2,\"OpenDateTime\":\"2025-04-01T08:55:53.6910145Z\"}",
"id": "7c2f0a1b-9d3e-4f6a-8b21-2c4a6e8f1d00",
"type": "Trading.Position.Opened"
}
]
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Authenticate",
"data": {
"userKey": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_",
"apiKey": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"
}
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Subscribe",
"data": {
"topics": [
"instrument:100000"
],
"snapshot": false
}
}{
"id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
"operation": "Unsubscribe",
"data": {
"topics": [
"instrument:100000"
]
}
}eToro API credentials, sent as a pair inside the Authenticate request's data object -- userKey (the user identifier) and apiKey (the secret) -- not as an HTTP header. Required before subscribing to the private topic; public market topics (instrument:<instrumentId>) need no authentication. Both values come from the API key section of eToro account settings, which appears once the account is verified.
GET
A batch of one or more order / transaction updates for the authenticated user.
Pushed when a position is closed for the authenticated user.
Pushed when a new position is opened for the authenticated user. (Illustrative example of an additional private message type.)
Authenticate the WebSocket session with your API credentials.
Subscribe to one or more topics.
Stop receiving messages for one or more topics.