SolanaRPC.io provides a high-performance Solana RPC service with enhanced features for developers building on the Solana blockchain. Our service offers:
This documentation covers our complete API reference. If you need help or have questions, please contact our support team.
https://solanarpc.io/api/v1
https://solanarpc.io/api/v1/rpc
All API requests require authentication with an API key. You can obtain an API key from your dashboard.
There are two ways to provide your API key:
Include your API key in the X-API-Key
header:
X-API-Key: your-api-key-here
Alternatively, you can include your API key as a query parameter:
https://solanarpc.io/api/v1/rpc?api_key=your-api-key-here
Our service supports all standard Solana JSON-RPC methods. You can make requests to our RPC endpoint following the Solana JSON-RPC specification.
Standard Solana JSON-RPC endpoint
curl -X POST https://solanarpc.io/api/v1/rpc \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key-here" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"]
}'
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 151937866
},
"value": 2039280
},
"id": 1
}
Our RPC endpoint supports all standard Solana RPC methods, with enhanced features including direct gossip network connections and advanced caching. Methods include but are not limited to:
getAccountInfo
getBalance
getBlockHeight
getBlock
getBlockProduction
getMultipleAccounts
getProgramAccounts
getClusterNodes
getEpochInfo
getGenesisHash
getInflationReward
getLatestBlockhash
getTokenAccountBalance
getTokenAccountsByOwner
getSignatureStatuses
getSlot
getTransaction
sendTransaction
simulateTransaction
getRecentPerformanceSamples
getTokenLargestAccounts
Our "Super Hybrid" architecture provides direct connection to the Solana gossip network for real-time access to transactions and blocks, bypassing traditional RPC endpoints.
Automatic fallback across multiple endpoints ensures high availability and resilience against rate limits or endpoint failures.
Advanced caching system for frequently accessed blockchain data, dramatically reducing latency for common requests.
Direct transaction submission to validator TPUs for faster processing and reduced rejection rates.
Our enhanced endpoints provide additional functionality beyond the standard Solana RPC methods.
Get enhanced transaction details by signature
Get transactions for a specific account with enhanced data
Get details for a specific asset (NFT or token) by its ID
Search for assets with various filters
Get a compressed NFT by its asset ID
Search for compressed NFTs
Get information about a merkle tree
Verify a compressed NFT's merkle proof
Resolve a Solana address to a human-readable name
Resolve a name to a Solana address
Submit a transaction with priority
Submit a regular transaction
Get transaction status
Get priority fee estimates
Get information about a specific program
Get accounts owned by a specific program
Get decoded data for a specific program account
Webhooks allow you to receive real-time notifications about blockchain events. Configure webhooks to be notified when specific accounts change, transactions occur, or program activity happens.
Register a new webhook
Get all registered webhooks
Get a specific webhook by ID
Update a webhook
Delete a webhook
Test a webhook delivery
Type | Description | Required Triggers |
---|---|---|
account |
Triggered when an account changes | accountId , commitment (optional) |
transaction |
Triggered when a specific type of transaction occurs | transactionType (e.g., 'nft', 'token', 'vote', 'any') |
program |
Triggered when program activity occurs | programId |
curl -X POST https://solanarpc.io/api/v1/webhooks \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key-here" \
-d '{
"url": "https://your-server.com/webhook",
"type": "account",
"description": "Monitor USDC account",
"triggers": [{
"accountId": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"commitment": "confirmed"
}]
}'
Our analytics API provides valuable insights into network activity, transaction trends, token and NFT activity, and validator performance.
Get network overview statistics
Get transaction analytics for a given time period
Get token analytics including popular tokens and activity
Get NFT analytics including popular collections and activity
Get validator analytics and performance metrics
curl -X GET https://solanarpc.io/api/v1/analytics/network \
-H "X-API-Key: your-api-key-here"
Our WebSocket API provides real-time updates from the Solana blockchain. WebSocket subscriptions allow you to receive immediate notifications about new blocks, transactions, account changes, and more.
Connects directly to Solana's gossip network for the lowest possible latency. Receive data updates directly from validator nodes rather than through traditional RPC proxies.
Multiple connection points maintain service reliability. If a validator disconnects, subscriptions automatically failover to another node with zero interruption.
wss://solanarpc.io/api/v1/ws
WebSocket connections require an API key, provided as a query parameter in the WebSocket URL:
wss://solanarpc.io/api/v1/ws?api_key=your-api-key-here
Our WebSocket API supports all standard Solana WebSocket subscription methods with enhanced performance:
accountSubscribe
- Real-time account data updates (50-150ms latency)logsSubscribe
- Live transaction and program logs with advanced filteringprogramSubscribe
- Monitor all accounts owned by a program efficientlysignatureSubscribe
- Transaction confirmation notificationsslotSubscribe
- Real-time slot updates direct from the validator networkrootSubscribe
- Notifications when slots are finalizedMetric | Traditional RPC | SolanaRPC.io (Super Hybrid) |
---|---|---|
Slot Update Latency | 300-800ms | 50-150ms |
Transaction Notification | 500-1200ms | 150-300ms |
Connection Reliability | Single point of failure | Multi-endpoint redundancy |
Max Concurrent Subscriptions | 25-50 (typical) | 100+ (per connection) |
const ws = new WebSocket('wss://solanarpc.io/api/v1/ws?api_key=your-api-key-here');
ws.onopen = () => {
// Subscribe to account changes
const subscribeMsg = {
jsonrpc: '2.0',
id: 1,
method: 'accountSubscribe',
params: [
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC mint
{
commitment: 'confirmed',
encoding: 'jsonParsed'
}
]
};
ws.send(JSON.stringify(subscribeMsg));
};
ws.onmessage = (event) => {
const message = JSON.parse(event.data);
console.log('Received message:', message);
// Initial subscription confirmation
if (message.id === 1) {
console.log('Subscription successful, ID:', message.result);
}
// Account update notification
if (message.method === 'accountNotification') {
console.log('Account updated:', message.params);
}
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};
ws.onclose = (event) => {
console.log('WebSocket connection closed:', event.code, event.reason);
};
Our service is compatible with the official Solana Web3.js library. You can use it with minimal changes to your existing code.
import { Connection, PublicKey, clusterApiUrl } from '@solana/web3.js';
// Standard connection approach (with custom headers for API key)
// Replace 'your-api-key-here' with your actual API key
const connection = new Connection('https://solanarpc.io/api/v1/rpc', {
httpHeaders: { 'X-API-Key': 'your-api-key-here' },
commitment: 'confirmed'
});
// Example: Get account info
async function getAccountBalance(address) {
const publicKey = new PublicKey(address);
const balance = await connection.getBalance(publicKey);
console.log(`Balance: ${balance / 10**9} SOL`);
return balance;
}
// Example: Send a transaction
async function sendTransaction(transaction, signer) {
const signature = await connection.sendTransaction(transaction, [signer]);
console.log('Transaction sent with signature:', signature);
// Wait for confirmation
const confirmation = await connection.confirmTransaction(signature, 'confirmed');
console.log('Transaction confirmed:', confirmation);
return signature;
}
For our enhanced endpoints, you can use standard fetch or axios calls:
import axios from 'axios';
// Configure base Axios instance for SolanaRPC.io
const api = axios.create({
baseURL: 'https://solanarpc.io/api/v1',
headers: {
'X-API-Key': 'your-api-key-here'
}
});
// Get enhanced transaction data
async function getEnhancedTransaction(signature) {
try {
const response = await api.get(`/transactions/${signature}`);
return response.data;
} catch (error) {
console.error('Error fetching transaction:', error);
throw error;
}
}
// Get NFT data
async function getNftDetails(mintAddress) {
try {
const response = await api.get(`/das/assets/${mintAddress}`);
return response.data;
} catch (error) {
console.error('Error fetching NFT details:', error);
throw error;
}
}
API access is subject to rate limits based on your subscription plan. If you exceed your rate limits, requests will receive a 429 Too Many Requests
response.
Each API response includes the following headers to help you track your rate limit usage:
Header | Description |
---|---|
X-RateLimit-Limit |
Total requests allowed per day |
X-RateLimit-Remaining |
Remaining requests for the current day |
X-RateLimit-Reset |
Time in seconds until the rate limit resets |
You can check your current usage statistics in your dashboard. This includes: