Yellowstone gRPC

Use Yellowstone gRPC for filtered, low-latency Solana updates.

Install the TypeScript client

bash
npm install @triton-one/yellowstone-grpc

Pin the package version in your lockfile. Yellowstone request fields change between releases.

Subscribe to slots

Frankfurt (default)

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

const client = new Client(
  "geyser.sol.flashland.dev:443:443",
  process.env.NODE_API_KEY,
  { grpcMaxDecodingMessageSize: 64 * 1024 * 1024 },
)

await client.connect()
const stream = await client.subscribe()

stream.on("data", (update) => {
  if (update.slot) {
    console.log(update.slot.slot, update.slot.status)
  }
})

stream.on("error", (error) => {
  console.error(error)
})

stream.write({
  slots: {
    confirmedSlots: { filterByCommitment: true },
  },
  accounts: {},
  transactions: {},
  transactionsStatus: {},
  blocks: {},
  blocksMeta: {},
  entry: {},
  accountsDataSlice: [],
  commitment: CommitmentLevel.CONFIRMED,
})

New York

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

const client = new Client(
  "geyser.nyc.sol.flashland.dev:443:443",
  process.env.NODE_API_KEY,
  { grpcMaxDecodingMessageSize: 64 * 1024 * 1024 },
)

await client.connect()
const stream = await client.subscribe()

stream.on("data", (update) => {
  if (update.slot) {
    console.log(update.slot.slot, update.slot.status)
  }
})

stream.on("error", (error) => {
  console.error(error)
})

stream.write({
  slots: {
    confirmedSlots: { filterByCommitment: true },
  },
  accounts: {},
  transactions: {},
  transactionsStatus: {},
  blocks: {},
  blocksMeta: {},
  entry: {},
  accountsDataSlice: [],
  commitment: CommitmentLevel.CONFIRMED,
})

The SDK sends its token argument as x-token. The FlashLand gateway also accepts x-api-key metadata in raw gRPC clients.

Test with grpcurl

Yellowstone reflection is not available on every gateway connection. Download the Yellowstone proto and pass the local file.

Frankfurt (default)

bash
grpcurl \
  -H "x-api-key: YOUR_API_KEY" \
  -import-path ./proto \
  -proto geyser.proto \
  -d '{"commitment":"CONFIRMED"}' \
  geyser.sol.flashland.dev:443:443 \
  geyser.Geyser/GetSlot

New York

bash
grpcurl \
  -H "x-api-key: YOUR_API_KEY" \
  -import-path ./proto \
  -proto geyser.proto \
  -d '{"commitment":"CONFIRMED"}' \
  geyser.nyc.sol.flashland.dev:443:443 \
  geyser.Geyser/GetSlot
Yellowstone gRPC Nodes

See the production gRPC endpoint, filter coverage, payload limits, and pricing.

Client setup

Set up TypeScript, Python, Go, and Rust clients.

Keepalive and replay

Hold long-running streams and request recent slots.