voteSubscribe
Last updated:
voteSubscribe streams the raw consensus traffic of the cluster: every vote
transaction the serving node observes, pushed as a voteNotification the
moment it is seen in gossip — which can be before the vote is packed into a
block. Each notification identifies the voting validator (votePubkey), the
slots the vote covers, the bank hash being voted on, the vote
transaction's signature, and a timestamp when the validator attached one.
It takes no parameters and cannot be filtered server-side: you receive the
votes of every validator, which on mainnet means a sustained torrent of
frames (votes are the majority of all Solana transactions). Plan to filter
client-side by votePubkey and to consume the socket quickly.
The audience is consensus-layer tooling rather than typical dapps: validator
operators watching their own identity to confirm it is voting (and alerting
within seconds when it stops); staking platforms and monitoring services
computing real-time participation or delinquency ahead of what
getVoteAccounts polling can show; researchers measuring vote latency and
fork choice; and low-latency systems that estimate optimistic confirmation
themselves by accumulating voted stake per slot instead of waiting for the
node's own optimisticConfirmation signal.
Treat the method as best-effort. It is explicitly unstable in stock
Solana and only exists on nodes started with the vote-subscription flag —
Triport serves it on /ws/sol (gated to the pro tier), but the upstream
API may change between Solana releases and code using it will not port to
arbitrary RPC endpoints. The stream reflects gossip as one node hears it:
votes can arrive out of order, be duplicated, or belong to forks that later
die, so aggregate rather than trusting any single frame. There is no replay
after a reconnect — resubscribe and re-baseline from getVoteAccounts. Like
all subscriptions it is session-scoped; stop it with
voteUnsubscribe.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://triport.io/sol \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"voteSubscribe","params":[],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/sol", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "voteSubscribe",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/sol",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"voteSubscribe","params":[],"jsonrpc":"2.0"},
)
print(resp.json())Usage
- Transport: WebSocket.
- Networks: mainnet, devnet, testnet.
- Credit cost: 1 per call.
FAQ
- What does voteSubscribe do?
- Subscribes to vote transactions and streams every new vote the node observes in gossip, before the votes land in blocks.
- How many credits does voteSubscribe cost?
- voteSubscribe costs 1 credit(s) per call on Triport by default.
- Is voteSubscribe available over WebSocket?
- Yes, voteSubscribe supports WebSocket.