logsSubscribe

Subscribe to transaction log messages that match a log filter.

{
"jsonrpc": "2.0",
"id": 1,
"method": "logsSubscribe",
"params": [
{
"mentions": ["11111111111111111111111111111111"]
},
{
"commitment": "finalized"
}
]
}

params

string | objectrequired

Filter describing which transactions should emit log notifications.

  • all subscribes to all transactions except simple vote transactions
  • allWithVotes subscribes to all transactions, including simple vote transactions
  • { "mentions": [<pubkey>] } subscribes to transactions that mention a single base-58 encoded address

The mentions filter currently supports exactly one address. Listing more than one returns an Invalid params error.

objectoptional

Optional configuration object.

result

Response
{
"jsonrpc": "2.0",
"result": 24040,
"id": 1
}
integer

Subscription id. Pass this to logsUnsubscribe.

Notification format

Notifications are delivered as logsNotification.

{
"jsonrpc": "2.0",
"method": "logsNotification",
"params": {
"result": {
"context": {
"slot": 3557
},
"value": {
"signature": "67Viive4HpLJRPuYggAu3cbxZeQra5Y58oh4AmGc1YRXgQHevSwFbyxhBeDXw6rTCmUtHyCY7BjeHiHvhC9tud9U",
"err": null,
"logs": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
]
}
},
"subscription": 14
}
}
jsonrpc
string

Always "2.0".

method
string

Always "logsNotification".

params
object

Notification wrapper with the logs payload and the subscription id.

Is this page helpful?

Managed by

© 2026 Solana Foundation.
All rights reserved.
Get connected