> ## Documentation Index
> Fetch the complete documentation index at: https://api-portal.etoro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instrument candles

> Subscribe with topic `candle:<instrumentId>` (e.g. `candle:100000`). Each push carries a `content` field that is a JSON-encoded string of a `Trading.Instrument.Candle` object (see schema). No authentication required.



## AsyncAPI

````yaml api-reference/asyncapi.json instrumentCandles
id: instrumentCandles
title: Instrument candles
description: >-
  Subscribe with topic `candle:<instrumentId>` (e.g. `candle:100000`). Each push
  carries a `content` field that is a JSON-encoded string of a
  `Trading.Instrument.Candle` object (see schema). No authentication required.
servers:
  - id: etoro
    protocol: wss
    host: ws.etoro.com
    bindings: []
    variables: []
address: candle:{instrumentId}
parameters:
  - id: instrumentId
    jsonSchema:
      type: string
      description: eToro instrument id, e.g. 100000 (BTC).
      default: '100000'
    description: eToro instrument id, e.g. 100000 (BTC).
    type: string
    required: true
    deprecated: false
bindings:
  - protocol: ws
    version: 0.1.0
    value:
      method: GET
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
operations:
  - &ref_8
    id: receiveInstrumentCandle
    title: Instrument candle updates
    description: >-
      Server -> client. Pushed continuously after subscribing to
      candle:{instrumentId}.
    type: receive
    messages:
      - &ref_12
        id: instrumentCandle
        contentType: application/json
        payload:
          - name: Instrument candle push
            description: A batch of one or more instrument candle updates.
            type: object
            properties:
              - name: messages
                type: array
                required: true
                properties:
                  - name: topic
                    type: string
                    description: The subscribed topic this update belongs to.
                    examples: &ref_0
                      - candle:100000
                    required: true
                  - name: type
                    type: string
                    description: Message type discriminator.
                    examples: &ref_1
                      - Trading.Instrument.Candle
                    required: true
                  - name: id
                    type: string
                    description: Unique id of this push message.
                    required: true
                  - name: content
                    type: string
                    description: >-
                      A JSON-encoded string. Parse it to obtain a
                      Trading.Instrument.Candle object (described by
                      contentSchema).
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Server push envelope. `messages` holds one or more updates.
          required:
            - messages
          properties:
            messages:
              type: array
              items:
                type: object
                required:
                  - topic
                  - content
                  - id
                  - type
                properties:
                  topic:
                    type: string
                    description: The subscribed topic this update belongs to.
                    examples: *ref_0
                    x-parser-schema-id: <anonymous-schema-21>
                  type:
                    type: string
                    description: Message type discriminator.
                    examples: *ref_1
                    x-parser-schema-id: <anonymous-schema-22>
                  id:
                    type: string
                    format: uuid
                    description: Unique id of this push message.
                    x-parser-schema-id: <anonymous-schema-23>
                  content:
                    type: string
                    description: >-
                      A JSON-encoded string. Parse it to obtain a
                      Trading.Instrument.Candle object (described by
                      contentSchema).
                    contentMediaType: application/json
                    contentSchema:
                      type: object
                      description: >-
                        Decoded `content` of a Trading.Instrument.Candle
                        message. THIS is the only part you actually design.
                      properties:
                        InstrumentID:
                          type: integer
                          examples:
                            - 100000
                          x-parser-schema-id: <anonymous-schema-51>
                        Interval:
                          type: string
                          description: Candle interval.
                          examples:
                            - 1m
                            - 5m
                            - 1h
                          x-parser-schema-id: <anonymous-schema-52>
                        Open:
                          type: number
                          format: float
                          x-parser-schema-id: <anonymous-schema-53>
                        High:
                          type: number
                          format: float
                          x-parser-schema-id: <anonymous-schema-54>
                        Low:
                          type: number
                          format: float
                          x-parser-schema-id: <anonymous-schema-55>
                        Close:
                          type: number
                          format: float
                          x-parser-schema-id: <anonymous-schema-56>
                        Volume:
                          type: number
                          format: float
                          x-parser-schema-id: <anonymous-schema-57>
                        OpenTime:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-58>
                        CloseTime:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-59>
                      x-parser-schema-id: InstrumentCandle
                    x-parser-schema-id: <anonymous-schema-24>
                x-parser-schema-id: InstrumentCandlePushItem
              x-parser-schema-id: <anonymous-schema-20>
          x-parser-schema-id: InstrumentCandleEnvelope
        title: Instrument candle push
        description: A batch of one or more instrument candle updates.
        example: |-
          {
            "messages": [
              {
                "topic": "candle:100000",
                "content": "{\"InstrumentID\":100000,\"Interval\":\"1m\",\"Open\":83900.10,\"High\":84200.55,\"Low\":83850.00,\"Close\":84072.94,\"Volume\":12.348,\"OpenTime\":\"2025-04-01T08:36:00Z\",\"CloseTime\":\"2025-04-01T08:37:00Z\"}",
                "id": "c92e5f3b-8d4a-4b71-9e23-6f7a8b9c0d12",
                "type": "Trading.Instrument.Candle"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: instrumentCandle
    bindings: []
    extensions: &ref_3
      - id: x-topic
        value: candle:{instrumentId}
      - id: x-parser-unique-object-id
        value: instrumentCandles
  - &ref_9
    id: instrumentCandlesAuthenticate
    title: Authenticate
    description: >-
      Authenticate the connection. Required before subscribing to
      `candle:{instrumentId}`.
    type: send
    messages:
      - &ref_13
        id: authenticateRequest
        contentType: application/json
        payload:
          - name: Authenticate request
            description: Authenticate the WebSocket session with your API credentials.
            type: object
            properties:
              - name: id
                type: string
                description: >-
                  Client-generated correlation id, echoed back on the
                  acknowledgement.
                examples: &ref_2
                  - ed72693c-1545-4fa1-8a10-aca7cf5419a6
                required: true
              - name: operation
                type: string
                enumValues:
                  - Authenticate
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: userKey
                    type: string
                    description: Your eToro user key (x-user-key).
                    required: true
                  - name: apiKey
                    type: string
                    description: Your eToro API key (x-api-key).
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Client request envelope for the Authenticate operation.
          required:
            - id
            - operation
            - data
          properties:
            id:
              type: string
              format: uuid
              description: >-
                Client-generated correlation id, echoed back on the
                acknowledgement.
              examples: *ref_2
              x-parser-schema-id: <anonymous-schema-1>
            operation:
              type: string
              enum:
                - Authenticate
              x-parser-schema-id: <anonymous-schema-2>
            data:
              type: object
              required:
                - userKey
                - apiKey
              properties:
                userKey:
                  type: string
                  description: Your eToro user key (x-user-key).
                  x-parser-schema-id: <anonymous-schema-3>
                apiKey:
                  type: string
                  description: Your eToro API key (x-api-key).
                  x-parser-schema-id: <anonymous-schema-4>
              x-parser-schema-id: AuthenticateData
          x-parser-schema-id: AuthenticateEnvelope
        title: Authenticate request
        description: Authenticate the WebSocket session with your API credentials.
        example: |-
          {
            "id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
            "operation": "Authenticate",
            "data": {
              "userKey": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_",
              "apiKey": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: authenticateRequest
    bindings: []
    extensions: *ref_3
  - &ref_10
    id: instrumentCandlesSubscribe
    title: Subscribe
    description: Subscribe to `candle:{instrumentId}`.
    type: send
    messages:
      - &ref_14
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Subscribe request
            description: Subscribe to one or more topics.
            type: object
            properties:
              - name: id
                type: string
                examples: &ref_4
                  - ed72693c-1545-4fa1-8a10-aca7cf5419a6
                required: true
              - name: operation
                type: string
                enumValues:
                  - Subscribe
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: topics
                    type: array
                    description: >-
                      Topics to subscribe to. e.g. `instrument:<instrumentId>`
                      for market rates, or `private` for the authenticated
                      user's order/portfolio updates.
                    required: true
                    properties:
                      - name: item
                        type: string
                        examples: &ref_5
                          - instrument:100000
                          - private
                        required: false
                  - name: snapshot
                    type: boolean
                    description: >-
                      Applies to market-data topics only (e.g. `instrument:*`):
                      when true, the current rate is sent immediately on
                      subscribe. Has no effect on the `private` topic.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Client request envelope for the Subscribe operation.
          required:
            - id
            - operation
            - data
          properties:
            id:
              type: string
              format: uuid
              examples: *ref_4
              x-parser-schema-id: <anonymous-schema-5>
            operation:
              type: string
              enum:
                - Subscribe
              x-parser-schema-id: <anonymous-schema-6>
            data:
              type: object
              required:
                - topics
              properties:
                topics:
                  type: array
                  description: >-
                    Topics to subscribe to. e.g. `instrument:<instrumentId>` for
                    market rates, or `private` for the authenticated user's
                    order/portfolio updates.
                  items:
                    type: string
                    examples: *ref_5
                    x-parser-schema-id: <anonymous-schema-8>
                  x-parser-schema-id: <anonymous-schema-7>
                snapshot:
                  type: boolean
                  description: >-
                    Applies to market-data topics only (e.g. `instrument:*`):
                    when true, the current rate is sent immediately on
                    subscribe. Has no effect on the `private` topic.
                  default: false
                  x-parser-schema-id: <anonymous-schema-9>
              x-parser-schema-id: SubscribeData
          x-parser-schema-id: SubscribeEnvelope
        title: Subscribe request
        description: Subscribe to one or more topics.
        example: |-
          {
            "id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
            "operation": "Subscribe",
            "data": {
              "topics": [
                "instrument:100000"
              ],
              "snapshot": false
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
    bindings: []
    extensions: *ref_3
  - &ref_11
    id: instrumentCandlesUnsubscribe
    title: Unsubscribe
    description: Unsubscribe from `candle:{instrumentId}`.
    type: send
    messages:
      - &ref_15
        id: unsubscribeRequest
        contentType: application/json
        payload:
          - name: Unsubscribe request
            description: Stop receiving messages for one or more topics.
            type: object
            properties:
              - name: id
                type: string
                examples: &ref_6
                  - ed72693c-1545-4fa1-8a10-aca7cf5419a6
                required: true
              - name: operation
                type: string
                enumValues:
                  - Unsubscribe
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: topics
                    type: array
                    description: Topics to unsubscribe from.
                    required: true
                    properties:
                      - name: item
                        type: string
                        examples: &ref_7
                          - instrument:100000
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Client request envelope for the Unsubscribe operation.
          required:
            - id
            - operation
            - data
          properties:
            id:
              type: string
              format: uuid
              examples: *ref_6
              x-parser-schema-id: <anonymous-schema-10>
            operation:
              type: string
              enum:
                - Unsubscribe
              x-parser-schema-id: <anonymous-schema-11>
            data:
              type: object
              required:
                - topics
              properties:
                topics:
                  type: array
                  description: Topics to unsubscribe from.
                  items:
                    type: string
                    examples: *ref_7
                    x-parser-schema-id: <anonymous-schema-13>
                  x-parser-schema-id: <anonymous-schema-12>
              x-parser-schema-id: UnsubscribeData
          x-parser-schema-id: UnsubscribeEnvelope
        title: Unsubscribe request
        description: Stop receiving messages for one or more topics.
        example: |-
          {
            "id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
            "operation": "Unsubscribe",
            "data": {
              "topics": [
                "instrument:100000"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeRequest
    bindings: []
    extensions: *ref_3
sendOperations:
  - *ref_8
receiveOperations:
  - *ref_9
  - *ref_10
  - *ref_11
sendMessages:
  - *ref_12
receiveMessages:
  - *ref_13
  - *ref_14
  - *ref_15
extensions:
  - id: x-topic
    value: candle:{instrumentId}
  - id: x-parser-unique-object-id
    value: instrumentCandles
securitySchemes:
  - id: apiKeyPair
    name: apiKeyPair
    type: userPassword
    description: >-
      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.
    extensions: []

````