Subscribe to receive notifications when a new transaction containing a swap is confirmed on the solana chain that alters the price of any Supported pair with wrapped sol.
Notifications may arrive out of order.
It uses commitment
level confirmed which allows for a fast response
time with reasonable confidence on being included in the blockchain. See more about commitment levels here
Please note: Although unlikely, some events may be missed due to transient network issues or a swap on chain not following the conventional format.
Subscriptions to swaps are limited to 1 per connection.
DISCLAIMER: We cannot guarantee 100% accuracy and/or delivery of the data. Please do your own checks. SolanaStreaming is not responsible for any misuse or financial losses as a result of using this data.
All parameters can also be updated at a later time using the updateSubscriptionParams method.
includeFilterObjectarray(string)array(string)array(string)unsigned integerunsigned integerSubscribe to all swaps for a set of trading pairs.
{
"jsonrpc": "2.0",
"id": 1,
"method": "swapSubscribe",
"params": {
"include": {
"ammAccount": [
"58fzJMbX5PatnfJPqWWsqkVFPRKptkbb5r2vCw4Qq3z9",
"F59abNFXebqyMioXWgM4mXMw896wNtP9d4gSe4yo5wx3"
]
}
}
}
Subscribe to all swaps for a certian wallet account.
{
"jsonrpc": "2.0",
"id": 1,
"method": "swapSubscribe",
"params": {
"include": {
"walletAccount": [
"E1wid5KyTfkzxWDUmhxhJTKZqVRR4N6kyuTLXB5bPiU"
]
}
}
}
Subscribe to all swaps where the value is higher than 10,000 USD.
{
"jsonrpc": "2.0",
"id": 1,
"method": "swapSubscribe",
"params": {
"include": {
"usdValue": 10000
}
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"subscription_id": 1
}
}
These are the notifications you will receive when swapSubscribe is called successfully. Notifications do not typically conform to jsonrpc.
unsigned integerstringnewSwapObject
unsigned integerstringunsigned integerswapObject
stringraydium, pumpswap, pumpfun
stringbondingCurve account.
stringstringstringstring4.665456971e-06 which equates to 0.000004665456971
float64stringenumbuy, sell
string
{
"slot": 315256016,
"signature": "2BpJTsumysXzfX7BZS8u3o8xaZUdov3QGSijfB9asBfWowsRuvGwFY88FqaeWZzbywHobTE5uvDPzcV4LnaGdAbX",
"blockTime": 1737393555,
"swap": {
"ammAccount": "CDHWtKhraDWyp57B2bp7DM5DwHGiyRD8f6n5sKKR7VWo",
"baseTokenMint": "BwyMeGp9kqCQ7zYn1mEj5REkMFKZhRRHfCEJ8eqcmoon",
"quoteTokenMint": "So11111111111111111111111111111111111111112",
"walletAccount": "5S2fWgsbzqTTGVkUUrk83iH17h9T8C5ojYxhrDUWbg6L",
"quotePrice": "4.665456971e-06",
"usdValue": 466.04,
"baseAmount": "398674773250",
"swapType": "buy"
}
}