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

# Root subscribe



## AsyncAPI

````yaml solana-rpc/websocket/asyncapi.json rootSubscribe
id: rootSubscribe
title: Root subscribe
description: ''
servers:
  - id: production
    protocol: wss
    host: rpc-mainnet.solanatracker.io
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_4
    id: subscribeToRoot
    title: Subscribe to root
    type: send
    messages:
      - &ref_7
        id: rootSubscribe
        payload:
          - name: rootSubscribe
            description: Subscribe to root notifications
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: id
                type: integer
                required: false
              - name: method
                type: string
                description: rootSubscribe
                required: false
        headers: []
        jsonPayloadSchema: &ref_0
          type: object
          properties:
            jsonrpc:
              type: string
              const: '2.0'
              default: '2.0'
              x-parser-schema-id: <anonymous-schema-170>
            id:
              type: integer
              default: 1
              x-parser-schema-id: <anonymous-schema-171>
            method:
              type: string
              const: rootSubscribe
              default: rootSubscribe
              x-parser-schema-id: <anonymous-schema-172>
          examples:
            - jsonrpc: '2.0'
              id: 1
              method: rootSubscribe
          x-parser-schema-id: <anonymous-schema-169>
        title: Root subscribe
        description: Subscribe to root notifications
        example: |-
          {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "rootSubscribe"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: rootSubscribe
          - id: x-parser-message-name
            value: rootSubscribe
      - &ref_8
        id: rootNotification
        payload:
          - name: rootNotification
            description: Root notification
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: method
                type: string
                description: rootNotification
                required: false
              - name: params
                type: object
                required: false
                properties:
                  - name: result
                    type: integer
                    description: The newly set root slot
                    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-174>
            method:
              type: string
              const: rootNotification
              default: rootNotification
              x-parser-schema-id: <anonymous-schema-175>
            params:
              type: object
              properties:
                result:
                  type: integer
                  description: The newly set root slot
                  x-parser-schema-id: <anonymous-schema-177>
                subscription:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-178>
              x-parser-schema-id: <anonymous-schema-176>
          examples:
            - jsonrpc: '2.0'
              method: rootNotification
              params:
                result: 42
                subscription: 0
          x-parser-schema-id: <anonymous-schema-173>
        title: Root notification
        description: Root notification
        example: |-
          {
            "jsonrpc": "2.0",
            "method": "rootNotification",
            "params": {
              "result": 42,
              "subscription": 0
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: rootNotification
          - id: x-parser-message-name
            value: rootNotification
    bindings: []
    extensions: &ref_2
      - id: x-parser-unique-object-id
        value: rootSubscribe
  - &ref_3
    id: receiveRootNotifications
    title: Receive root notifications
    type: receive
    messages:
      - &ref_5
        id: rootSubscribe
        payload:
          - name: rootSubscribe
            description: Subscribe to root notifications
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: id
                type: integer
                required: false
              - name: method
                type: string
                description: rootSubscribe
                required: false
        headers: []
        jsonPayloadSchema: *ref_0
        title: Root subscribe
        description: Subscribe to root notifications
        example: |-
          {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "rootSubscribe"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: rootSubscribe
          - id: x-parser-message-name
            value: rootSubscribe
      - &ref_6
        id: rootNotification
        payload:
          - name: rootNotification
            description: Root notification
            type: object
            properties:
              - name: jsonrpc
                type: string
                description: '2.0'
                required: false
              - name: method
                type: string
                description: rootNotification
                required: false
              - name: params
                type: object
                required: false
                properties:
                  - name: result
                    type: integer
                    description: The newly set root slot
                    required: false
                  - name: subscription
                    type: integer
                    required: false
        headers: []
        jsonPayloadSchema: *ref_1
        title: Root notification
        description: Root notification
        example: |-
          {
            "jsonrpc": "2.0",
            "method": "rootNotification",
            "params": {
              "result": 42,
              "subscription": 0
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: rootNotification
          - id: x-parser-message-name
            value: rootNotification
    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: rootSubscribe
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: []

````