TriportRPC

logsSubscribe

Last updated:

Parameters

This method takes no parameters.

Returns

logsSubscribe return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"logsSubscribe","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "logsSubscribe",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"logsSubscribe","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 logsSubscribe do?
logsSubscribe streams transaction log notifications matching a filter (all transactions, or only those mentioning a given account).
How many credits does logsSubscribe cost?
logsSubscribe costs 1 credit(s) per call on Triport by default.
Is logsSubscribe available over WebSocket?
Yes, logsSubscribe supports WebSocket.