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

# /stream

> WebSocket channel for subscribing to real-time quote updates



## AsyncAPI

````yaml raptor/websocket/asyncapi.json /stream
id: /stream
title: /stream
description: WebSocket channel for subscribing to real-time quote updates
servers:
  - id: production
    protocol: wss
    host: raptor-beta.solanatracker.io
    bindings: []
    variables: []
address: /stream
parameters: []
bindings: []
operations:
  - &ref_1
    id: sendMessage
    title: Send message
    description: Send messages to the server
    type: receive
    messages:
      - &ref_3
        id: sendMessage.message.0
        contentType: application/json
        payload:
          - name: Subscribe to Quote Updates
            description: Subscribe to real-time quote updates for a token pair
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: >-
                  Optional custom subscription ID. If not provided, a unique ID
                  will be generated (e.g., sub_1767187968856399)
                required: false
              - name: inputMint
                type: string
                description: Base58-encoded public key of the input token mint
                required: true
              - name: outputMint
                type: string
                description: Base58-encoded public key of the output token mint
                required: true
              - name: amount
                type: integer
                description: >-
                  Amount of input tokens in smallest units (lamports for SOL,
                  etc.)
                required: true
              - name: slippageBps
                type: string
                description: >-
                  Slippage tolerance in basis points (e.g., '50' = 0.5%) or
                  'dynamic' for automatic volatility-based slippage
                required: false
              - name: maxHops
                type: integer
                description: >-
                  Maximum number of hops in the route (1-4). Use lower values to
                  reduce transaction size
                required: false
              - name: dexes
                type: string
                description: >-
                  Comma-separated list of DEXes to use (e.g.,
                  'raydium,meteora,pumpfun,whirlpool'). If not provided, all
                  DEXes will be used
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - inputMint
            - outputMint
            - amount
          properties:
            type:
              type: string
              const: subscribe
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-1>
            id:
              type: string
              description: >-
                Optional custom subscription ID. If not provided, a unique ID
                will be generated (e.g., sub_1767187968856399)
              x-parser-schema-id: <anonymous-schema-2>
            inputMint:
              type: string
              description: Base58-encoded public key of the input token mint
              example: So11111111111111111111111111111111111111112
              x-parser-schema-id: <anonymous-schema-3>
            outputMint:
              type: string
              description: Base58-encoded public key of the output token mint
              example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              x-parser-schema-id: <anonymous-schema-4>
            amount:
              type: integer
              format: uint64
              description: >-
                Amount of input tokens in smallest units (lamports for SOL,
                etc.)
              example: 100000000
              x-parser-schema-id: <anonymous-schema-5>
            slippageBps:
              type: string
              default: '50'
              description: >-
                Slippage tolerance in basis points (e.g., '50' = 0.5%) or
                'dynamic' for automatic volatility-based slippage
              example: '50'
              x-parser-schema-id: <anonymous-schema-6>
            maxHops:
              type: integer
              minimum: 1
              maximum: 4
              default: 4
              description: >-
                Maximum number of hops in the route (1-4). Use lower values to
                reduce transaction size
              x-parser-schema-id: <anonymous-schema-7>
            dexes:
              type: string
              description: >-
                Comma-separated list of DEXes to use (e.g.,
                'raydium,meteora,pumpfun,whirlpool'). If not provided, all DEXes
                will be used
              example: raydium,whirlpool
              x-parser-schema-id: <anonymous-schema-8>
          x-parser-schema-id: SubscribePayload
        title: Subscribe to Quote Updates
        description: Subscribe to real-time quote updates for a token pair
        example: |-
          {
            "type": "subscribe",
            "inputMint": "So11111111111111111111111111111111111111112",
            "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "amount": 100000000,
            "slippageBps": "50"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendMessage.message.0
      - &ref_4
        id: sendMessage.message.1
        contentType: application/json
        payload:
          - name: Unsubscribe from Quote Updates
            description: Unsubscribe from a specific quote subscription
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: Subscription ID to unsubscribe from
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
          properties:
            type:
              type: string
              const: unsubscribe
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-9>
            id:
              type: string
              description: Subscription ID to unsubscribe from
              x-parser-schema-id: <anonymous-schema-10>
          x-parser-schema-id: UnsubscribePayload
        title: Unsubscribe from Quote Updates
        description: Unsubscribe from a specific quote subscription
        example: |-
          {
            "type": "unsubscribe",
            "id": "sub_1767187968856399"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendMessage.message.1
      - &ref_5
        id: sendMessage.message.2
        contentType: application/json
        payload:
          - name: Ping
            description: Send a ping to keep the connection alive
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
          properties:
            type:
              type: string
              const: ping
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-11>
          x-parser-schema-id: PingPayload
        title: Ping
        description: Send a ping to keep the connection alive
        example: |-
          {
            "type": "ping"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendMessage.message.2
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /stream
  - &ref_2
    id: receiveMessage
    title: Receive message
    description: Receive messages from the server
    type: send
    messages:
      - &ref_6
        id: receiveMessage.message.0
        contentType: application/json
        payload:
          - name: Quote Update
            description: Real-time quote update for a subscribed token pair
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: Subscription ID this quote belongs to
                required: true
              - name: timestamp
                type: integer
                description: Unix timestamp in milliseconds when the quote was generated
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: inputMint
                    type: string
                    description: Base58-encoded public key of the input token mint
                    required: false
                  - name: outputMint
                    type: string
                    description: Base58-encoded public key of the output token mint
                    required: false
                  - name: amountIn
                    type: string
                    description: >-
                      Input amount in smallest units (as string to handle large
                      numbers)
                    required: false
                  - name: amountOut
                    type: string
                    description: Expected output amount in smallest units
                    required: false
                  - name: minAmountOut
                    type: string
                    description: Minimum output amount after slippage
                    required: false
                  - name: slippageBps
                    type: integer
                    description: Slippage tolerance in basis points
                    required: false
                  - name: priceImpact
                    type: number
                    description: Price impact as a decimal (e.g., 0.0001 = 0.01%)
                    required: false
                  - name: feeAmount
                    type: string
                    description: Total fee amount in input token units
                    required: false
                  - name: swapUsdValue
                    type: string
                    description: Estimated USD value of the swap
                    required: false
                  - name: contextSlot
                    type: integer
                    description: Solana slot number when the quote was calculated
                    required: false
                  - name: timeTaken
                    type: number
                    description: Time taken to calculate the quote in seconds
                    required: false
                  - name: routePlan
                    type: array
                    description: Array of route steps for the swap
                    required: false
                  - name: platformFee
                    type: object
                    required: false
                    properties:
                      - name: feeAccount
                        type: string
                        description: Fee wallet public key
                        required: false
                      - name: feeBps
                        type: integer
                        description: Fee in basis points
                        required: false
                      - name: feeFromInput
                        type: boolean
                        description: Whether fee is taken from input token
                        required: false
                      - name: chargeBps
                        type: integer
                        description: Extra charge on positive slippage in basis points
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - data
            - timestamp
          properties:
            type:
              type: string
              const: quote
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-12>
            id:
              type: string
              description: Subscription ID this quote belongs to
              x-parser-schema-id: <anonymous-schema-13>
            timestamp:
              type: integer
              format: int64
              description: Unix timestamp in milliseconds when the quote was generated
              x-parser-schema-id: <anonymous-schema-14>
            data:
              type: object
              required:
                - inputMint
                - outputMint
                - amountIn
                - amountOut
                - minAmountOut
                - slippageBps
                - routePlan
              properties:
                inputMint:
                  type: string
                  description: Base58-encoded public key of the input token mint
                  x-parser-schema-id: <anonymous-schema-15>
                outputMint:
                  type: string
                  description: Base58-encoded public key of the output token mint
                  x-parser-schema-id: <anonymous-schema-16>
                amountIn:
                  type: string
                  description: >-
                    Input amount in smallest units (as string to handle large
                    numbers)
                  x-parser-schema-id: <anonymous-schema-17>
                amountOut:
                  type: string
                  description: Expected output amount in smallest units
                  x-parser-schema-id: <anonymous-schema-18>
                minAmountOut:
                  type: string
                  description: Minimum output amount after slippage
                  x-parser-schema-id: <anonymous-schema-19>
                slippageBps:
                  type: integer
                  description: Slippage tolerance in basis points
                  x-parser-schema-id: <anonymous-schema-20>
                priceImpact:
                  type: number
                  format: double
                  description: Price impact as a decimal (e.g., 0.0001 = 0.01%)
                  x-parser-schema-id: <anonymous-schema-21>
                feeAmount:
                  type: string
                  description: Total fee amount in input token units
                  x-parser-schema-id: <anonymous-schema-22>
                swapUsdValue:
                  type: string
                  description: Estimated USD value of the swap
                  x-parser-schema-id: <anonymous-schema-23>
                contextSlot:
                  type: integer
                  format: uint64
                  description: Solana slot number when the quote was calculated
                  x-parser-schema-id: <anonymous-schema-24>
                timeTaken:
                  type: number
                  format: double
                  description: Time taken to calculate the quote in seconds
                  x-parser-schema-id: <anonymous-schema-25>
                routePlan:
                  type: array
                  items:
                    type: object
                    required:
                      - inputMint
                      - outputMint
                      - amountIn
                      - amountOut
                      - pool
                      - dex
                      - programId
                      - percent
                    properties:
                      inputMint:
                        type: string
                        description: Input token mint for this step
                        x-parser-schema-id: <anonymous-schema-27>
                      outputMint:
                        type: string
                        description: Output token mint for this step
                        x-parser-schema-id: <anonymous-schema-28>
                      amountIn:
                        type: string
                        description: Input amount for this step
                        x-parser-schema-id: <anonymous-schema-29>
                      amountOut:
                        type: string
                        description: Output amount for this step
                        x-parser-schema-id: <anonymous-schema-30>
                      feeAmount:
                        type: string
                        description: Fee amount for this step
                        x-parser-schema-id: <anonymous-schema-31>
                      priceImpact:
                        type: number
                        format: double
                        description: Price impact for this step
                        x-parser-schema-id: <anonymous-schema-32>
                      percent:
                        type: integer
                        minimum: 0
                        maximum: 100
                        description: Percentage of the total swap routed through this step
                        x-parser-schema-id: <anonymous-schema-33>
                      pool:
                        type: string
                        description: Base58-encoded pool address
                        x-parser-schema-id: <anonymous-schema-34>
                      dex:
                        type: string
                        description: >-
                          DEX name (e.g., 'Whirlpool', 'Raydium', 'Meteora',
                          'PumpFun')
                        x-parser-schema-id: <anonymous-schema-35>
                      programId:
                        type: string
                        description: Base58-encoded DEX program ID
                        x-parser-schema-id: <anonymous-schema-36>
                    x-parser-schema-id: RouteStep
                  description: Array of route steps for the swap
                  x-parser-schema-id: <anonymous-schema-26>
                platformFee:
                  type: object
                  properties:
                    feeAccount:
                      type: string
                      description: Fee wallet public key
                      x-parser-schema-id: <anonymous-schema-37>
                    feeBps:
                      type: integer
                      description: Fee in basis points
                      x-parser-schema-id: <anonymous-schema-38>
                    feeFromInput:
                      type: boolean
                      description: Whether fee is taken from input token
                      x-parser-schema-id: <anonymous-schema-39>
                    chargeBps:
                      type: integer
                      description: Extra charge on positive slippage in basis points
                      x-parser-schema-id: <anonymous-schema-40>
                  x-parser-schema-id: PlatformFee
              x-parser-schema-id: QuoteData
          x-parser-schema-id: QuoteUpdatePayload
        title: Quote Update
        description: Real-time quote update for a subscribed token pair
        example: |-
          {
            "type": "quote",
            "id": "sub_1767187968856399",
            "timestamp": 1767188116413,
            "data": {
              "inputMint": "So11111111111111111111111111111111111111112",
              "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "amountIn": "100000000",
              "amountOut": "12589134",
              "minAmountOut": "12526188",
              "slippageBps": 50,
              "priceImpact": 0.00000763905067919488,
              "feeAmount": "40000",
              "swapUsdValue": "12.59",
              "contextSlot": 390395145,
              "timeTaken": 0.000677147,
              "routePlan": [
                {
                  "inputMint": "So11111111111111111111111111111111111111112",
                  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "amountIn": "100000000",
                  "amountOut": "12589134",
                  "feeAmount": "40000",
                  "priceImpact": 0.00000763905067919488,
                  "percent": 100,
                  "pool": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
                  "dex": "Whirlpool",
                  "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
                }
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveMessage.message.0
      - &ref_7
        id: receiveMessage.message.1
        contentType: application/json
        payload:
          - name: Subscription Confirmation
            description: Confirmation that a subscription was successfully created
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: Subscription ID
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
          properties:
            type:
              type: string
              const: subscribed
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-41>
            id:
              type: string
              description: Subscription ID
              x-parser-schema-id: <anonymous-schema-42>
          x-parser-schema-id: SubscribedPayload
        title: Subscription Confirmation
        description: Confirmation that a subscription was successfully created
        example: |-
          {
            "type": "subscribed",
            "id": "sub_1767187968856399"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveMessage.message.1
      - &ref_8
        id: receiveMessage.message.2
        contentType: application/json
        payload:
          - name: Unsubscription Confirmation
            description: Confirmation that a subscription was removed
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: Subscription ID that was unsubscribed
                required: true
              - name: success
                type: boolean
                description: Whether the unsubscription was successful
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - success
          properties:
            type:
              type: string
              const: unsubscribed
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-43>
            id:
              type: string
              description: Subscription ID that was unsubscribed
              x-parser-schema-id: <anonymous-schema-44>
            success:
              type: boolean
              description: Whether the unsubscription was successful
              x-parser-schema-id: <anonymous-schema-45>
          x-parser-schema-id: UnsubscribedPayload
        title: Unsubscription Confirmation
        description: Confirmation that a subscription was removed
        example: |-
          {
            "type": "unsubscribed",
            "id": "sub_1767187968856399",
            "success": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveMessage.message.2
      - &ref_9
        id: receiveMessage.message.3
        contentType: application/json
        payload:
          - name: Pong Response
            description: Response to a ping message
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: timestamp
                type: integer
                description: Server timestamp in milliseconds
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - timestamp
          properties:
            type:
              type: string
              const: pong
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-46>
            timestamp:
              type: integer
              format: int64
              description: Server timestamp in milliseconds
              x-parser-schema-id: <anonymous-schema-47>
          x-parser-schema-id: PongPayload
        title: Pong Response
        description: Response to a ping message
        example: |-
          {
            "type": "pong",
            "timestamp": 1767188116413
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveMessage.message.3
      - &ref_10
        id: receiveMessage.message.4
        contentType: application/json
        payload:
          - name: Error Response
            description: Error message from the server
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: >-
                  Subscription ID if the error is related to a specific
                  subscription
                required: false
              - name: error
                type: string
                description: Error message describing what went wrong
                required: true
              - name: timestamp
                type: integer
                description: >-
                  Server timestamp in milliseconds (present for quote-related
                  errors)
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - error
          properties:
            type:
              type: string
              const: error
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-48>
            id:
              type: string
              description: >-
                Subscription ID if the error is related to a specific
                subscription
              x-parser-schema-id: <anonymous-schema-49>
            error:
              type: string
              description: Error message describing what went wrong
              x-parser-schema-id: <anonymous-schema-50>
            timestamp:
              type: integer
              format: int64
              description: >-
                Server timestamp in milliseconds (present for quote-related
                errors)
              x-parser-schema-id: <anonymous-schema-51>
          x-parser-schema-id: ErrorPayload
        title: Error Response
        description: Error message from the server
        example: |-
          {
            "type": "error",
            "error": "Invalid inputMint"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveMessage.message.4
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
  - *ref_4
  - *ref_5
receiveMessages:
  - *ref_6
  - *ref_7
  - *ref_8
  - *ref_9
  - *ref_10
extensions:
  - id: x-parser-unique-object-id
    value: /stream
securitySchemes: []

````