HTTP RPC API
Interact with Solana nodes using JSON-RPC 2.0
Overview
OrbitFlare RPC nodes accept HTTP requests using the JSON-RPC 2.0 specification. This API allows you to interact with the Solana blockchain for querying data and submitting transactions.
Request Format
To make a JSON-RPC request, send an HTTP POST request with the following specifications:
- Endpoint:
https://rpc.orbitflare.com
- Header:
Content-Type: application/json
- Body: JSON object with these fields:
Field | Type | Description |
---|---|---|
jsonrpc | string | Must be “2.0” |
id | string/number | Unique request identifier |
method | string | The RPC method name |
params | array | Array of method parameters |
Example Request
Response Format
Responses will be JSON objects containing:
Field | Type | Description |
---|---|---|
jsonrpc | string | Always “2.0” |
id | string/number | Matches request identifier |
result | varies | The method’s result data |
error | object | Error details (if applicable) |
Commitment
Many methods accept a commitment
parameter to specify how confirmed the data should be:
processed
: Latest block (fastest, not confirmed)confirmed
: Confirmed by supermajority (balance between speed and finality)finalized
: Finalized by supermajority (slowest, fully confirmed)
Example with commitment:
Batch Requests
You can send multiple requests in a single HTTP call by providing an array of request objects:
Common Types
Type | Description |
---|---|
Pubkey | Base-58 encoded public key string |
Hash | Base-58 encoded SHA-256 hash string |
Signature | Base-58 encoded Ed25519 signature |
Slot | Integer block height/slot number |
Health Check
You can check node health with a GET request:
Possible responses:
ok
: Node is healthy and up-to-datebehind { slots: number }
: Node is behind by N slotserror
: Node is unhealthy
Available Methods
Account & Program
- getAccountInfo
- getMultipleAccounts
- getProgramAccounts
- getMinimumBalanceForRentExemption
Blocks & Slots
- getBlock
- getBlocks
- getBlockHeight
- getSlot
- getSlotLeader
Transactions
- getTransaction
- getSignatureStatuses
- getSignaturesForAddress
- sendTransaction
- simulateTransaction
Tokens
- getTokenAccountBalance
- getTokenAccountsByDelegate
- getTokenAccountsByOwner
- getTokenSupply
Rate Limits
Rate limits vary by subscription tier. Check your dashboard for your current limits and usage statistics.
Best Practices
-
Use Appropriate Commitment Levels
- Use
processed
for UI updates - Use
confirmed
for most operations - Use
finalized
for critical operations
- Use
-
Optimize Requests
- Use batch requests when possible
- Implement proper caching
- Choose appropriate polling intervals
-
Handle Errors
- Implement proper error handling
- Use exponential backoff for retries
- Monitor request failures
Support
For technical support or questions about our RPC service:
- Join our Discord community
- Check our status page
- Contact our support team