Transaction Subscriptions
logsSubscribe
WebSocket - JSON-RPC
Subscribe to transaction logging to receive notifications with log output.
Parameters
string | objectrequiredFilter - one of:
"all"- all transactions except vote transactions"allWithVotes"- all transactions including vote transactions{ "mentions": ["<pubkey>"] }- transactions mentioning an address
objectConfiguration object:
commitment(string) - commitment level
Request
wscat -c wss://ws.sol.cubestech.online -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"logsSubscribe","params":[{"mentions":["11111111111111111111111111111111"]},{"commitment":"finalized"}]}{
"jsonrpc": "2.0",
"id": 1,
"method": "logsSubscribe",
"params": [
{
"mentions": ["11111111111111111111111111111111"]
},
{
"commitment": "finalized"
}
]
}Response
{
"jsonrpc": "2.0",
"result": 24040,
"id": 1
}Notification Format
result.valueobjectproperties
signaturestringerrobjectlogsarraylogsUnsubscribe
WebSocket - JSON-RPC
Cancel transaction logging notifications.
integerrequiredSubscription ID returned by logsSubscribe.
wscat -c wss://ws.sol.cubestech.online -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"logsUnsubscribe","params":[0]}{
"jsonrpc": "2.0",
"id": 1,
"method": "logsUnsubscribe",
"params": [0]
}{
"jsonrpc": "2.0",
"result": true,
"id": 1
}signatureSubscribe
WebSocket - JSON-RPC
Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level. The subscription is automatically cancelled after the notification is delivered.
Parameters
stringrequiredTransaction signature, base-58 encoded.
objectConfiguration object:
commitment(string) - commitment level (default:finalized)enableReceivedNotification(boolean) - receive notification when the transaction is received by the node
Request
wscat -c wss://ws.sol.cubestech.online -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"signatureSubscribe","params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",{"commitment":"finalized","enableReceivedNotification":false}]}{
"jsonrpc": "2.0",
"id": 1,
"method": "signatureSubscribe",
"params": [
"2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",
{
"commitment": "finalized",
"enableReceivedNotification": false
}
]
}Response
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}Notification Format
result.valueobjectproperties
errobjectThe subscription is automatically removed once the notification is sent. No need to call signatureUnsubscribe.
signatureUnsubscribe
WebSocket - JSON-RPC
Cancel signature confirmation notifications (if needed before delivery).
integerrequiredSubscription ID returned by signatureSubscribe.
wscat -c wss://ws.sol.cubestech.online -H "x-api-key: YOUR_API_KEY"
> {"jsonrpc":"2.0","id":1,"method":"signatureUnsubscribe","params":[0]}{
"jsonrpc": "2.0",
"id": 1,
"method": "signatureUnsubscribe",
"params": [0]
}{
"jsonrpc": "2.0",
"result": true,
"id": 1
}