WebSocket API Reference
Real-time streaming API for Solana transactions
WebSocket API
Real-time streaming data for Solana transactions with low latency and high throughput.
Real-time Transaction Streaming
Stream Solana transactions in real-time with minimal delay. Perfect for monitoring wallets, tracking token transfers, and building responsive applications.
Heartbeat & Connection Management
Built-in ping/pong heartbeat mechanism ensures reliable connections. Automatic reconnection and connection health monitoring included.
Authentication & Security
Secure API key-based authentication. All connections are secured and rate-limited to ensure fair usage and system stability.
Flexible Data Format
Structured JSON data with comprehensive transaction details including signatures, amounts, accounts, and metadata for easy processing.
Connection Details
ws://solana-mainnet-api-vip.lyslabs.ai:8080
Message Types
subscription
Confirmation of successful subscription to transaction stream.
{ "type": "subscription", "status": "success" }
transaction
Individual transaction data with comprehensive details.
{
"type": "transaction",
"data": {
"txSignature": "5xG...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"eventType": "TRANSFER",
"decoderType": "SPL_TOKEN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourceAccount": "7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"sourceOwner": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"destinationAccount": "J6QN6yzGfvGgJVQHfP7VTNf6i2gTgtJfYXMYrKXLmqQs",
"destinationOwner": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000",
"uiAmount": {
"value": "1.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
transactions
Batch of multiple transactions for efficiency.
{
"type": "transactions",
"data": [
{
"txSignature": "5xG...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"eventType": "TRANSFER",
"decoderType": "SPL_TOKEN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
},
{
"txSignature": "3zB...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "11111111111111111111111111111111",
"eventType": "TRANSFER",
"decoderType": "SYSTEM_PROGRAM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
]
}
block
Complete block data including all transactions and metadata.
{
"type": "block",
"data": {
"slot": "123456789",
"blockhash": "H4ATKcfMvSpGpR1P2HRqvZ5pjS7zLMH5sQPvLhJGzLHb",
"blockTime": {
"timestamp": "1234567890"
},
"blockHeight": {
"blockHeight": "123456789"
},
"parentSlot": "123456788",
"parentBlockhash": "5M1iqGGY7gKNkLNMB4oaLJzJf9VLvQs1EM3AqhzFZzEm",
"executedTransactionCount": "42",
"transactions": [
{
"signature": "5xG...",
"isVote": false,
"transaction": {
"signatures": ["5xG..."],
"message": {
"header": {
"numRequiredSignatures": 1,
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 3
},
"accountKeys": [
"Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"J6QN6yzGfvGgJVQHfP7VTNf6i2gTgtJfYXMYrKXLmqQs",
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
],
"recentBlockhash": "H4ATKcfMvSpGpR1P2HRqvZ5pjS7zLMH5sQPvLhJGzLHb",
"instructions": [
{
"programIdIndex": 3,
"accounts": "010203",
"data": "0200000064000000"
}
],
"versioned": false,
"addressTableLookups": []
}
},
"meta": {
"err": null,
"fee": "5000",
"preBalances": ["10000000000", "10000000", "5000000"],
"postBalances": ["9999995000", "9000000", "6000000"],
"innerInstructions": [],
"innerInstructionsNone": false,
"logMessages": [
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke",
"Program log: Transfer 1 token",
"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success"
],
"logMessagesNone": false,
"preTokenBalances": [],
"postTokenBalances": [],
"rewards": [],
"loadedWritableAddresses": [],
"loadedReadonlyAddresses": [],
"returnDataNone": true,
"computeUnitsConsumed": "200000"
},
"index": "0"
}
]
}
}
info
Server information and status messages.
{
"type": "info",
"message": "Connected to Solana mainnet"
}
error
Error messages and troubleshooting information.
{
"type": "error",
"message": "Rate limit exceeded",
"code": "RATE_LIMIT"
}
Supported Decoder Types
The WebSocket API supports decoding transactions for the following protocols:
Token transfers, mints, burns
SOL transfers, account creation
Automated Market Maker operations
Concentrated Liquidity Market Maker
Constant Product Market Maker
Dynamic Automated Market Maker
Dynamic Automated Market Maker V2
Dynamic Bonding Curve
Dynamic Liquidity Market Maker
Pump Fun protocol
Pump Fun AMM operations
LaunchLab protocol
Boop Fun protocol
Detailed Event Examples
Below are examples of decoded events for different transaction types.
SPL Token Events
Token Transfer
A token transfer between two accounts.
{
"type": "transaction",
"data": {
"txSignature": "5xG...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"eventType": "TRANSFER",
"decoderType": "SPL_TOKEN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourceAccount": "7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"sourceOwner": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"destinationAccount": "J6QN6yzGfvGgJVQHfP7VTNf6i2gTgtJfYXMYrKXLmqQs",
"destinationOwner": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000",
"uiAmount": {
"value": "1.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourcePreAmount": "10000000",
"sourcePreUiAmount": {
"value": "10.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourcePostAmount": "9000000",
"sourcePostUiAmount": {
"value": "9.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"destinationPreAmount": "5000000",
"destinationPreUiAmount": {
"value": "5.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"destinationPostAmount": "6000000",
"destinationPostUiAmount": {
"value": "6.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
Token Mint
Minting new tokens to an account.
{
"type": "transaction",
"data": {
"txSignature": "2xM...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"eventType": "MINT",
"decoderType": "SPL_TOKEN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"destinationAccount": "J6QN6yzGfvGgJVQHfP7VTNf6i2gTgtJfYXMYrKXLmqQs",
"destinationOwner": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"amount": "5000000",
"uiAmount": {
"value": "5.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"destinationPreAmount": "1000000",
"destinationPreUiAmount": {
"value": "1.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"destinationPostAmount": "6000000",
"destinationPostUiAmount": {
"value": "6.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
Token Burn
Burning tokens from an account.
{
"type": "transaction",
"data": {
"txSignature": "3zB...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"eventType": "BURN",
"decoderType": "SPL_TOKEN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"sourceAccount": "7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"sourceOwner": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"amount": "2000000",
"uiAmount": {
"value": "2.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourcePreAmount": "10000000",
"sourcePreUiAmount": {
"value": "10.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"sourcePostAmount": "8000000",
"sourcePostUiAmount": {
"value": "8.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
System Program Events
SOL Transfer
A native SOL transfer between accounts.
{
"type": "transaction",
"data": {
"txSignature": "4yS...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "11111111111111111111111111111111",
"eventType": "TRANSFER",
"decoderType": "SYSTEM_PROGRAM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"fromAccount": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"toAccount": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"amount": "1000000000",
"uiAmount": {
"value": "1.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"fromPreBalance": "10000000000",
"fromPreUiBalance": {
"value": "10.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"fromPostBalance": "8995000000",
"fromPostUiBalance": {
"value": "8.99500",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"toPreBalance": "5000000000",
"toPreUiBalance": {
"value": "5.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"toPostBalance": "6000000000",
"toPostUiBalance": {
"value": "6.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
Raydium Events
Raydium AMM Swap
A token swap on Raydium AMM.
{
"type": "transaction",
"data": {
"txSignature": "5Rz...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
"eventType": "SWAP",
"decoderType": "RAYDIUM_AMM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"amm": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
"tokenInMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"tokenOutMint": "So11111111111111111111111111111111111111112",
"tokenInAmount": "100000000",
"tokenInUiAmount": {
"value": "100.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"tokenOutAmount": "25000000000",
"tokenOutUiAmount": {
"value": "25.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"userTokenInAccount": "7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"userTokenOutAccount": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"userAuthority": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN"
}
}
Raydium CLMM Add Liquidity
Adding liquidity to a Raydium CLMM pool.
{
"type": "transaction",
"data": {
"txSignature": "3Jk...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "7quA6MBdYNbS9pPcqbCKC7Ge4XfyBnNzgT5cQXJNVMbF",
"eventType": "ADD_LIQUIDITY",
"decoderType": "RAYDIUM_CLMM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"poolId": "61R1ndXxvsWXXkWSyNkCxnzwd3zUNB8Q2ibmkiLPC8ht",
"tokenA": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"tokenB": "So11111111111111111111111111111111111111112",
"tokenAAmount": "50000000",
"tokenAUiAmount": {
"value": "50.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"tokenBAmount": "10000000000",
"tokenBUiAmount": {
"value": "10.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"liquidity": "1234567890",
"lowerTick": "-10000",
"upperTick": "10000",
"owner": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN"
}
}
Meteora Events
Meteora DAMM Swap
A token swap on Meteora DAMM.
{
"type": "transaction",
"data": {
"txSignature": "2Yz...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "dAMM3isQyZzGYvWYqUWM8aC5yVkBVKNBDJcZYZNZRiR",
"eventType": "SWAP",
"decoderType": "METEORA_DAMM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"pool": "8JUjWjAyXTMB4ZXcV7nk3p6Gg1fWAAoSck4b4AwrKAqt",
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outputMint": "So11111111111111111111111111111111111111112",
"inputAmount": "75000000",
"inputUiAmount": {
"value": "75.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"outputAmount": "15000000000",
"outputUiAmount": {
"value": "15.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"inputTokenAccount": "7RCz8wb6WXxUhAigry8PmjtiD2RS3tEyMqXrwAPMUQy3",
"outputTokenAccount": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"authority": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN"
}
}
Meteora DLMM Add Position
Adding a position to a Meteora DLMM pool.
{
"type": "transaction",
"data": {
"txSignature": "4Xp...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "dLMMatey9Nw3R4aPaPMBZ4zBPEK5L9oka9Yc2NkjMPz",
"eventType": "ADD_POSITION",
"decoderType": "METEORA_DLMM",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"pool": "9JUjWjAyXTMB4ZXcV7nk3p6Gg1fWAAoSck4b4AwrKAqt",
"tokenA": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"tokenB": "So11111111111111111111111111111111111111112",
"tokenAAmount": "60000000",
"tokenAUiAmount": {
"value": "60.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"tokenBAmount": "12000000000",
"tokenBUiAmount": {
"value": "12.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"lowerBound": "4500000",
"upperBound": "5500000",
"owner": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"positionId": "7"
}
}
Pump Fun Events
Pump Fun Buy
A buy transaction on Pump Fun.
{
"type": "transaction",
"data": {
"txSignature": "3Ks...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "PFDNYqYvHQpZMGVi5uQkGKqvSYZ9Pv5HB3qBzP82hk1",
"eventType": "BUY",
"decoderType": "PUMP_FUN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"subject": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"buyer": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"amount": "1000000000",
"uiAmount": {
"value": "1.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"supply": "10000000000",
"supplyUi": {
"value": "10.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"buyPrice": "2500000000",
"buyPriceUi": {
"value": "2.5",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"protocolFee": "125000000",
"protocolFeeUi": {
"value": "0.125",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"subjectFee": "125000000",
"subjectFeeUi": {
"value": "0.125",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
}
}
}
LaunchLab Events
LaunchLab Create Token
Creating a new token on LaunchLab.
{
"type": "transaction",
"data": {
"txSignature": "5Lp...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "LLapECMqaGQq1CKxhLqyoGKKFCkvmVBXXbKLLXUQNdZ",
"eventType": "CREATE_TOKEN",
"decoderType": "LAUNCHLAB",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"creator": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"name": "Example Token",
"symbol": "EXT",
"decimals": 9,
"initialSupply": "1000000000000",
"initialSupplyUi": {
"value": "1000.0",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"metadata": {
"website": "https://example.com",
"description": "An example token for demonstration"
}
}
}
Boop Fun Events
Boop Fun Boop
A boop action on Boop Fun.
{
"type": "transaction",
"data": {
"txSignature": "2Bp...",
"blockTime": 1234567890,
"blockHeight": 123456789,
"slot": 123456789,
"programId": "BoPFuNVvt5Kf4Y6Uf4yyNPM9wkXJTQQPd3hUvtSVZG9d",
"eventType": "BOOP",
"decoderType": "BOOP_FUN",
"txFee": 5000,
"txFeeUiAmount": {
"value": "0.000005",
"type": "PreciseDecimal",
"isCustomDecoderValue": true
},
"booper": "Ht7CkowEPZ5yHQpQQhzhgHqfy6LxhYYG4PAsZbMdaLXs",
"boopee": "2SsLFGMgWmTCJ9Cxe1qHbHpTcivas1VdNLYJaKT4GGqN",
"boopCount": 42,
"timestamp": 1234567890
}
}