Stream Swaps

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

Subscribe

Parameters:

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:

swap

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"
}

Last updated