TriportRPC

signatureSubscribe

Last updated:

signatureSubscribe watches a single transaction signature and pushes a signatureNotification the moment the transaction is processed at the commitment level you asked for. It is the push-based alternative to polling getSignatureStatuses in a loop after sendTransaction: submit, subscribe, and wait for one frame instead of hammering the HTTP endpoint.

The notification carries context.slot and a value object whose err field is null on success or a TransactionError object if the transaction failed on-chain — a failed transaction still confirms, so always inspect err rather than treating the notification itself as success. With enableReceivedNotification: true you additionally get an early frame with value set to the string "receivedSignature" when the node first sees the signature, useful for showing a "propagating…" state in a UI before the real confirmation lands.

The defining quirk: this subscription is one-shot. After the notification at the requested commitment fires, the server cancels the subscription automatically — you do not need to call signatureUnsubscribe afterwards, and attempting to will fail because the id is already gone. signatureUnsubscribe is only for abandoning a wait early (for example, when your blockhash expires and you are about to re-send).

Two gotchas. The signature must be the transaction's first signature (the fee payer's) as a base-58 string. And the subscription only sees what happens from now on: if the transaction already reached the requested commitment before you subscribed, no notification will ever arrive — pair the subscription with one getSignatureStatuses check to close that race, and put a deadline on the wait tied to blockhash expiry.

Parameters

This method takes no parameters.

Returns

signatureSubscribe return value
FieldType
resultobject

Examples

curl https://triport.io/sol \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"signatureSubscribe","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": "signatureSubscribe",
  "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":"signatureSubscribe","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 signatureSubscribe do?
Subscribes to a transaction signature and fires a one-shot notification when the transaction reaches the requested commitment level.
How many credits does signatureSubscribe cost?
signatureSubscribe costs 1 credit(s) per call on Triport by default.
Is signatureSubscribe available over WebSocket?
Yes, signatureSubscribe supports WebSocket.