All Resources
Reduce Solana RPC Latency for Trading Bots
InfrastructureTypeScriptJune 2, 20263 min read

Reduce Solana RPC Latency for Trading Bots

Cut Solana trading latency with dedicated nodes, region placement, staked submission paths and faster event detection.

rpclatencydedicated-nodestrading-botsinfrastructure

Solana RPC latency is a trading variable

On Solana a new block is produced every ~400ms. For a trading bot, every millisecond of latency is the difference between front-of-line and joining the back of the queue. These are the levers that actually matter, from biggest to smallest impact.

1. Move off shared RPC

Shared endpoints share resources and rate limits with everyone. Under load your latency and error rate climb exactly when it's busy. A dedicated Solana node gives isolated resources and consistent latency, with no rate limits.

2. Pick the right region

Latency is partly just physics: distance. Place your node region close to your bot and close to the validators you interact with most. Co-location often beats any code optimization.

3. Use staked connections for transaction submission

A staked RPC path gets priority when forwarding transactions to the leader, improving your landing rate and speed versus a regular connection.

4. Detect events with Shredstream / gRPC

For detection (not submission), shred-level streaming delivers data earlier than regular RPC polling. Combine a dedicated node with Yellowstone gRPC for the lowest detection latency.

5. Split reads and writes

A common production pattern: one path for low-latency writes (transaction submission) and another for enriched reads (data API, streaming). This way you optimize each path separately instead of compromising.

import { Connection } from '@solana/web3.js';

const writeRpc = new Connection(DEDICATED_RPC_URL, 'processed');
const readApi = 'https://data.solanatracker.io';

6. Save credits with V2 methods

RidgeDB-powered V2 methods return the same data at up to 90% fewer credits, that doesn't lower latency directly, but lets you run higher request rates within budget.

FAQ

What has the biggest impact on latency?

Moving off shared RPC to a dedicated node, then choosing the right region. Those two together usually deliver the biggest win.

Do I need staked connections?

For latency-sensitive transaction submission (HFT, MEV, arbitrage) yes; for reads no.

Difference between reducing latency and landing transactions faster?

Latency is how fast your data/calls go back and forth; landing is how fast your transaction gets into a block. Both matter, see Solana Dedicated Nodes for staked submission paths.

Related: Yellowstone gRPC setup -> · Solana Dedicated Nodes

Download the example

Clone the full runnable project on GitHub, npm install && npm start with your keys in .env. Or open it in StackBlitz to run in your browser (free). See the tutorial for step-by-step context.

Runnable Node.js project — clone from GitHub, add keys to .env, then npm start. StackBlitz runs REST and Datastream examples in your browser for free.