Skip to main content

Overview

OrbitFlare runs full archive nodes that retain every block, transaction, and account state since Solana launched. Standard RPC providers typically prune older data to save storage, keeping only recent epochs. With OrbitFlare, you can query any slot in Solana’s history.

Use Cases

Historical blockchain data enables several important workflows:
  • Event recovery: Backfill missed transactions after indexer downtime or webhook failures
  • Compliance: Retrieve transaction records for audits and regulatory requirements
  • Research: Analyze on-chain trends, token distributions, and protocol metrics over time
  • Explorer apps: Build block explorers and dashboards that display complete history

Relevant RPC Methods

These methods support historical queries on OrbitFlare’s archive nodes:

Block Methods

MethodDescription
getBlockRetrieve full block data for any slot
getBlocksGet a list of confirmed blocks between two slots
getBlocksWithLimitGet confirmed blocks starting from a slot with a limit
getBlockTimeGet the estimated Unix timestamp for a block
getBlockHeightGet the current block height
getFirstAvailableBlockGet the lowest slot with block data available

Transaction Methods

MethodDescription
getTransactionRetrieve a confirmed transaction by signature
getSignaturesForAddressGet transaction signatures for an address
getSignatureStatusesGet the status of transaction signatures

Account Methods

MethodDescription
getAccountInfoGet account data (current state only)
getMultipleAccountsGet data for multiple accounts in one call
getProgramAccountsGet all accounts owned by a program

Slot Methods

MethodDescription
getSlotGet the current slot
minimumLedgerSlotGet the lowest slot the node has data for

Examples

Retrieve a Block from History

Fetch block data for slot 100,000,000 using getBlock:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlock",
  "params": [
    100000000,
    {
      "encoding": "json",
      "transactionDetails": "full",
      "rewards": false,
      "maxSupportedTransactionVersion": 0
    }
  ]
}'

Get Block Timestamp

Find when a specific block was produced using getBlockTime:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockTime",
  "params": [100000000]
}'

List Blocks in a Range

Get all confirmed blocks between two slots using getBlocks:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocks",
  "params": [100000000, 100000100]
}'

Fetch a Transaction

Retrieve transaction details by signature using getTransaction:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransaction",
  "params": [
    "5wHu1qwD7q5menP8rgbzknAHruqg7rq1BwLNjmKnMwVH2VNhVvPLT6jGfKNLwKUTG4Xn2vRvDz5Q6Z8zCLN5gLp1",
    {
      "encoding": "json",
      "maxSupportedTransactionVersion": 0
    }
  ]
}'

Get Transaction History for an Address

Retrieve signatures for an address using getSignaturesForAddress:
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSignaturesForAddress",
  "params": [
    "Vote111111111111111111111111111111111111111",
    {"limit": 100}
  ]
}'

TypeScript Examples

Fetch Historical Block Data

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

const connection = new Connection('https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');

async function getHistoricalBlock(slot: number) {
  const block = await connection.getBlock(slot, {
    maxSupportedTransactionVersion: 0,
  });

  if (block) {
    console.log(`Block ${slot}:`);
    console.log(`  Transactions: ${block.transactions.length}`);
    console.log(`  Block time: ${block.blockTime}`);
    console.log(`  Parent slot: ${block.parentSlot}`);
  }

  return block;
}

// Fetch a block from early 2023
const block = await getHistoricalBlock(175000000);

Build Complete Transaction History

Combine getSignaturesForAddress with getTransaction to build a full history:
import { Connection, PublicKey } from '@solana/web3.js';

const connection = new Connection('https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');

async function getFullTransactionHistory(address: string) {
  const pubkey = new PublicKey(address);
  const allTransactions = [];
  let before: string | undefined;

  // Paginate through all signatures
  while (true) {
    const signatures = await connection.getSignaturesForAddress(pubkey, {
      limit: 1000,
      before,
    });

    if (signatures.length === 0) break;

    // Fetch full transaction data in batches
    for (let i = 0; i < signatures.length; i += 10) {
      const batch = signatures.slice(i, i + 10);
      const txs = await Promise.all(
        batch.map(sig =>
          connection.getTransaction(sig.signature, {
            maxSupportedTransactionVersion: 0,
          })
        )
      );
      allTransactions.push(...txs.filter(tx => tx !== null));
    }

    before = signatures[signatures.length - 1].signature;
  }

  return allTransactions;
}

Query Blocks in a Time Range

Find blocks within a specific time period:
async function getBlocksInTimeRange(startTime: number, endTime: number) {
  // Get a starting slot estimate
  const currentSlot = await connection.getSlot();
  const currentTime = Math.floor(Date.now() / 1000);

  // Solana produces ~2-3 blocks per second
  const slotsPerSecond = 2.5;
  const estimatedStartSlot = currentSlot - Math.floor((currentTime - startTime) * slotsPerSecond);

  const blocks = [];
  let slot = estimatedStartSlot;

  while (true) {
    const blockTime = await connection.getBlockTime(slot);

    if (blockTime && blockTime >= startTime && blockTime <= endTime) {
      const block = await connection.getBlock(slot, {
        maxSupportedTransactionVersion: 0,
      });
      if (block) blocks.push({ slot, block });
    }

    if (blockTime && blockTime > endTime) break;
    slot++;
  }

  return blocks;
}

Performance Tips

  1. Batch your requests: Use JSON-RPC batch requests to fetch multiple blocks or transactions in one call
  2. Paginate large queries: The getSignaturesForAddress method returns up to 1000 signatures per call—use the before parameter to paginate
  3. Parallelize carefully: Fetch transactions in parallel batches of 10-20 to balance speed and rate limits
  4. Cache immutable data: Historical blocks and transactions never change once confirmed—cache them locally
  5. Use maxSupportedTransactionVersion: Always include this parameter to handle versioned transactions

Limitations

Account state history: Solana nodes store current account state, not historical snapshots. You can retrieve transactions that modified an account, but not the account’s balance or data at a specific past slot. Rate limits: Historical queries may consume more resources. Check your plan’s rate limits and implement appropriate throttling.

Faster Transaction History

For efficient address history queries, use getTransactionsForAddress which combines signature lookup and transaction retrieval into a single call with filtering and sorting options.