bloXroute Documentation
WebsiteBlogTwitterDiscord
  • Welcome to bloXroute
  • Introduction
    • Why Use bloXroute?
    • Products
    • Create An Account
    • Technical Support
  • SOLANA
    • Trader API
      • Introduction
        • Regions
        • Authorization
        • Rate Limits
        • Tip and Tipping Addresses
      • Quick Start
        • Transaction Submission
        • Front-Running Protection & Transaction Bundle
        • Go SDK
        • Python SDK
        • Typescript SDK
        • Rust SDK
      • API Endpoints
        • Core Endpoints
          • submit
          • submit-paladin
          • submit-batch
          • balance
          • rate-limit
          • transaction
          • priority-fee
          • GetPriorityFeeStream
          • GetBundleTipStream
          • submit-snipe
        • Pump.fun
          • quotes
          • swap
          • swap-sol
          • GetPumpFunNewTokensStream
          • GetPumpFunSwapsStream
          • GetPumpFunAMMSwapsStream
        • Raydium
          • quotes
          • pools
          • pool-reserves
          • swap
          • cpmm-swap
          • clmm-swap
          • route-swap
          • GetPoolReservesStream
          • GetSwapsStream
          • GetNewRaydiumPoolsStream
          • GetNewRaydiumPoolsByTransactionStream
        • Jupiter
          • quotes
          • swap
          • swap-instructions
          • route-swap
        • Openbook
          • markets
          • orderbooks/{market}
          • depth/{market}
          • tickers/{market}
          • open-orders/{market}
          • unsettled/{market}
          • place
          • replace
          • cancel
          • settle
          • GetOrderbooksStream
          • GetTickersStream
      • Best Performance for Landing Transactions
      • Support
        • API Health
        • Contact us
        • Suggestions
        • Wiki
          • Terms & Concepts
          • Resources
    • Optimized Feed Relay (OFR)
      • Transaction Streamer
      • Gateway and OFR Requirements
      • Gateway and OFR Setup
      • Gateway Startup Arguments
      • OFR performance
      • Logging
      • Submitting Transaction
      • Upgrading Gateway
      • Troubleshooting
  • BSC & ETH
    • EVM Blockchain Distribution Network (BDN)
      • How to Connect
      • The bloXroute Gateway
        • Local Gateway
          • Installation and Startup
            • Authentication & Certificates
            • Requirements
            • Supported Clients
            • GitHub repository option
            • Docker container option
            • Startup Script
            • Startup Arguments
          • General Connectivity Troubleshooting
          • Logging
          • Upgrading your Gateway
        • Add Your Gateway as a Trusted Peer to Your Execution Layer Client
        • Connecting Your Gateway with the Consensus Layer
      • IPs & Relays
        • Relays IPs
        • Private Relays
        • Cloud-API IPs
          • ⏩Reducing Latencies using the BDN
    • APIs
      • Authorization
      • Check Transaction Quota
      • Submit a Transaction
        • Raw Transaction Construction
        • Tx-Validation
        • Batch Transaction
      • Private Transactions
        • ETH Private Transactions
        • BSC Private Transactions
      • Transaction Bundles
        • Bundle Simulation
        • Bundle Validation
        • Bundle Submission
          • BSC Bundle Submission
            • List of BSC Validators
          • ETH Bundle Submission
          • Bundle Submission with Gateway
        • Bundle Tracking
          • BSC Bundle-Trace
          • ETH Bundle-Trace
          • ETH Bundle Inclusion Status
        • Bundle Refunds
          • Priority Fee Refund
          • Bundle Refund
          • Latest Bundle Refunds
      • Backrun Arbitrage
        • BackRunMe: Bundle Submission
          • BSC submit arbOnly
          • ETH submit arbOnly
            • blxr_info
            • ETH arbOnly Simulation
      • Token Launch Sniping
      • Other Utilities
        • List of bloXroute Builders
        • List of External Builders
        • Tx-Trace
        • Ping
    • Streams
      • Requirements
      • Subscription limits
      • Working With Streams
        • Creating a Subscription
          • Websocket
          • gRPC
        • Handling the Notification
          • Websocket
          • gRPC
        • Cancelling a Subscription
          • Websocket
          • gRPC
        • Local Node Validation
      • newTxs and pendingTxs
        • Filters
        • Raw TX Reconstruction
      • BackRunMe: arbOnlyMEV
        • ETH arbOnlyMEV
        • BSC arbOnlyMEV
      • transactionStatus
      • txReceipts
      • newBlocks
      • bdnBlocks
      • ethOnBlock
      • MEVBlockValue
      • MEVNextProposerInfo
    • Block Builders and Validators
      • Validator Gateway
      • MEV Relay (For Validators)
      • Block Submission
      • Proposer MEV-Protect
      • Compliance Lists
      • Preconfirmations
    • Protect RPCs
      • ETH Protect RPC
      • ETH Gas Protect RPC
      • BSC Protect RPC
      • SOL Protect RPC
  • Base Network
    • Submit Transactions
    • Streams
      • GetBdnBlockStream
  • TON NETWORK
    • TON Trader API
      • Quick Start
      • Fee Schedule
      • Connection
      • Submit Signed Transaction
  • Resources
    • BDN Explorer
    • Block Explorer
    • Guides
      • Algorithmic Trading
      • Setting Up a Local Gateway
      • Gateway as Web3 Bridge
    • Architecture
      • BDN Architecture
        • Network Components
        • Performance Techniques
          • Block Compression
          • Cut-through Routing
          • Optimized Topology
      • bloXroute Protocol
        • Versioning
        • Message Structure
        • Message Types
    • Contact Us
