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

# Swap stream

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

Live quotes plus a ready-to-sign transaction for `userPublicKey`. Sign the latest `swapTransaction` and send it with `POST /send-transaction`. If nothing changes for 10 slots, the server re-sends a fresh transaction so the latest one does not expire.



## AsyncAPI

````yaml raptor/websocket/asyncapi.json swapStream
id: swapStream
title: Swap stream
description: >-
  `wss://raptor.solanatracker.io/stream/swap`


  Live quotes plus a ready-to-sign transaction for `userPublicKey`. Sign the
  latest `swapTransaction` and send it with `POST /send-transaction`. If nothing
  changes for 10 slots, the server re-sends a fresh transaction so the latest
  one does not expire.
servers:
  - id: production
    protocol: wss
    host: raptor.solanatracker.io
    bindings: []
    variables: []
address: /stream/swap
parameters: []
bindings: []
operations:
  - &ref_1
    id: sendSwapStream
    title: Client messages
    description: Messages you send on /stream/swap
    type: receive
    messages:
      - &ref_3
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe
            description: >-
              Start receiving quotes and ready-to-sign transactions 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: userPublicKey
                type: string
                description: Wallet that will sign and pay for the swap
                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: pools
                type: string
                description: Only route through these pools (comma-separated)
                required: false
              - name: maxHops
                type: integer
                required: false
              - name: onlyDirectRoutes
                type: boolean
                required: false
              - name: jitRouting
                type: string
                enumValues:
                  - auto
                  - 'true'
                  - 'false'
                required: false
              - name: searchMode
                type: string
                enumValues:
                  - fast
                  - deep
                required: false
              - name: wrapUnwrapSol
                type: boolean
                description: Wrap and unwrap native SOL automatically
                required: false
              - name: txVersion
                type: string
                description: >-
                  Transaction format. Case-sensitive. `LEGACY` and `V1` need
                  `jitRouting: "false"`.
                enumValues:
                  - V0
                  - LEGACY
                  - V1
                required: false
              - name: priorityFee
                type: string
                description: >-
                  A level (`min`, `low`, `medium`, `auto`, `high`, `veryHigh`,
                  `turbo`, `unsafeMax`) or a total fee in lamports as a string.
                  Default `auto`.
                required: false
              - name: maxPriorityFee
                type: integer
                description: Cap on the compute unit price, in micro-lamports
                required: false
              - name: computeUnitPriceMicroLamports
                type: integer
                description: >-
                  Exact compute unit price in micro-lamports. Overrides
                  `priorityFee`.
                required: false
              - name: computeUnitLimit
                type: integer
                required: false
              - name: tipAccount
                type: string
                description: Account that receives a SOL tip
                required: false
              - name: tipLamports
                type: integer
                description: Tip amount in lamports
                required: false
              - name: destinationTokenAccount
                type: string
                description: >-
                  Send the output to this token account instead of the wallet's
                  associated token account
                required: false
              - name: feeAccount
                type: string
                description: Wallet that receives your platform fee
                required: false
              - name: feeBps
                type: integer
                description: Platform fee in basis points (max 1000)
                required: false
              - name: feeFromInput
                type: boolean
                description: Take the platform fee from the input token
                required: false
              - name: chargeBps
                type: integer
                description: Fee on positive slippage, in basis points
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - inputMint
            - outputMint
            - amount
            - userPublicKey
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-63>
            id:
              type: string
              description: >-
                Your own id for this subscription. If omitted, the server
                generates one.
              x-parser-schema-id: <anonymous-schema-64>
            inputMint:
              type: string
              description: Mint of the token you sell
              example: So11111111111111111111111111111111111111112
              x-parser-schema-id: <anonymous-schema-65>
            outputMint:
              type: string
              description: Mint of the token you buy
              example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              x-parser-schema-id: <anonymous-schema-66>
            amount:
              type: integer
              description: >-
                Amount to sell, in the input token's smallest unit (lamports for
                SOL)
              example: 1000000000
              x-parser-schema-id: <anonymous-schema-67>
            userPublicKey:
              type: string
              description: Wallet that will sign and pay for the swap
              x-parser-schema-id: <anonymous-schema-68>
            slippageBps:
              type: string
              default: '50'
              description: Slippage in basis points (`50` = 0.5%), or `dynamic`
              x-parser-schema-id: <anonymous-schema-69>
            dexes:
              type: string
              description: >-
                Only route through these DEXes (comma-separated,
                case-insensitive)
              x-parser-schema-id: <anonymous-schema-70>
            pools:
              type: string
              description: Only route through these pools (comma-separated)
              x-parser-schema-id: <anonymous-schema-71>
            maxHops:
              type: integer
              minimum: 1
              maximum: 4
              default: 4
              x-parser-schema-id: <anonymous-schema-72>
            onlyDirectRoutes:
              type: boolean
              default: false
              x-parser-schema-id: <anonymous-schema-73>
            jitRouting:
              type: string
              enum:
                - auto
                - 'true'
                - 'false'
              default: auto
              x-parser-schema-id: <anonymous-schema-74>
            searchMode:
              type: string
              enum:
                - fast
                - deep
              default: fast
              x-parser-schema-id: <anonymous-schema-75>
            wrapUnwrapSol:
              type: boolean
              default: true
              description: Wrap and unwrap native SOL automatically
              x-parser-schema-id: <anonymous-schema-76>
            txVersion:
              type: string
              enum:
                - V0
                - LEGACY
                - V1
              default: V0
              description: >-
                Transaction format. Case-sensitive. `LEGACY` and `V1` need
                `jitRouting: "false"`.
              x-parser-schema-id: <anonymous-schema-77>
            priorityFee:
              type: string
              description: >-
                A level (`min`, `low`, `medium`, `auto`, `high`, `veryHigh`,
                `turbo`, `unsafeMax`) or a total fee in lamports as a string.
                Default `auto`.
              example: high
              x-parser-schema-id: <anonymous-schema-78>
            maxPriorityFee:
              type: integer
              description: Cap on the compute unit price, in micro-lamports
              x-parser-schema-id: <anonymous-schema-79>
            computeUnitPriceMicroLamports:
              type: integer
              description: >-
                Exact compute unit price in micro-lamports. Overrides
                `priorityFee`.
              x-parser-schema-id: <anonymous-schema-80>
            computeUnitLimit:
              type: integer
              x-parser-schema-id: <anonymous-schema-81>
            tipAccount:
              type: string
              description: Account that receives a SOL tip
              x-parser-schema-id: <anonymous-schema-82>
            tipLamports:
              type: integer
              description: Tip amount in lamports
              x-parser-schema-id: <anonymous-schema-83>
            destinationTokenAccount:
              type: string
              description: >-
                Send the output to this token account instead of the wallet's
                associated token account
              x-parser-schema-id: <anonymous-schema-84>
            feeAccount:
              type: string
              description: Wallet that receives your platform fee
              x-parser-schema-id: <anonymous-schema-85>
            feeBps:
              type: integer
              default: 0
              description: Platform fee in basis points (max 1000)
              x-parser-schema-id: <anonymous-schema-86>
            feeFromInput:
              type: boolean
              default: false
              description: Take the platform fee from the input token
              x-parser-schema-id: <anonymous-schema-87>
            chargeBps:
              type: integer
              default: 0
              description: Fee on positive slippage, in basis points
              x-parser-schema-id: <anonymous-schema-88>
          x-parser-schema-id: SubscribeSwapPayload
        title: Subscribe
        description: Start receiving quotes and ready-to-sign transactions for a token pair
        example: |-
          {
            "type": "subscribe",
            "inputMint": "So11111111111111111111111111111111111111112",
            "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "amount": 1000000000,
            "userPublicKey": "YOUR_WALLET_ADDRESS",
            "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: swapStream
  - &ref_2
    id: receiveSwapStream
    title: Server messages
    description: Messages you receive on /stream/swap
    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: swap
        contentType: application/json
        payload:
          - name: Swap
            description: New best quote and a fresh unsigned transaction
            type: object
            properties:
              - name: type
                type: string
                description: swap
                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: quote
                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
              - name: swapTransaction
                type: string
                description: >-
                  Unsigned transaction, base64. Sign it and send it with `POST
                  /send-transaction`.
                required: true
              - name: lastValidBlockHeight
                type: integer
                description: The transaction expires after this block height
                required: true
              - name: contextSlot
                type: integer
                description: Slot the transaction was built at
                required: false
              - name: prioritizationFeeLamports
                type: integer
                description: Priority fee included, in lamports
                required: false
              - name: priorityFeeUsed
                type: integer
                description: Same as `prioritizationFeeLamports`
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - timestamp
            - quote
            - swapTransaction
            - lastValidBlockHeight
          properties:
            type:
              type: string
              const: swap
              x-parser-schema-id: <anonymous-schema-89>
            id:
              type: string
              description: Subscription id
              x-parser-schema-id: <anonymous-schema-90>
            timestamp:
              type: integer
              description: Server time, Unix ms
              x-parser-schema-id: <anonymous-schema-91>
            searchMode:
              type: string
              enum:
                - fast
                - deep
              x-parser-schema-id: <anonymous-schema-92>
            quote:
              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
            swapTransaction:
              type: string
              description: >-
                Unsigned transaction, base64. Sign it and send it with `POST
                /send-transaction`.
              x-parser-schema-id: <anonymous-schema-93>
            lastValidBlockHeight:
              type: integer
              description: The transaction expires after this block height
              x-parser-schema-id: <anonymous-schema-94>
            contextSlot:
              type: integer
              description: Slot the transaction was built at
              x-parser-schema-id: <anonymous-schema-95>
            prioritizationFeeLamports:
              type: integer
              description: Priority fee included, in lamports
              x-parser-schema-id: <anonymous-schema-96>
            priorityFeeUsed:
              type: integer
              description: Same as `prioritizationFeeLamports`
              x-parser-schema-id: <anonymous-schema-97>
          x-parser-schema-id: SwapUpdatePayload
        title: Swap
        description: New best quote and a fresh unsigned transaction
        example: |-
          {
            "type": "swap",
            "id": "sub_1791374197008837",
            "timestamp": 1791374197023,
            "searchMode": "fast",
            "quote": {
              "inputMint": "So11111111111111111111111111111111111111112",
              "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "amountIn": "1000000000",
              "amountOut": "117037940",
              "minAmountOut": "116452750",
              "priceImpact": 0,
              "slippageBps": 50,
              "routePlan": [
                {
                  "programId": "9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp",
                  "dex": "Humidifi",
                  "pool": "8sKQHfjNhvmAw94PhfvfMcytmqW6jmxvwieYyzXCCPu",
                  "inputMint": "So11111111111111111111111111111111111111112",
                  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "amountIn": "1000000000",
                  "amountOut": "117037940",
                  "priceImpact": 0,
                  "percent": 100
                }
              ],
              "swapUsdValue": "117.20",
              "platformFee": {
                "feeBps": 0,
                "feeFromInput": false,
                "chargeBps": 0
              },
              "contextSlot": 454215931,
              "timeTaken": 0.0056
            },
            "swapTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAHEf…",
            "lastValidBlockHeight": 432253664,
            "contextSlot": 454215931,
            "prioritizationFeeLamports": 9600,
            "priorityFeeUsed": 9600
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: swap
      - &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: swapStream
securitySchemes: []

````

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