WebSocket API Reference
Real-time streaming API for Solana transactions
Connection Details
WebSocket URL:
ws://solana-mainnet-api-vip.lyslabs.ai:8080Protocol: WebSocket (WSS for production)
Authentication: API Key via query parameter
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"
}
]
}
}Detailed Event Examples
Below are examples of decoded events for different transaction types.
SPL Token Events
System Program Events
Raydium Events
Meteora Events
Pump Fun Events
LaunchLab Events
Boop Fun Events
Last updated