Documentation

Everything you need to connect to Subglow filtered Solana gRPC streams. From API key to first filtered transaction in under 5 minutes.

Quickstart

// Step 1

Create an account

Sign up at subglow.io/signup. Your API key is generated instantly. Free tier includes 50M requests/month.

// Step 2

Choose your filters

In your dashboard, select which programs to stream: pump_fun, raydium, jupiter, or provide custom Program IDs (Pro tier).

// Step 3

Connect and trade

Point your gRPC client at grpc.subglow.io:443 with your API key in the x-api-key metadata header. You'll start receiving filtered transactions immediately.

Authentication

All requests require an API key passed as gRPC metadata. Your key determines your tier (Sniper, Pro, or Dedicated) and which filters are available.

gRPC metadata
x-api-key: your-api-key-here

API keys are 32-character alphanumeric strings. Never expose your key in client-side code or public repositories.

Filter Configuration

Filters determine which transactions reach your client. Filtering happens server-side before data leaves our infrastructure — reducing your bandwidth and CPU consumption.

Filter IDProgramEventsTier
pump_funPump.funbuy, sell, create, migrateAll
raydiumRaydium v5swap, add_liq, remove_liq, create_poolAll
jupiterJupiter v6swap, limit_order, dcaAll
customAny Program IDAll instructionsPro+

Node.js Example

index.js
const grpc = require("@grpc/grpc-js");
const protoLoader = require("@grpc/proto-loader");
const metadata = new grpc.Metadata();
metadata.add("x-api-key", "your-api-key");
const client = new Subglow(
"grpc.subglow.io:443",
grpc.credentials.createSsl()
);
const stream = client.Subscribe(
{ filters: ["pump_fun", "raydium"] },
metadata
);
stream.on("data", (tx) => {
console.log(tx.parsed);
});

Rust Example

main.rs
use subglow::{Client, Filter};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(
"grpc.subglow.io:443",
"your-api-key",
).await?;
let mut stream = client
.subscribe(&[Filter::PumpFun, Filter::Raydium])
.await?;
while let Some(tx) = stream.next().await {
println!("{:?}", tx?.parsed);
}
Ok(())
}

Python Example

main.py
import grpc
from subglow_pb2_grpc import SubglowStub
from subglow_pb2 import SubscribeRequest
channel = grpc.secure_channel(
"grpc.subglow.io:443",
grpc.ssl_channel_credentials()
)
stub = SubglowStub(channel)
metadata = [("x-api-key", "your-api-key")]
for tx in stub.Subscribe(
SubscribeRequest(filters=["pump_fun"]),
metadata=metadata
):
print(tx.parsed)

Output Schema

Every transaction arrives as a structured JSON object. The parsed field contains program-specific data with human-readable field names and native types (no base58/base64 encoded blobs).

Pump.fun buy event
{
"signature": "5K7x...",
"slot": 284391204,
"slot_lag_ms": 4,
"program": "pump_fun",
"type": "buy",
"parsed": {
"token": "7xKXtg...",
"sol_amount": 2.45,
"token_amount": 1284000,
"bonding_curve_pct": 34.2,
"buyer": "Gh9Z...",
"virtual_sol_reserves": 48.7
}
}

Error Codes

CodeStatusDescription
UNAUTHENTICATED401Missing or invalid API key
PERMISSION_DENIED403Filter not available on your tier
RESOURCE_EXHAUSTED429Rate limit exceeded (Sniper tier)
UNAVAILABLE503Upstream node temporarily unreachable
INTERNAL500Server error — retry with backoff

Rate Limits by Tier

TierConcurrent streamsFiltersDelivery
Sniper2pump_fun, raydium, jupiterStandard
Pro10All + custom Program IDsFull-speed
DedicatedUnlimitedAll + customFull-speed + SLA

WebSocket Fallback

For environments where gRPC is not available (browsers, serverless functions), we offer a WebSocket endpoint with the same filtered output.

WebSocket connection
wss://ws.subglow.io/v1?key=your-api-key&filter=pump_fun,raydium

WebSocket adds ~2-5ms latency compared to native gRPC. Use gRPC whenever possible for lowest latency.

Health Endpoint

Monitor our infrastructure's real-time slot lag versus the Solana network. Use this to verify data freshness and detect upstream issues.

GET https://api.subglow.io/health
{
"status": "healthy",
"slot_lag_ms": 4,
"current_slot": 284391208,
"upstream_slot": 284391212,
"active_streams": 142,
"region": "eu-west-1"
}