TriportRPC

programSubscribe

Last updated:

Parameters

This method takes no parameters.

Returns

programSubscribe return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"programSubscribe","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "programSubscribe",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"programSubscribe","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 programSubscribe do?
programSubscribe pushes a notification whenever an account owned by the given program changes, with optional encoding and filters.
How many credits does programSubscribe cost?
programSubscribe costs 1 credit(s) per call on Triport by default.
Is programSubscribe available over WebSocket?
Yes, programSubscribe supports WebSocket.