{
"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": "<your user key>",
"apiKey": "<your API key>"
}
}{
"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 (or its alias private:real) for your real account and private:demo for your demo account (requires a prior successful Authenticate). The two accounts are separate streams - a demo-account update never arrives on private / private:real, nor a real-account one on private:demo - and each push’s topic is the name you subscribed to (a session holding both private and private:real receives a real-account update once under each). 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": "<your user key>",
"apiKey": "<your API key>"
}
}{
"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.