TriportRPC

voteSubscribe

Last updated:

Parameters

This method takes no parameters.

Returns

voteSubscribe return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"voteSubscribe","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "voteSubscribe",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"voteSubscribe","params":[],"jsonrpc":"2.0"})
print(resp.json())

Usage

  1. Transport: WebSocket.
  2. Networks: mainnet, devnet, testnet.
  3. Credit cost: 1 per call.

FAQ

What does voteSubscribe do?
voteSubscribe streams a notification for every new vote observed in gossip (unstable; disabled by default on most validators).
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.