> ## 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/swap

> WebSocket channel for streaming swap quotes with pre-built transactions. Subscribe to a token pair and receive real-time updates with ready-to-sign swap transactions whenever pool states change.



## AsyncAPI

````yaml raptor/websocket/asyncapi.json /stream/swap
id: /stream/swap
title: /stream/swap
description: >-
  WebSocket channel for streaming swap quotes with pre-built transactions.
  Subscribe to a token pair and receive real-time updates with ready-to-sign
  swap transactions whenever pool states change.
servers:
  - id: production
    protocol: wss
    host: raptor-beta.solanatracker.io
    bindings: []
    variables: []
address: /stream/swap
parameters: []
bindings: []
operations:
  - &ref_1
    id: sendSwapMessage
    title: Send swap message
    description: Send swap subscription commands
    type: receive
    messages:
      - &ref_3
        id: sendSwapMessage.message.0
        contentType: application/json
        payload:
          - name: Subscribe to Swap Updates
            description: >-
              Subscribe to real-time swap quotes with pre-built transactions 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., swap_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: userPublicKey
                type: string
                description: >-
                  Base58-encoded user wallet public key - required for building
                  swap transaction
                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
              - name: pools
                type: string
                description: >-
                  Comma-separated list of specific pool addresses to route
                  through
                required: false
              - name: wrapUnwrapSol
                type: boolean
                description: Whether to automatically wrap/unwrap SOL
                required: false
              - name: priorityFee
                type: string
                description: >-
                  Priority fee level ('min', 'low', 'medium', 'high',
                  'veryHigh', 'unsafeMax') or exact microlamports value
                required: false
              - name: maxPriorityFee
                type: integer
                description: >-
                  Maximum priority fee in microlamports (caps the fee if using
                  dynamic levels)
                required: false
              - name: computeUnitPriceMicroLamports
                type: integer
                description: >-
                  Exact compute unit price in microlamports (overrides
                  priorityFee)
                required: false
              - name: computeUnitLimit
                type: integer
                description: Compute unit limit for the transaction
                required: false
              - name: txVersion
                type: string
                description: Transaction version to build
                enumValues:
                  - legacy
                  - v0
                required: false
              - name: feeAccount
                type: string
                description: Base58-encoded account to receive platform fees
                required: false
              - name: feeBps
                type: integer
                description: Platform fee in basis points
                required: false
              - name: feeFromInput
                type: boolean
                description: Take fee from input token (true) or output token (false)
                required: false
              - name: chargeBps
                type: integer
                description: Extra charge on positive slippage in basis points
                required: false
              - name: destinationTokenAccount
                type: string
                description: >-
                  Custom destination token account (base58). If not provided,
                  ATA is used
                required: false
              - name: tipAccount
                type: string
                description: Tip account public key (base58)
                required: false
              - name: tipLamports
                type: integer
                description: Tip amount in lamports
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - inputMint
            - outputMint
            - amount
            - userPublicKey
          properties:
            type:
              type: string
              const: subscribe
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-52>
            id:
              type: string
              description: >-
                Optional custom subscription ID. If not provided, a unique ID
                will be generated (e.g., swap_1767187968856399)
              x-parser-schema-id: <anonymous-schema-53>
            inputMint:
              type: string
              description: Base58-encoded public key of the input token mint
              example: So11111111111111111111111111111111111111112
              x-parser-schema-id: <anonymous-schema-54>
            outputMint:
              type: string
              description: Base58-encoded public key of the output token mint
              example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              x-parser-schema-id: <anonymous-schema-55>
            amount:
              type: integer
              format: uint64
              description: >-
                Amount of input tokens in smallest units (lamports for SOL,
                etc.)
              example: 1000000000
              x-parser-schema-id: <anonymous-schema-56>
            userPublicKey:
              type: string
              description: >-
                Base58-encoded user wallet public key - required for building
                swap transaction
              example: YourWa11etPubkeyHere111111111111111111111111
              x-parser-schema-id: <anonymous-schema-57>
            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-58>
            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-59>
            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-60>
            pools:
              type: string
              description: Comma-separated list of specific pool addresses to route through
              x-parser-schema-id: <anonymous-schema-61>
            wrapUnwrapSol:
              type: boolean
              default: true
              description: Whether to automatically wrap/unwrap SOL
              x-parser-schema-id: <anonymous-schema-62>
            priorityFee:
              type: string
              description: >-
                Priority fee level ('min', 'low', 'medium', 'high', 'veryHigh',
                'unsafeMax') or exact microlamports value
              example: medium
              x-parser-schema-id: <anonymous-schema-63>
            maxPriorityFee:
              type: integer
              description: >-
                Maximum priority fee in microlamports (caps the fee if using
                dynamic levels)
              x-parser-schema-id: <anonymous-schema-64>
            computeUnitPriceMicroLamports:
              type: integer
              description: >-
                Exact compute unit price in microlamports (overrides
                priorityFee)
              x-parser-schema-id: <anonymous-schema-65>
            computeUnitLimit:
              type: integer
              description: Compute unit limit for the transaction
              x-parser-schema-id: <anonymous-schema-66>
            txVersion:
              type: string
              enum:
                - legacy
                - v0
              default: v0
              description: Transaction version to build
              x-parser-schema-id: <anonymous-schema-67>
            feeAccount:
              type: string
              description: Base58-encoded account to receive platform fees
              x-parser-schema-id: <anonymous-schema-68>
            feeBps:
              type: integer
              default: 0
              description: Platform fee in basis points
              x-parser-schema-id: <anonymous-schema-69>
            feeFromInput:
              type: boolean
              default: false
              description: Take fee from input token (true) or output token (false)
              x-parser-schema-id: <anonymous-schema-70>
            chargeBps:
              type: integer
              default: 0
              description: Extra charge on positive slippage in basis points
              x-parser-schema-id: <anonymous-schema-71>
            destinationTokenAccount:
              type: string
              description: >-
                Custom destination token account (base58). If not provided, ATA
                is used
              x-parser-schema-id: <anonymous-schema-72>
            tipAccount:
              type: string
              description: Tip account public key (base58)
              x-parser-schema-id: <anonymous-schema-73>
            tipLamports:
              type: integer
              description: Tip amount in lamports
              x-parser-schema-id: <anonymous-schema-74>
          x-parser-schema-id: SubscribeSwapPayload
        title: Subscribe to Swap Updates
        description: >-
          Subscribe to real-time swap quotes with pre-built transactions for a
          token pair
        example: |-
          {
            "type": "subscribe",
            "inputMint": "So11111111111111111111111111111111111111112",
            "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "amount": 1000000000,
            "userPublicKey": "YourWa11etPubkeyHere111111111111111111111111",
            "slippageBps": "50"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendSwapMessage.message.0
      - &ref_4
        id: sendSwapMessage.message.1
        contentType: application/json
        payload:
          - name: Unsubscribe from Swap Updates
            description: Unsubscribe from a specific swap 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 Swap Updates
        description: Unsubscribe from a specific swap subscription
        example: |-
          {
            "type": "unsubscribe",
            "id": "swap_1767187968856399"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendSwapMessage.message.1
      - &ref_5
        id: sendSwapMessage.message.2
        contentType: application/json
        payload:
          - name: Ping
            description: Send a ping to keep the swap stream 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 swap stream connection alive
        example: |-
          {
            "type": "ping"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sendSwapMessage.message.2
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /stream/swap
  - &ref_2
    id: receiveSwapMessage
    title: Receive swap message
    description: Receive swap updates from the server
    type: send
    messages:
      - &ref_6
        id: receiveSwapMessage.message.0
        contentType: application/json
        payload:
          - name: Swap Update
            description: >-
              Real-time swap quote with pre-built transaction, sent whenever
              pool states change
            type: object
            properties:
              - name: type
                type: string
                description: Message type identifier
                required: true
              - name: id
                type: string
                description: Subscription ID this swap update belongs to
                required: true
              - name: timestamp
                type: integer
                description: Unix timestamp in milliseconds when the swap was generated
                required: true
              - name: quote
                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
              - name: swapTransaction
                type: string
                description: Base64-encoded serialized transaction ready for signing
                required: true
              - name: lastValidBlockHeight
                type: integer
                description: Last valid block height for the transaction
                required: true
              - name: prioritizationFeeLamports
                type: integer
                description: Priority fee included in the transaction in lamports
                required: false
              - name: contextSlot
                type: integer
                description: Solana slot number when the swap was built
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - id
            - quote
            - swapTransaction
            - lastValidBlockHeight
            - timestamp
          properties:
            type:
              type: string
              const: swap
              description: Message type identifier
              x-parser-schema-id: <anonymous-schema-75>
            id:
              type: string
              description: Subscription ID this swap update belongs to
              x-parser-schema-id: <anonymous-schema-76>
            timestamp:
              type: integer
              format: int64
              description: Unix timestamp in milliseconds when the swap was generated
              x-parser-schema-id: <anonymous-schema-77>
            quote:
              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
            swapTransaction:
              type: string
              description: Base64-encoded serialized transaction ready for signing
              x-parser-schema-id: <anonymous-schema-78>
            lastValidBlockHeight:
              type: integer
              format: uint64
              description: Last valid block height for the transaction
              x-parser-schema-id: <anonymous-schema-79>
            prioritizationFeeLamports:
              type: integer
              description: Priority fee included in the transaction in lamports
              x-parser-schema-id: <anonymous-schema-80>
            contextSlot:
              type: integer
              format: uint64
              description: Solana slot number when the swap was built
              x-parser-schema-id: <anonymous-schema-81>
          x-parser-schema-id: SwapUpdatePayload
        title: Swap Update
        description: >-
          Real-time swap quote with pre-built transaction, sent whenever pool
          states change
        example: |-
          {
            "type": "swap",
            "id": "swap_1767187968856399",
            "timestamp": 1767188116413,
            "quote": {
              "inputMint": "So11111111111111111111111111111111111111112",
              "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "amountIn": "1000000000",
              "amountOut": "125891340",
              "minAmountOut": "125261880",
              "slippageBps": 50,
              "priceImpact": 0.00000763905067919488,
              "feeAmount": "400000",
              "swapUsdValue": "125.89",
              "contextSlot": 390395145,
              "timeTaken": 0.000677147,
              "routePlan": [
                {
                  "inputMint": "So11111111111111111111111111111111111111112",
                  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "amountIn": "1000000000",
                  "amountOut": "125891340",
                  "feeAmount": "400000",
                  "priceImpact": 0.00000763905067919488,
                  "percent": 100,
                  "pool": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE",
                  "dex": "Whirlpool",
                  "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
                }
              ]
            },
            "swapTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAHEf...",
            "lastValidBlockHeight": 250000000,
            "priorityFeeUsed": 100000
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveSwapMessage.message.0
      - &ref_7
        id: receiveSwapMessage.message.1
        contentType: application/json
        payload:
          - name: Swap Subscription Confirmation
            description: Confirmation that a swap 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: Swap Subscription Confirmation
        description: Confirmation that a swap subscription was successfully created
        example: |-
          {
            "type": "subscribed",
            "id": "swap_1767187968856399"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveSwapMessage.message.1
      - &ref_8
        id: receiveSwapMessage.message.2
        contentType: application/json
        payload:
          - name: Swap Unsubscription Confirmation
            description: Confirmation that a swap 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: Swap Unsubscription Confirmation
        description: Confirmation that a swap subscription was removed
        example: |-
          {
            "type": "unsubscribed",
            "id": "swap_1767187968856399",
            "success": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveSwapMessage.message.2
      - &ref_9
        id: receiveSwapMessage.message.3
        contentType: application/json
        payload:
          - name: Pong Response
            description: Response to a ping message on swap stream
            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 on swap stream
        example: |-
          {
            "type": "pong",
            "timestamp": 1767188116413
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveSwapMessage.message.3
      - &ref_10
        id: receiveSwapMessage.message.4
        contentType: application/json
        payload:
          - name: Swap Error Response
            description: Error message from the swap stream 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: Swap Error Response
        description: Error message from the swap stream server
        example: |-
          {
            "type": "error",
            "error": "Invalid userPublicKey"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: receiveSwapMessage.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/swap
securitySchemes: []

````