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

# Holders

> Subscribe to holder count changes for a token



## AsyncAPI

````yaml datastream/pool-token-updates.json holders
id: holders
title: Holders
description: Subscribe to holder count changes for a token
servers:
  - id: production
    protocol: wss
    host: datastream.solanatracker.io
    bindings: []
    variables:
      - id: apiKey
        description: Your unique API key from Data API subscription
        allowedValues: []
        examples: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: subscribeToHolders
    title: Subscribe to holders
    description: Subscribe to holders
    type: receive
    messages:
      - &ref_5
        id: joinHolders
        payload:
          - name: joinHolders
            description: Subscribe to holder count
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: Holders room (holders:{tokenAddress})
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-95>
            room:
              type: string
              pattern: ^holders:[A-Za-z0-9]{32,44}$
              description: Holders room (holders:{tokenAddress})
              default: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              x-parser-schema-id: <anonymous-schema-96>
          examples:
            - type: join
              room: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-94>
        title: Join holders
        description: Subscribe to holder count
        example: |-
          {
            "type": "join",
            "room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: joinHolders
          - id: x-parser-message-name
            value: joinHolders
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: holders
  - &ref_3
    id: receiveHoldersConfirmation
    title: Receive holders confirmation
    description: Receive confirmation
    type: send
    messages:
      - &ref_7
        id: holdersJoined
        payload:
          - name: holdersJoined
            description: Holders subscription confirmed
            type: object
            properties:
              - name: type
                type: string
                description: joined
                required: false
              - name: room
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: joined
              x-parser-schema-id: <anonymous-schema-98>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-99>
          examples:
            - type: joined
              room: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-97>
        title: Holders joined
        description: Holders subscription confirmed
        example: |-
          {
            "type": "joined",
            "room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: holdersJoined
          - id: x-parser-message-name
            value: holdersJoined
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: receiveHoldersData
    title: Receive holders data
    description: Receive holder count
    type: send
    messages:
      - &ref_8
        id: holdersMessage
        payload:
          - name: holdersMessage
            description: Holders count update
            type: object
            properties:
              - name: type
                type: string
                description: message
                required: false
              - name: room
                type: string
                required: false
              - name: data
                type: object
                required: false
                properties:
                  - name: total
                    type: integer
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: message
              x-parser-schema-id: <anonymous-schema-101>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-102>
            data:
              type: object
              properties:
                total:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-103>
              x-parser-schema-id: HolderCount
          examples:
            - type: message
              room: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              data:
                total: 91367
          x-parser-schema-id: <anonymous-schema-100>
        title: Holders message
        description: Holders count update
        example: |-
          {
            "type": "message",
            "room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
            "data": {
              "total": 91367
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: holdersMessage
          - id: x-parser-message-name
            value: holdersMessage
    bindings: []
    extensions: *ref_0
  - &ref_2
    id: unsubscribeFromHolders
    title: Unsubscribe from holders
    description: Unsubscribe
    type: receive
    messages:
      - &ref_6
        id: leaveHolders
        payload:
          - name: leaveHolders
            description: Unsubscribe from holders
            type: object
            properties:
              - name: type
                type: string
                description: leave
                required: true
              - name: room
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: leave
              default: leave
              x-parser-schema-id: <anonymous-schema-105>
            room:
              type: string
              default: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              x-parser-schema-id: <anonymous-schema-106>
          examples:
            - type: leave
              room: holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-104>
        title: Leave holders
        description: Unsubscribe from holders
        example: |-
          {
            "type": "leave",
            "room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leaveHolders
          - id: x-parser-message-name
            value: leaveHolders
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
receiveOperations:
  - *ref_3
  - *ref_4
sendMessages:
  - *ref_5
  - *ref_6
receiveMessages:
  - *ref_7
  - *ref_8
extensions:
  - id: x-parser-unique-object-id
    value: holders
securitySchemes:
  - id: apiKeyAuth
    name: apiKey
    type: httpApiKey
    description: >-
      API key for authentication. Include your Datastream key in the connection
      URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
    in: header
    extensions: []

````