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

# Token volume

> Subscribe to token volume updates



## AsyncAPI

````yaml datastream/statistics.json tokenVolume
id: tokenVolume
title: Token volume
description: Subscribe to token volume updates
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: subscribeToTokenVolume
    title: Subscribe to token volume
    description: Subscribe to token volume
    type: receive
    messages:
      - &ref_5
        id: joinTokenVolume
        payload:
          - name: joinTokenVolume
            description: Subscribe to token volume
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: Token volume room (volume:token:{tokenAddress})
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-66>
            room:
              type: string
              pattern: ^volume:token:[A-Za-z0-9]{32,44}$
              description: Token volume room (volume:token:{tokenAddress})
              default: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              x-parser-schema-id: <anonymous-schema-67>
          examples:
            - type: join
              room: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-65>
        title: Join token volume
        description: Subscribe to token volume
        example: |-
          {
            "type": "join",
            "room": "volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: joinTokenVolume
          - id: x-parser-message-name
            value: joinTokenVolume
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: tokenVolume
  - &ref_3
    id: receiveTokenVolumeConfirmation
    title: Receive token volume confirmation
    description: Receive token volume confirmation
    type: send
    messages:
      - &ref_7
        id: tokenVolumeJoined
        payload:
          - name: tokenVolumeJoined
            description: Token volume 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-69>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-70>
          examples:
            - type: joined
              room: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-68>
        title: Token volume joined
        description: Token volume subscription confirmed
        example: |-
          {
            "type": "joined",
            "room": "volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tokenVolumeJoined
          - id: x-parser-message-name
            value: tokenVolumeJoined
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: receiveTokenVolumeData
    title: Receive token volume data
    description: Receive token volume
    type: send
    messages:
      - &ref_8
        id: tokenVolumeMessage
        payload:
          - name: tokenVolumeMessage
            description: Token volume notification
            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: token
                    type: string
                    required: false
                  - name: volume
                    type: number
                    required: false
                  - name: txCount
                    type: integer
                    required: false
                  - name: timestamp
                    type: number
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: message
              x-parser-schema-id: <anonymous-schema-72>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-73>
            data:
              type: object
              properties:
                token:
                  type: string
                  x-parser-schema-id: <anonymous-schema-74>
                volume:
                  type: number
                  x-parser-schema-id: <anonymous-schema-75>
                txCount:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-76>
                timestamp:
                  type: number
                  x-parser-schema-id: <anonymous-schema-77>
              x-parser-schema-id: VolumeTokenUpdate
          examples:
            - type: message
              room: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              data:
                token: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                volume: 15000.36
                txCount: 1
                timestamp: 1739318753652
          x-parser-schema-id: <anonymous-schema-71>
        title: Token volume message
        description: Token volume notification
        example: |-
          {
            "type": "message",
            "room": "volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
            "data": {
              "token": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
              "volume": 15000.36,
              "txCount": 1,
              "timestamp": 1739318753652
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tokenVolumeMessage
          - id: x-parser-message-name
            value: tokenVolumeMessage
    bindings: []
    extensions: *ref_0
  - &ref_2
    id: unsubscribeFromTokenVolume
    title: Unsubscribe from token volume
    description: Unsubscribe from token volume
    type: receive
    messages:
      - &ref_6
        id: leaveTokenVolume
        payload:
          - name: leaveTokenVolume
            description: Unsubscribe from token volume
            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-79>
            room:
              type: string
              default: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
              x-parser-schema-id: <anonymous-schema-80>
          examples:
            - type: leave
              room: volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
          x-parser-schema-id: <anonymous-schema-78>
        title: Leave token volume
        description: Unsubscribe from token volume
        example: |-
          {
            "type": "leave",
            "room": "volume:token:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leaveTokenVolume
          - id: x-parser-message-name
            value: leaveTokenVolume
    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: tokenVolume
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: []

````