Providers
runicRPC supports multiple Solana RPC providers with easy configuration. This page covers all currently supported providers and how to configure them.
Supported Providers
| Provider | Status | HTTP | WebSocket | Config Type | Enhanced APIs |
|---|---|---|---|---|---|
| Helius | Full Support | Yes | Yes | API Key | DAS, Priority Fees |
| Alchemy | Full Support | Yes | Yes | API Key | Enhanced APIs |
| QuickNode | Full Support | Yes | Yes | Custom URL | - |
| Solana Public | Full Support | Yes | Yes | None | - |
| Triton | Full Support | Yes | Yes | API Key | - |
| GenesysGo | Full Support | Yes | Yes | Custom URL | - |
Quick Setup
The fastest way to configure providers is with environment variables:
# .env
HELIUS_API_KEY=your-helius-key
ALCHEMY_API_KEY=your-alchemy-key
import { RunicRPC } from '@runic-rpc/sdk';
// Auto-loads from .env
const rpc = RunicRPC.create();
Or use a config file (runic.config.json):
{
"providers": {
"helius": { "apiKey": "your-helius-key" },
"alchemy": { "apiKey": "your-alchemy-key" }
},
"strategy": "latency-based"
}
Helius
Helius provides high-performance Solana RPC infrastructure with enhanced APIs.
Configuration
import { RunicRPC, createHeliusEndpoint } from '@runic-rpc/sdk';
// Via providers config
const rpc = RunicRPC.create({
providers: {
helius: { apiKey: 'your-api-key' }
}
});
// Or create endpoint directly
const endpoint = createHeliusEndpoint('your-api-key');
Endpoints Generated
- HTTP:
https://mainnet.helius-rpc.com/?api-key=KEY - WebSocket:
wss://mainnet.helius-rpc.com/?api-key=KEY
Environment Variables
HELIUS_API_KEY=your-key
# Also supported:
NEXT_PUBLIC_HELIUS_API_KEY=your-key
VITE_HELIUS_API_KEY=your-key
Features
- Standard Solana JSON-RPC
- WebSocket subscriptions
- High throughput and low latency
- DAS API (Digital Asset Standard) - Fully supported with automatic routing
- Priority Fee Estimation - getPriorityFeeEstimate method
- Enhanced Transactions API - getAssetsByOwner, searchAssets, etc.
Alchemy
Alchemy offers enterprise-grade blockchain infrastructure.
Configuration
const rpc = RunicRPC.create({
providers: {
alchemy: { apiKey: 'your-api-key' }
}
});
Endpoints Generated
- HTTP:
https://solana-mainnet.g.alchemy.com/v2/KEY - WebSocket:
wss://solana-mainnet.g.alchemy.com/v2/KEY
Environment Variables
ALCHEMY_API_KEY=your-key
# Also supported:
NEXT_PUBLIC_ALCHEMY_API_KEY=your-key
VITE_ALCHEMY_API_KEY=your-key
Features
- Standard Solana JSON-RPC
- WebSocket subscriptions
- Enterprise reliability
- Enhanced APIs - Fully supported with automatic routing
- Token APIs - getTokenBalances, getTokenMetadata
QuickNode
QuickNode provides fast and reliable RPC endpoints.
Configuration
const rpc = RunicRPC.create({
providers: {
quicknode: {
rpcUrl: 'https://your-endpoint.quiknode.pro/token/',
wsUrl: 'wss://your-endpoint.quiknode.pro/token/'
}
}
});
Environment Variables
QUICKNODE_RPC_URL=https://your-endpoint.quiknode.pro/token/
QUICKNODE_WS_URL=wss://your-endpoint.quiknode.pro/token/
# Also supported:
QUICKNODE_HTTP_URL=https://your-endpoint.quiknode.pro/token/
Features
- Standard Solana JSON-RPC
- WebSocket subscriptions
- Global edge network
- Custom add-ons support
Solana Public RPC
Free public endpoints with rate limits. Use for development only.
Configuration
import { RunicRPC, createPublicEndpoint } from '@runic-rpc/sdk';
const rpc = RunicRPC.create({
endpoints: [createPublicEndpoint()]
});
Endpoints
- HTTP:
https://api.mainnet-beta.solana.com - WebSocket:
wss://api.mainnet-beta.solana.com
Warning: Public endpoints have aggressive rate limits and may be unreliable. Do not use in production.
Multiple Providers
Configure multiple providers for automatic failover and load balancing:
const rpc = RunicRPC.create({
providers: {
helius: { apiKey: 'helius-key' },
alchemy: { apiKey: 'alchemy-key' },
quicknode: {
rpcUrl: 'https://your-endpoint.quiknode.pro/token/',
wsUrl: 'wss://your-endpoint.quiknode.pro/token/'
}
},
strategy: 'latency-based', // Automatically route to fastest provider
});
How Routing Works
With multiple providers configured:
- Health checks monitor all endpoints continuously
- Circuit breakers detect failures and remove unhealthy endpoints
- Routing strategy selects the best available endpoint for each request
- Automatic failover happens when an endpoint fails
Custom Endpoints
Add any custom RPC endpoint:
const rpc = RunicRPC.create({
endpoints: [
{
name: 'my-custom-rpc',
rpcUrl: 'https://my-custom-rpc.com',
wsUrl: 'wss://my-custom-rpc.com',
weight: 2, // Higher weight = higher priority
rateLimit: 100 // requests per second
}
]
});
Provider Selection Strategy
| Strategy | Best For |
|---|---|
latency-based | Production apps (recommended) |
round-robin | Even distribution across providers |
weighted | Prioritizing specific providers |
random | Simple load balancing |
const rpc = RunicRPC.create({
providers: { /* ... */ },
strategy: 'latency-based' // Routes to fastest responding endpoint
});
Provider-Specific API Routing
runicRPC automatically routes provider-specific methods to the appropriate provider:
// These methods are automatically routed to Helius if configured
const assets = await rpc.request('getAssetsByOwner', [{ ownerAddress: 'wallet' }]);
const fees = await rpc.request('getPriorityFeeEstimate', [{ transaction: tx }]);
// Or explicitly route to a provider
const result = await rpc.requestToProvider('helius', 'getAsset', [{ id: 'asset-id' }]);
Provider-Specific Methods
| Provider | Methods |
|---|---|
| Helius | getAssetsByOwner, getAsset, searchAssets, getAssetBatch, getPriorityFeeEstimate |
| Alchemy | getTokenBalances, getTokenMetadata |
Coming Soon
Q2 2026
- Syndica - Enterprise Solana infrastructure
- Ankr - Decentralized RPC
- Chainstack - Managed blockchain services
See the roadmap for full details.