> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# voteSubscribe WebSocket Method

> Subscribe to vote transactions observed by the Solana validator over WebSocket, and match notifications to your subscription ID.

Subscribe to vote transactions observed by the validator. Save the subscription ID returned in result and match it against params.subscription in notifications. Use voteUnsubscribe on the same connection to stop the stream.


## AsyncAPI

````yaml solana-rpc/websocket/asyncapi.json voteSubscribe
id: voteSubscribe
title: Vote subscribe
description: >-
  Subscribe to vote transactions observed by the validator. Save the
  subscription ID returned in result and match it against params.subscription in
  notifications. Use voteUnsubscribe on the same connection to stop the stream.
servers:
  - id: production
    protocol: wss
    host: rpc-mainnet.solanatracker.io
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_4
    id: subscribeToVotes
    title: Subscribe to votes
    type: send
    messages:
      - &ref_7
        id: voteSubscribe
        payload:
          - name: voteSubscribe
            description: Subscribe to vote notifications
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: id
                type: integer
                required: false
              - name: method
                type: string
                description: voteSubscribe
                required: false
        headers: []
        jsonPayloadSchema: &ref_0
          type: object
          properties:
            jsonrpc:
              type: string
              const: '2.0'
              default: '2.0'
              x-parser-schema-id: <anonymous-schema-186>
            id:
              type: integer
              default: 1
              x-parser-schema-id: <anonymous-schema-187>
            method:
              type: string
              const: voteSubscribe
              default: voteSubscribe
              x-parser-schema-id: <anonymous-schema-188>
          examples:
            - jsonrpc: '2.0'
              id: 1
              method: voteSubscribe
          x-parser-schema-id: <anonymous-schema-185>
        title: Vote subscribe
        description: Subscribe to vote notifications
        example: |-
          {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "voteSubscribe"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: voteSubscribe
          - id: x-parser-message-name
            value: voteSubscribe
      - &ref_8
        id: voteNotification
        payload:
          - name: voteNotification
            description: Vote notification
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: method
                type: string
                description: voteNotification
                required: false
              - name: params
                type: object
                required: false
                properties:
                  - name: result
                    type: object
                    required: false
                    properties:
                      - name: hash
                        type: string
                        description: Vote hash
                        required: false
                      - name: slots
                        type: array
                        description: Slots voted on
                        required: false
                        properties:
                          - name: item
                            type: integer
                            required: false
                      - name: timestamp
                        type: integer
                        description: Unix timestamp (ms)
                        required: false
                      - name: votePubkey
                        type: string
                        description: Vote account public key
                        required: false
                  - name: subscription
                    type: integer
                    required: false
        headers: []
        jsonPayloadSchema: &ref_1
          type: object
          properties:
            jsonrpc:
              type: string
              const: '2.0'
              default: '2.0'
              x-parser-schema-id: <anonymous-schema-190>
            method:
              type: string
              const: voteNotification
              default: voteNotification
              x-parser-schema-id: <anonymous-schema-191>
            params:
              type: object
              properties:
                result:
                  type: object
                  properties:
                    hash:
                      type: string
                      description: Vote hash
                      x-parser-schema-id: <anonymous-schema-194>
                    slots:
                      type: array
                      items:
                        type: integer
                        x-parser-schema-id: <anonymous-schema-196>
                      description: Slots voted on
                      x-parser-schema-id: <anonymous-schema-195>
                    timestamp:
                      type: integer
                      description: Unix timestamp (ms)
                      x-parser-schema-id: <anonymous-schema-197>
                    votePubkey:
                      type: string
                      description: Vote account public key
                      x-parser-schema-id: <anonymous-schema-198>
                  x-parser-schema-id: <anonymous-schema-193>
                subscription:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-199>
              x-parser-schema-id: <anonymous-schema-192>
          examples:
            - jsonrpc: '2.0'
              method: voteNotification
              params:
                result:
                  hash: 8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM
                  slots:
                    - 1
                    - 2
                  timestamp: 1625081266243
                  votePubkey: B4XPNfLhqBSBV2R7avCaBk4JYeKZKbVLFvCKNMQf88Km
                subscription: 0
          x-parser-schema-id: <anonymous-schema-189>
        title: Vote notification
        description: Vote notification
        example: |-
          {
            "jsonrpc": "2.0",
            "method": "voteNotification",
            "params": {
              "result": {
                "hash": "8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",
                "slots": [
                  1,
                  2
                ],
                "timestamp": 1625081266243,
                "votePubkey": "B4XPNfLhqBSBV2R7avCaBk4JYeKZKbVLFvCKNMQf88Km"
              },
              "subscription": 0
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: voteNotification
          - id: x-parser-message-name
            value: voteNotification
    bindings: []
    extensions: &ref_2
      - id: x-parser-unique-object-id
        value: voteSubscribe
  - &ref_3
    id: receiveVoteNotifications
    title: Receive vote notifications
    type: receive
    messages:
      - &ref_5
        id: voteSubscribe
        payload:
          - name: voteSubscribe
            description: Subscribe to vote notifications
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: id
                type: integer
                required: false
              - name: method
                type: string
                description: voteSubscribe
                required: false
        headers: []
        jsonPayloadSchema: *ref_0
        title: Vote subscribe
        description: Subscribe to vote notifications
        example: |-
          {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "voteSubscribe"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: voteSubscribe
          - id: x-parser-message-name
            value: voteSubscribe
      - &ref_6
        id: voteNotification
        payload:
          - name: voteNotification
            description: Vote notification
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: method
                type: string
                description: voteNotification
                required: false
              - name: params
                type: object
                required: false
                properties:
                  - name: result
                    type: object
                    required: false
                    properties:
                      - name: hash
                        type: string
                        description: Vote hash
                        required: false
                      - name: slots
                        type: array
                        description: Slots voted on
                        required: false
                        properties:
                          - name: item
                            type: integer
                            required: false
                      - name: timestamp
                        type: integer
                        description: Unix timestamp (ms)
                        required: false
                      - name: votePubkey
                        type: string
                        description: Vote account public key
                        required: false
                  - name: subscription
                    type: integer
                    required: false
        headers: []
        jsonPayloadSchema: *ref_1
        title: Vote notification
        description: Vote notification
        example: |-
          {
            "jsonrpc": "2.0",
            "method": "voteNotification",
            "params": {
              "result": {
                "hash": "8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",
                "slots": [
                  1,
                  2
                ],
                "timestamp": 1625081266243,
                "votePubkey": "B4XPNfLhqBSBV2R7avCaBk4JYeKZKbVLFvCKNMQf88Km"
              },
              "subscription": 0
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: voteNotification
          - id: x-parser-message-name
            value: voteNotification
    bindings: []
    extensions: *ref_2
sendOperations:
  - *ref_3
receiveOperations:
  - *ref_4
sendMessages:
  - *ref_5
  - *ref_6
receiveMessages:
  - *ref_7
  - *ref_8
extensions:
  - id: x-parser-unique-object-id
    value: voteSubscribe
securitySchemes:
  - id: apiKeyAuth
    name: api_key
    type: httpApiKey
    description: >-
      API key for authentication. Provide your Solana Tracker API key as a query
      parameter.
    in: query
    extensions: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.