Introduction

SolanaRPC.io provides a high-performance Solana RPC service with enhanced features for developers building on the Solana blockchain. Our service offers:

  • Low-latency RPC nodes with 99.9% uptime guarantee
  • Enhanced transaction and account data
  • Real-time webhooks for blockchain events
  • Advanced analytics and program-specific indexing
  • Priority transaction processing
  • Compressed NFT support
  • WebSocket subscriptions for real-time updates

This documentation covers our complete API reference. If you need help or have questions, please contact our support team.

Base URL
Base URL
https://solanarpc.io/api/v1
Standard RPC URL
RPC Endpoint
https://solanarpc.io/api/v1/rpc

Authentication

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:

1. Request Header (Recommended)

Include your API key in the X-API-Key header:

Header Example
X-API-Key: your-api-key-here
2. Query Parameter

Alternatively, you can include your API key as a query parameter:

Query Parameter Example
https://solanarpc.io/api/v1/rpc?api_key=your-api-key-here
For security reasons, we recommend using the header approach rather than including your API key in the URL.

Standard RPC Methods

Our service supports all standard Solana JSON-RPC methods. You can make requests to our RPC endpoint following the Solana JSON-RPC specification.

POST /api/v1/rpc

Standard Solana JSON-RPC endpoint

Request Example
Request: getBalance
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"]
  }'
Response Example
Response
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 151937866
    },
    "value": 2039280
  },
  "id": 1
}
Available Methods

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
Enhanced Features
Direct Gossip Network

Our "Super Hybrid" architecture provides direct connection to the Solana gossip network for real-time access to transactions and blocks, bypassing traditional RPC endpoints.

Multi-Endpoint Fallback

Automatic fallback across multiple endpoints ensures high availability and resilience against rate limits or endpoint failures.

Intelligent Caching

Advanced caching system for frequently accessed blockchain data, dramatically reducing latency for common requests.

TPU Direct Submission

Direct transaction submission to validator TPUs for faster processing and reduced rejection rates.

Enhanced Endpoints

Our enhanced endpoints provide additional functionality beyond the standard Solana RPC methods.

Transaction Endpoints
GET /api/v1/transactions/:signature

Get enhanced transaction details by signature

GET /api/v1/transactions/accounts/:account

Get transactions for a specific account with enhanced data

NFT and Token Endpoints
GET /api/v1/das/assets/:assetId

Get details for a specific asset (NFT or token) by its ID

GET /api/v1/das/assets

Search for assets with various filters

Compressed NFT Endpoints
GET /api/v1/cnft/assets/:assetId

Get a compressed NFT by its asset ID

GET /api/v1/cnft/assets

Search for compressed NFTs

GET /api/v1/cnft/trees/:treeAddress

Get information about a merkle tree

POST /api/v1/cnft/verify

Verify a compressed NFT's merkle proof

Name Service Endpoints
GET /api/v1/names/address/:address

Resolve a Solana address to a human-readable name

GET /api/v1/names/resolve/:name

Resolve a name to a Solana address

Priority Transaction Endpoints
POST /api/v1/priority-tx/submit-priority

Submit a transaction with priority

POST /api/v1/priority-tx/submit

Submit a regular transaction

GET /api/v1/priority-tx/status/:txId

Get transaction status

GET /api/v1/priority-tx/fee-estimates

Get priority fee estimates

Program-Specific Endpoints
GET /api/v1/programs/:programId

Get information about a specific program

GET /api/v1/programs/:programId/accounts

Get accounts owned by a specific program

GET /api/v1/programs/:programId/accounts/:accountId

Get decoded data for a specific program account

Webhooks

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.

Webhook Endpoints
POST /api/v1/webhooks

Register a new webhook

GET /api/v1/webhooks

Get all registered webhooks

GET /api/v1/webhooks/:webhookId

Get a specific webhook by ID

PUT /api/v1/webhooks/:webhookId

Update a webhook

DELETE /api/v1/webhooks/:webhookId

Delete a webhook

POST /api/v1/webhooks/:webhookId/test

Test a webhook delivery

Webhook Types
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
Example: Register a Webhook
Register Account Webhook
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"
    }]
  }'

Analytics

Our analytics API provides valuable insights into network activity, transaction trends, token and NFT activity, and validator performance.

Analytics Endpoints
GET /api/v1/analytics/network

Get network overview statistics

GET /api/v1/analytics/transactions

Get transaction analytics for a given time period

GET /api/v1/analytics/tokens

Get token analytics including popular tokens and activity

GET /api/v1/analytics/nfts

Get NFT analytics including popular collections and activity

GET /api/v1/analytics/validators

Get validator analytics and performance metrics

Example: Network Analytics
Network Analytics Request
curl -X GET https://solanarpc.io/api/v1/analytics/network \
  -H "X-API-Key: your-api-key-here"

WebSocket API

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.

Super Hybrid Architecture: Our WebSocket service now features direct gossip network connection for near-instant data delivery with lower latency than traditional RPC providers.
Direct Gossip Integration

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.

High-Availability Design

Multiple connection points maintain service reliability. If a validator disconnects, subscriptions automatically failover to another node with zero interruption.

WebSocket Endpoint
WebSocket URL
wss://solanarpc.io/api/v1/ws
Authentication

WebSocket connections require an API key, provided as a query parameter in the WebSocket URL:

Authenticated WebSocket URL
wss://solanarpc.io/api/v1/ws?api_key=your-api-key-here
Subscription Methods

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 filtering
  • programSubscribe - Monitor all accounts owned by a program efficiently
  • signatureSubscribe - Transaction confirmation notifications
  • slotSubscribe - Real-time slot updates direct from the validator network
  • rootSubscribe - Notifications when slots are finalized
Performance Metrics
Metric 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)
Example: Account Subscription
JavaScript WebSocket Example
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);
};

SDK Integration

Our service is compatible with the official Solana Web3.js library. You can use it with minimal changes to your existing code.

JavaScript/TypeScript Integration
Solana Web3.js Integration
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;
}
Enhanced API Integration

For our enhanced endpoints, you can use standard fetch or axios calls:

Enhanced API Example
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;
  }
}

Rate Limits

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.

Rate Limit Headers

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
Usage Information

You can check your current usage statistics in your dashboard. This includes:

  • Current daily usage
  • Requests by endpoint
  • Success/error rates
  • Average response times
If you require higher rate limits for your application, please contact our support team to discuss plan upgrades or custom solutions.