▾ Documentation

gRPC examples

Copy-paste Yellowstone gRPC subscription code for accounts, transactions, and slots in TypeScript, Rust, Python, and grpcurl.

// updated 2026-06-04

Working code to connect to Supanode gRPC and subscribe to streams.

Prerequisites

  • A Supanode account on a plan with gRPC (FOCUS, BUILD, GROW, or PROFESSIONAL).
  • Your IPs registered in the allowlist via Telegram (gRPC uses IP allowlist authentication).
  • Your gRPC endpoint - default Frankfurt: fra.supanode.xyz:10013 for TLS or fra.supanode.xyz:10010 for plaintext.
  • Yellowstone gRPC client library for your language.

Don't have an account yet? Get a 48-hour free trial - contact us on Telegram: @supanode_tgs.

Test connection

Before writing code, verify your endpoint is reachable using grpcurl:

grpcurl fra.supanode.xyz:10013 geyser.Geyser/GetVersion

If you see a version number in the response, your connection works.

Basic subscribe example

Subscribes to all successful transactions involving a specific program. The Python example generates its stubs from the Yellowstone gRPC geyser.proto.

import Client, { CommitmentLevel, SubscribeRequest } from "@triton-one/yellowstone-grpc";

const client = new Client(
  "fra.supanode.xyz:10013",
  undefined,
  { "grpc.max_receive_message_length": 64 * 1024 * 1024 }
);

const stream = await client.subscribe();

const request: SubscribeRequest = {
  commitment: CommitmentLevel.CONFIRMED,
  accounts: {},
  slots: {},
  transactions: {
    myFilter: {
      vote: false,
      failed: false,
      accountInclude: ["YOUR_PROGRAM_ID"],
      accountExclude: [],
      accountRequired: [],
    },
  },
  transactionsStatus: {},
  blocks: {},
  blocksMeta: {},
  entry: {},
  accountsDataSlice: [],
};

stream.write(request);

stream.on("data", (data) => {
  if (data.transaction) {
    console.log(`Transaction: ${data.transaction.signature}`);
  }
});

Production tips

  1. Reconnection with exponential backoff. Network blips happen. Implement retry logic that starts at 1 second and backs off to 30 seconds. On 429 or 503 errors, always back off before retrying.

  2. Ping/pong for keepalive. Yellowstone server sends ping every 15 seconds. Most client libraries handle this automatically.

  3. Use accountsDataSlice to reduce bandwidth. If you only need part of an account's data, specify accountsDataSlice: [{offset: 0, length: 40}].

  4. Choose commitment level wisely. processed is fastest but can revert. confirmed is the practical default for trading. finalized adds ~13 seconds of latency.

  5. Handle stream restart gracefully. When your stream restarts, you'll miss events during downtime. Design your application to recover from this.

Where to go next

Limits
Connection caps and filter limits.
Restrictions
What's not supported on shared.
Free Trials
48-hour gRPC trial.
Yellowstone examples
More examples on GitHub.