{
"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"
]
}
}Control channel (request / response)
All client requests share one JSON envelope: { "id": "<guid>", "operation": "<Authenticate|Subscribe|Unsubscribe>", "data": { ... } }. The server answers each request on the same connection with an acknowledgement that echoes the id and the operation. The id is a client-generated GUID used to correlate the request with its acknowledgement.
{
"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
Authenticate the WebSocket session with your API credentials.
Subscribe to one or more topics.
Stop receiving messages for one or more topics.