Powered by GitBook
On this page
  1. SOLANA
  2. Trader API
  3. API Endpoints
  4. Raydium

GetSwapsStream

This channel provides recent swap transactions specified by the pools. It will tick every time there were updates in the targeted pools.

Subscribe

Method:

GetSwapsStream

Parameters:

Parameter
Type
Description

pools

array

Specify which pool(s) to fetch.

includeFailed

boolean

OPTIONAL. Specify if return any failed swap transaction. true or false

Subscribe sample:

wscat --header "Authorization: $AUTH_HEADER" \
-c wss://ny.solana.dex.blxrbdn.com/ws  --execute '{"jsonrpc": "2.0", "id": 1, "method": "subscribe", "params": ["GetSwapsStream", {"pools": ["58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"], "includeFailed": true}]}' --wait 10000

Event Result Details:

Field
Type
Description

slot

string

The slot number.

swap

string

See swapbelow for details.

swap

Field
Type
Description

success

boolean

If the transaction is a successful.

project

string

Which project this pool belong to.

poolAddress

string

Program address of the pool.

inToken

string

Base token symbol of the pool.

inTokenAddress

string

Base token program address of the pool.

outToken

string

Quote token symbol of the pool.

outTokenAddress

string

Quote token program address of the pool.

inAmount

number

Amount of the swap-in token.

outAmount

number

Amount of the swap-out token.

soureceAccount

string

The source account address where the swap-in token coming from.

destinationAccount

string

The destination account address where the swap-out token coming from.

ownerAaccount

string

The owner address of this swap transaction.

signature

string

Signature of the swap transaction.

Sample event:

{
    "method":"subscribe",
    "params":{
        "subscription":"f29bc4fa-1c0a-42e2-b9b0-1684e6fa8b63",
        "result":{
            "slot":"161254657",
            "swap":{
                "success":true,
                "project":"P_RAYDIUM",
                "poolAddress":"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
                "inToken":"SOL",
                "inTokenAddress":"So11111111111111111111111111111111111111112",
                "outToken":"USDC",
                "outTokenAddress":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "inAmount":"58256161512",
                "outAmountMin":"817440697",
                "sourceAccount":"AeyzRpmQy2TLEEHYfojeYvthLcNkRSkJTFLPzDg63f6",
                "destinationAccount":"B5jZaSWQshYoZAdJxUxAyAU8MkDE1SofbGu4TdVKf4Kn",
                "ownerAccount":"9PxshGxpm7XKUrVFFGfkp2ngP8wFxSuKpzpU3xSpC9TV",
                "signature":"3R4JqcvpgtURkzmZg9D6gsXveAwzS7ybqNWNYyNHEGvDm2a6A6yD9prU9uTd9G4oJkRTA6CCYZJaFq411MMhL2Dv"
            }
        }
    },
    "jsonrpc":"2.0"
}
PreviousGetPoolReservesStreamNextGetNewRaydiumPoolsStream

Last updated 4 months ago