> ## 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 rates

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



## AsyncAPI

````yaml api-reference/asyncapi.json instrumentRates
id: instrumentRates
title: Instrument rates
description: >-
  Subscribe with topic `instrument:<instrumentId>` (e.g. `instrument:100000`).
  Each push carries a `content` field that is a JSON-encoded string of a
  `Trading.Instrument.Rate` object (see schema).
servers:
  - id: etoro
    protocol: wss
    host: ws.etoro.com
    bindings: []
    variables: []
address: instrument:{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_10
    id: receiveInstrumentMarketStatus
    title: Instrument market status
    description: >-
      Server → client. Pushed when an instrument's market status changes (open /
      closed / halted). (Illustrative example type.)
    type: receive
    messages:
      - &ref_15
        id: marketStatus
        contentType: application/json
        payload:
          - name: Instrument market status
            description: >-
              Pushed when an instrument's market opens, closes or is halted.
              (Illustrative example type.)
            type: object
            properties:
              - name: messages
                type: array
                required: true
                properties:
                  - name: topic
                    type: string
                    examples: &ref_0
                      - instrument:100000
                    required: true
                  - name: type
                    type: string
                    description: Message type discriminator.
                    examples: &ref_1
                      - Trading.Instrument.MarketStatus
                    required: true
                  - name: id
                    type: string
                    required: true
                  - name: content
                    type: string
                    description: >-
                      A JSON-encoded string. Parse it to obtain a
                      Trading.Instrument.MarketStatus 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
                    examples: *ref_0
                    x-parser-schema-id: <anonymous-schema-27>
                  type:
                    type: string
                    description: Message type discriminator.
                    examples: *ref_1
                    x-parser-schema-id: <anonymous-schema-28>
                  id:
                    type: string
                    format: uuid
                    x-parser-schema-id: <anonymous-schema-29>
                  content:
                    type: string
                    description: >-
                      A JSON-encoded string. Parse it to obtain a
                      Trading.Instrument.MarketStatus object (described by
                      contentSchema).
                    contentMediaType: application/json
                    contentSchema:
                      type: object
                      description: >-
                        Decoded `content` of a Trading.Instrument.MarketStatus
                        message. (Illustrative example schema.)
                      properties:
                        InstrumentID:
                          type: integer
                          examples:
                            - 100000
                          x-parser-schema-id: <anonymous-schema-60>
                        Status:
                          type: string
                          enum:
                            - Open
                            - Closed
                            - Halted
                          description: Current market status for the instrument.
                          x-parser-schema-id: <anonymous-schema-61>
                        IsTradable:
                          type: boolean
                          description: Whether the instrument can currently be traded.
                          x-parser-schema-id: <anonymous-schema-62>
                        AsOf:
                          type: string
                          format: date-time
                          description: Timestamp of the status change.
                          x-parser-schema-id: <anonymous-schema-63>
                      x-parser-schema-id: InstrumentMarketStatus
                    x-parser-schema-id: <anonymous-schema-30>
                x-parser-schema-id: InstrumentMarketStatusPushItem
              x-parser-schema-id: <anonymous-schema-26>
          x-parser-schema-id: InstrumentMarketStatusEnvelope
        title: Instrument market status
        description: >-
          Pushed when an instrument's market opens, closes or is halted.
          (Illustrative example type.)
        example: |-
          {
            "messages": [
              {
                "topic": "instrument:100000",
                "content": "{\"InstrumentID\":100000,\"Status\":\"Open\",\"IsTradable\":true,\"AsOf\":\"2025-04-01T08:00:00Z\"}",
                "id": "a3b1c2d4-5e6f-7081-92a3-b4c5d6e7f809",
                "type": "Trading.Instrument.MarketStatus"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: marketStatus
    bindings: []
    extensions: &ref_4
      - id: x-topic
        value: instrument:{instrumentId}
      - id: x-parser-unique-object-id
        value: instrumentRates
  - &ref_11
    id: receiveInstrumentRates
    title: Instrument rate updates
    description: >-
      Server → client. Pushed continuously after subscribing to
      instrument:{instrumentId}.
    type: receive
    messages:
      - &ref_16
        id: instrumentRate
        contentType: application/json
        payload:
          - name: Instrument rate push
            description: A batch of one or more instrument rate 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_2
                      - instrument:100000
                    required: true
                  - name: type
                    type: string
                    description: Message type discriminator.
                    examples: &ref_3
                      - Trading.Instrument.Rate
                    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.Rate 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_2
                    x-parser-schema-id: <anonymous-schema-32>
                  type:
                    type: string
                    description: Message type discriminator.
                    examples: *ref_3
                    x-parser-schema-id: <anonymous-schema-33>
                  id:
                    type: string
                    format: uuid
                    description: Unique id of this push message.
                    x-parser-schema-id: <anonymous-schema-34>
                  content:
                    type: string
                    description: >-
                      A JSON-encoded string. Parse it to obtain a
                      Trading.Instrument.Rate object (described by
                      contentSchema).
                    contentMediaType: application/json
                    contentSchema:
                      type: object
                      description: >-
                        Decoded `content` of a Trading.Instrument.Rate message.
                        Note: on the wire every value is a JSON string.
                      properties:
                        Ask:
                          type: number
                          format: float
                          description: >-
                            Current asking (offer) price — the price at which
                            you can buy.
                          examples:
                            - 84917.73
                          x-parser-schema-id: <anonymous-schema-64>
                        Bid:
                          type: number
                          format: float
                          description: Current bid price — the price at which you can sell.
                          examples:
                            - 83232.21
                          x-parser-schema-id: <anonymous-schema-65>
                        LastExecution:
                          type: number
                          format: float
                          description: >-
                            Price of the most recent trade execution for this
                            instrument.
                          x-parser-schema-id: <anonymous-schema-66>
                        Date:
                          type: string
                          format: date-time
                          description: Timestamp of the price in the system.
                          x-parser-schema-id: <anonymous-schema-67>
                        PriceRateID:
                          type: string
                          description: Unique identifier of the rate.
                          examples:
                            - '106439224591'
                          x-parser-schema-id: <anonymous-schema-68>
                        NewUnitMargin:
                          type: number
                          format: float
                          description: (Obsolete) USD equivalent of the instrument price.
                          x-parser-schema-id: <anonymous-schema-69>
                        UnitMarginAsk:
                          type: number
                          format: float
                          description: (Obsolete) USD equivalent of the ask price.
                          x-parser-schema-id: <anonymous-schema-70>
                        UnitMarginBid:
                          type: number
                          format: float
                          description: (Obsolete) USD equivalent of the bid price.
                          x-parser-schema-id: <anonymous-schema-71>
                        BidDiscounted:
                          type: number
                          format: float
                          description: Obsolete.
                          x-parser-schema-id: <anonymous-schema-72>
                        AskDiscounted:
                          type: number
                          format: float
                          description: Obsolete.
                          x-parser-schema-id: <anonymous-schema-73>
                        UnitMarginBidDiscounted:
                          type: number
                          format: float
                          description: Obsolete.
                          x-parser-schema-id: <anonymous-schema-74>
                        UnitMarginAskDiscounted:
                          type: number
                          format: float
                          description: Obsolete.
                          x-parser-schema-id: <anonymous-schema-75>
                      x-parser-schema-id: InstrumentRate
                    x-parser-schema-id: <anonymous-schema-35>
                x-parser-schema-id: InstrumentRatePushItem
              x-parser-schema-id: <anonymous-schema-31>
          x-parser-schema-id: InstrumentRateEnvelope
        title: Instrument rate push
        description: A batch of one or more instrument rate updates.
        example: |-
          {
            "messages": [
              {
                "topic": "instrument:100000",
                "content": "{\"Ask\":\"84917.73\",\"Bid\":\"83232.21\",\"LastExecution\":\"84072.94\",\"Date\":\"2025-04-01T08:36:02.8305456Z\",\"PriceRateID\":\"106439224591\"}",
                "id": "f1992278-2c4a-4b8f-92d6-8b99f5e1cb00",
                "type": "Trading.Instrument.Rate"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: instrumentRate
    bindings: []
    extensions: *ref_4
  - &ref_12
    id: instrumentRatesAuthenticate
    title: Authenticate
    description: >-
      Authenticate the connection. Required before subscribing to
      `instrument:{instrumentId}`.
    type: send
    messages:
      - &ref_17
        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_5
                  - 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_5
              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_4
  - &ref_13
    id: instrumentRatesSubscribe
    title: Subscribe
    description: Subscribe to `instrument:{instrumentId}`.
    type: send
    messages:
      - &ref_18
        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_6
                  - 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_7
                          - 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_6
              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_7
                    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_4
  - &ref_14
    id: instrumentRatesUnsubscribe
    title: Unsubscribe
    description: Unsubscribe from `instrument:{instrumentId}`.
    type: send
    messages:
      - &ref_19
        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_8
                  - 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_9
                          - 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_8
              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_9
                    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_4
sendOperations:
  - *ref_10
  - *ref_11
receiveOperations:
  - *ref_12
  - *ref_13
  - *ref_14
sendMessages:
  - *ref_15
  - *ref_16
receiveMessages:
  - *ref_17
  - *ref_18
  - *ref_19
extensions:
  - id: x-topic
    value: instrument:{instrumentId}
  - id: x-parser-unique-object-id
    value: instrumentRates
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: []

````