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

# Quote stream

> `wss://raptor.solanatracker.io/stream`

Live quotes for one or more token pairs. Use it to show prices. To get a transaction, pass a quote to `POST /swap`, or use the swap stream.



## AsyncAPI

````yaml raptor/websocket/asyncapi.json quoteStream
id: quoteStream
title: Quote stream
description: >-
  `wss://raptor.solanatracker.io/stream`


  Live quotes for one or more token pairs. Use it to show prices. To get a
  transaction, pass a quote to `POST /swap`, or use the swap stream.
servers:
  - id: production
    protocol: wss
    host: raptor.solanatracker.io
    bindings: []
    variables: []
address: /stream
parameters: []
bindings: []
operations:
  - &ref_1
    id: sendQuoteStream
    title: Client messages
    description: Messages you send on /stream
    type: receive
    messages:
      - &ref_3
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe
            description: Start receiving quotes for a token pair
            type: object
            properties:
              - name: type
                type: string
                description: subscribe
                required: true
              - name: id
                type: string
                description: >-
                  Your own id for this subscription. If omitted, the server
                  generates one.
                required: false
              - name: inputMint
                type: string
                description: Mint of the token you sell
                required: true
              - name: outputMint
                type: string
                description: Mint of the token you buy
                required: true
              - name: amount
                type: integer
                description: >-
                  Amount to sell, in the input token's smallest unit (lamports
                  for SOL)
                required: true
              - name: slippageBps
                type: string
                description: Slippage in basis points (`50` = 0.5%), or `dynamic`
                required: false
              - name: dexes
                type: string
                description: >-
                  Only route through these DEXes (comma-separated,
                  case-insensitive)
                required: false
              - name: maxHops
                type: integer
                required: false
              - name: onlyDirectRoutes
                type: boolean
                description: Only use single-hop routes
                required: false
              - name: jitRouting
                type: string
                description: Just-in-time routing mode
                enumValues:
                  - auto
                  - 'true'
                  - 'false'
                required: false
              - name: searchMode
                type: string
                enumValues:
                  - fast
                  - deep
                required: false
              - name: userPublicKey
                type: string
                description: Optional wallet that will run the swap
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - inputMint
            - outputMint
            - amount
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-1>
            id:
              type: string
              description: >-
                Your own id for this subscription. If omitted, the server
                generates one.
              x-parser-schema-id: <anonymous-schema-2>
            inputMint:
              type: string
              description: Mint of the token you sell
              example: So11111111111111111111111111111111111111112
              x-parser-schema-id: <anonymous-schema-3>
            outputMint:
              type: string
              description: Mint of the token you buy
              example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              x-parser-schema-id: <anonymous-schema-4>
            amount:
              type: integer
              description: >-
                Amount to sell, in the input token's smallest unit (lamports for
                SOL)
              example: 100000000
              x-parser-schema-id: <anonymous-schema-5>
            slippageBps:
              type: string
              default: '50'
              description: Slippage in basis points (`50` = 0.5%), or `dynamic`
              x-parser-schema-id: <anonymous-schema-6>
            dexes:
              type: string
              description: >-
                Only route through these DEXes (comma-separated,
                case-insensitive)
              example: raydium,whirlpool
              x-parser-schema-id: <anonymous-schema-7>
            maxHops:
              type: integer
              minimum: 1
              maximum: 4
              default: 4
              x-parser-schema-id: <anonymous-schema-8>
            onlyDirectRoutes:
              type: boolean
              default: false
              description: Only use single-hop routes
              x-parser-schema-id: <anonymous-schema-9>
            jitRouting:
              type: string
              enum:
                - auto
                - 'true'
                - 'false'
              default: auto
              description: Just-in-time routing mode
              x-parser-schema-id: <anonymous-schema-10>
            searchMode:
              type: string
              enum:
                - fast
                - deep
              default: fast
              x-parser-schema-id: <anonymous-schema-11>
            userPublicKey:
              type: string
              description: Optional wallet that will run the swap
              x-parser-schema-id: <anonymous-schema-12>
          x-parser-schema-id: SubscribeQuotePayload
        title: Subscribe
        description: Start receiving quotes for a token pair
        example: |-
          {
            "type": "subscribe",
            "inputMint": "So11111111111111111111111111111111111111112",
            "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "amount": 100000000,
            "slippageBps": "50"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
      - &ref_4
        id: unsubscribe
        contentType: application/json
        payload:
          - name: Unsubscribe
            description: Stop a subscription
            type: object
            properties:
              - name: type
                type: string
                description: unsubscribe
                required: true
              - name: id
                type: string
                description: Subscription id
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
          properties:
            type:
              type: string
              const: unsubscribe
              x-parser-schema-id: <anonymous-schema-13>
            id:
              type: string
              description: Subscription id
              x-parser-schema-id: <anonymous-schema-14>
          x-parser-schema-id: UnsubscribePayload
        title: Unsubscribe
        description: Stop a subscription
        example: |-
          {
            "type": "unsubscribe",
            "id": "sub_1791374181484151"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribe
      - &ref_5
        id: ping
        contentType: application/json
        payload:
          - name: Ping
            description: Keep the connection alive. The server answers with pong.
            type: object
            properties:
              - name: type
                type: string
                description: ping
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
          properties:
            type:
              type: string
              const: ping
              x-parser-schema-id: <anonymous-schema-15>
          x-parser-schema-id: PingPayload
        title: Ping
        description: Keep the connection alive. The server answers with pong.
        example: |-
          {
            "type": "ping"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: ping
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: quoteStream
  - &ref_2
    id: receiveQuoteStream
    title: Server messages
    description: Messages you receive on /stream
    type: send
    messages:
      - &ref_6
        id: subscribed
        contentType: application/json
        payload:
          - name: Subscribed
            description: >-
              The subscription is active. Keep the id to match updates and to
              unsubscribe.
            type: object
            properties:
              - name: type
                type: string
                description: subscribed
                required: true
              - name: id
                type: string
                description: Subscription id
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
          properties:
            type:
              type: string
              const: subscribed
              x-parser-schema-id: <anonymous-schema-16>
            id:
              type: string
              description: Subscription id
              x-parser-schema-id: <anonymous-schema-17>
          x-parser-schema-id: SubscribedPayload
        title: Subscribed
        description: >-
          The subscription is active. Keep the id to match updates and to
          unsubscribe.
        example: |-
          {
            "type": "subscribed",
            "id": "sub_1791374181484151"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribed
      - &ref_7
        id: quote
        contentType: application/json
        payload:
          - name: Quote
            description: New best quote for a subscription
            type: object
            properties:
              - name: type
                type: string
                description: quote
                required: true
              - name: id
                type: string
                description: Subscription id
                required: true
              - name: timestamp
                type: integer
                description: Server time, Unix ms
                required: true
              - name: searchMode
                type: string
                enumValues:
                  - fast
                  - deep
                required: false
              - name: data
                type: object
                description: Same shape as the `GET /quote` response
                required: true
                properties:
                  - name: inputMint
                    type: string
                    required: true
                  - name: outputMint
                    type: string
                    required: true
                  - name: amountIn
                    type: string
                    description: Amount sold, in the input token's smallest unit
                    required: true
                  - name: amountOut
                    type: string
                    description: >-
                      Expected amount received, in the output token's smallest
                      unit
                    required: true
                  - name: minAmountOut
                    type: string
                    description: Least amount the swap will accept after slippage
                    required: true
                  - name: feeAmount
                    type: string
                    description: Pool fees for the route, when reported
                    required: false
                  - name: priceImpact
                    type: number
                    description: Price impact in percent (`0.25` = 0.25%)
                    required: true
                  - name: slippageBps
                    type: integer
                    required: true
                  - name: routePlan
                    type: array
                    required: true
                    properties:
                      - name: programId
                        type: string
                        required: true
                      - name: dex
                        type: string
                        description: DEX name
                        required: true
                      - name: pool
                        type: string
                        description: Pool address
                        required: true
                      - name: inputMint
                        type: string
                        required: true
                      - name: outputMint
                        type: string
                        required: true
                      - name: amountIn
                        type: string
                        required: true
                      - name: amountOut
                        type: string
                        required: true
                      - name: feeAmount
                        type: string
                        required: false
                      - name: priceImpact
                        type: number
                        description: Percent
                        required: false
                      - name: percent
                        type: integer
                        description: Share of the input sent through this step
                        required: false
                  - name: swapUsdValue
                    type: string
                    description: USD value of the input amount
                    required: false
                  - name: platformFee
                    type: object
                    required: false
                    properties:
                      - name: feeAccount
                        type: string
                        required: false
                      - name: feeBps
                        type: integer
                        required: false
                      - name: feeFromInput
                        type: boolean
                        required: false
                      - name: chargeBps
                        type: integer
                        required: false
                  - name: tokenTransfers
                    type: object
                    description: >-
                      Present only when a token charges a Token-2022 transfer
                      fee
                    required: false
                    properties:
                      - name: depositFee
                        type: string
                        required: false
                      - name: deliveryFee
                        type: string
                        required: false
                      - name: netOutput
                        type: string
                        description: What reaches the wallet after fees
                        required: false
                  - name: contextSlot
                    type: integer
                    required: false
                  - name: timeTaken
                    type: number
                    description: Seconds
                    required: false
                  - name: jitRouting
                    type: boolean
                    description: '`true` when the quote uses a just-in-time route'
                    required: false
                  - name: quoteId
                    type: string
                    description: >-
                      Short-lived execution plan reference. Pass the quote
                      unchanged to `POST /swap` within a few seconds.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - timestamp
            - data
          properties:
            type:
              type: string
              const: quote
              x-parser-schema-id: <anonymous-schema-18>
            id:
              type: string
              description: Subscription id
              x-parser-schema-id: <anonymous-schema-19>
            timestamp:
              type: integer
              description: Server time, Unix ms
              x-parser-schema-id: <anonymous-schema-20>
            searchMode:
              type: string
              enum:
                - fast
                - deep
              x-parser-schema-id: <anonymous-schema-21>
            data:
              type: object
              description: Same shape as the `GET /quote` response
              required:
                - inputMint
                - outputMint
                - amountIn
                - amountOut
                - minAmountOut
                - priceImpact
                - slippageBps
                - routePlan
              properties:
                inputMint:
                  type: string
                  x-parser-schema-id: <anonymous-schema-22>
                outputMint:
                  type: string
                  x-parser-schema-id: <anonymous-schema-23>
                amountIn:
                  type: string
                  description: Amount sold, in the input token's smallest unit
                  x-parser-schema-id: <anonymous-schema-24>
                amountOut:
                  type: string
                  description: >-
                    Expected amount received, in the output token's smallest
                    unit
                  x-parser-schema-id: <anonymous-schema-25>
                minAmountOut:
                  type: string
                  description: Least amount the swap will accept after slippage
                  x-parser-schema-id: <anonymous-schema-26>
                feeAmount:
                  type: string
                  description: Pool fees for the route, when reported
                  x-parser-schema-id: <anonymous-schema-27>
                priceImpact:
                  type: number
                  description: Price impact in percent (`0.25` = 0.25%)
                  x-parser-schema-id: <anonymous-schema-28>
                slippageBps:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-29>
                routePlan:
                  type: array
                  items:
                    type: object
                    required:
                      - programId
                      - dex
                      - pool
                      - inputMint
                      - outputMint
                      - amountIn
                      - amountOut
                    properties:
                      programId:
                        type: string
                        x-parser-schema-id: <anonymous-schema-31>
                      dex:
                        type: string
                        description: DEX name
                        x-parser-schema-id: <anonymous-schema-32>
                      pool:
                        type: string
                        description: Pool address
                        x-parser-schema-id: <anonymous-schema-33>
                      inputMint:
                        type: string
                        x-parser-schema-id: <anonymous-schema-34>
                      outputMint:
                        type: string
                        x-parser-schema-id: <anonymous-schema-35>
                      amountIn:
                        type: string
                        x-parser-schema-id: <anonymous-schema-36>
                      amountOut:
                        type: string
                        x-parser-schema-id: <anonymous-schema-37>
                      feeAmount:
                        type: string
                        x-parser-schema-id: <anonymous-schema-38>
                      priceImpact:
                        type: number
                        description: Percent
                        x-parser-schema-id: <anonymous-schema-39>
                      percent:
                        type: integer
                        description: Share of the input sent through this step
                        x-parser-schema-id: <anonymous-schema-40>
                    x-parser-schema-id: RouteStep
                  x-parser-schema-id: <anonymous-schema-30>
                swapUsdValue:
                  type: string
                  description: USD value of the input amount
                  x-parser-schema-id: <anonymous-schema-41>
                platformFee:
                  type: object
                  properties:
                    feeAccount:
                      type: string
                      x-parser-schema-id: <anonymous-schema-42>
                    feeBps:
                      type: integer
                      x-parser-schema-id: <anonymous-schema-43>
                    feeFromInput:
                      type: boolean
                      x-parser-schema-id: <anonymous-schema-44>
                    chargeBps:
                      type: integer
                      x-parser-schema-id: <anonymous-schema-45>
                  x-parser-schema-id: PlatformFee
                tokenTransfers:
                  type: object
                  description: Present only when a token charges a Token-2022 transfer fee
                  properties:
                    depositFee:
                      type: string
                      x-parser-schema-id: <anonymous-schema-47>
                    deliveryFee:
                      type: string
                      x-parser-schema-id: <anonymous-schema-48>
                    netOutput:
                      type: string
                      description: What reaches the wallet after fees
                      x-parser-schema-id: <anonymous-schema-49>
                  x-parser-schema-id: <anonymous-schema-46>
                contextSlot:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-50>
                timeTaken:
                  type: number
                  description: Seconds
                  x-parser-schema-id: <anonymous-schema-51>
                jitRouting:
                  type: boolean
                  description: '`true` when the quote uses a just-in-time route'
                  x-parser-schema-id: <anonymous-schema-52>
                quoteId:
                  type: string
                  description: >-
                    Short-lived execution plan reference. Pass the quote
                    unchanged to `POST /swap` within a few seconds.
                  x-parser-schema-id: <anonymous-schema-53>
              x-parser-schema-id: Quote
          x-parser-schema-id: QuoteUpdatePayload
        title: Quote
        description: New best quote for a subscription
        example: |-
          {
            "type": "quote",
            "id": "sub_1791374181484151",
            "timestamp": 1791374181491,
            "searchMode": "fast",
            "data": {
              "inputMint": "So11111111111111111111111111111111111111112",
              "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "amountIn": "100000000",
              "amountOut": "11703794",
              "minAmountOut": "11645275",
              "priceImpact": 0,
              "slippageBps": 50,
              "routePlan": [
                {
                  "programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
                  "dex": "Humidifi",
                  "pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
                  "inputMint": "So11111111111111111111111111111111111111112",
                  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "amountIn": "100000000",
                  "amountOut": "11703794",
                  "priceImpact": 0,
                  "percent": 100
                }
              ],
              "swapUsdValue": "11.72",
              "contextSlot": 454215875,
              "timeTaken": 0.0028,
              "quoteId": "Adu55-vpeyHCzw7AuzdKYNkSEGa-3GjpmQNBjtDs6SIy"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: quote
      - &ref_8
        id: unsubscribed
        contentType: application/json
        payload:
          - name: Unsubscribed
            description: The subscription has stopped
            type: object
            properties:
              - name: type
                type: string
                description: unsubscribed
                required: true
              - name: id
                type: string
                required: true
              - name: success
                type: boolean
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - success
          properties:
            type:
              type: string
              const: unsubscribed
              x-parser-schema-id: <anonymous-schema-54>
            id:
              type: string
              x-parser-schema-id: <anonymous-schema-55>
            success:
              type: boolean
              x-parser-schema-id: <anonymous-schema-56>
          x-parser-schema-id: UnsubscribedPayload
        title: Unsubscribed
        description: The subscription has stopped
        example: |-
          {
            "type": "unsubscribed",
            "id": "sub_1791374181484151",
            "success": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribed
      - &ref_9
        id: pong
        contentType: application/json
        payload:
          - name: Pong
            description: Answer to ping
            type: object
            properties:
              - name: type
                type: string
                description: pong
                required: true
              - name: timestamp
                type: integer
                description: Server time, Unix ms
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - timestamp
          properties:
            type:
              type: string
              const: pong
              x-parser-schema-id: <anonymous-schema-57>
            timestamp:
              type: integer
              description: Server time, Unix ms
              x-parser-schema-id: <anonymous-schema-58>
          x-parser-schema-id: PongPayload
        title: Pong
        description: Answer to ping
        example: |-
          {
            "type": "pong",
            "timestamp": 1791374181491
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: pong
      - &ref_10
        id: error
        contentType: application/json
        payload:
          - name: Error
            description: >-
              A request was rejected, or a subscription could not produce an
              update. `id` is set when the error belongs to a subscription.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: id
                type: string
                description: Subscription id, when the error belongs to one
                required: false
              - name: error
                type: string
                description: What went wrong
                required: true
              - name: timestamp
                type: integer
                description: Server time, Unix ms
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - error
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-59>
            id:
              type: string
              description: Subscription id, when the error belongs to one
              x-parser-schema-id: <anonymous-schema-60>
            error:
              type: string
              description: What went wrong
              x-parser-schema-id: <anonymous-schema-61>
            timestamp:
              type: integer
              description: Server time, Unix ms
              x-parser-schema-id: <anonymous-schema-62>
          x-parser-schema-id: ErrorPayload
        title: Error
        description: >-
          A request was rejected, or a subscription could not produce an update.
          `id` is set when the error belongs to a subscription.
        example: |-
          {
            "type": "error",
            "error": "Invalid inputMint"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: error
    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: quoteStream
securitySchemes: []

````

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