Subscribe

Open a filtered Yellowstone gRPC stream.

Open one stream, describe what you care about with filters, and react to updates as they happen.

Example

subscribe.ts
const stream = await rpcedge.subscribe({
  source: "geyser",
  accounts: { amm: { owner: [RAYDIUM_AMM] } },
  transactions: { swaps: { accountInclude: [RAYDIUM_AMM] } },
  commitment: "processed",
});
 
for await (const update of stream) {
  strategy.onUpdate(update); // pushed, not polled
}

Filters

Filtering happens server-side, so you only receive what is relevant. Filter accounts by owner program or key, and transactions by account inclusion.