Перейти до основного вмісту

Bitcoin RPC vs Indexed API: Choosing the Right Layer for Your Application

· 2 хв. читання
OverBlock Team
OverBlock Engineering

When you need Bitcoin data in your application, you have two fundamental options: query a node's JSON-RPC API directly, or use an indexed API built on top of the blockchain data.

What Bitcoin RPC provides​

The getblock, gettransaction, and getrawtransaction methods return exactly what the node has: raw block data, transaction bytes, and current UTXO state.

This is the source of truth. For consensus-level work, signature validation, or anything requiring the raw Bitcoin wire format, RPC is the right layer.

The limitations: no indexing by address, no fee calculations, no mempool state aggregation. Every query is point-in-time against the node's current state.

What indexed APIs provide​

Indexed APIs pre-process raw blockchain data into queryable, domain-specific formats:

  • Fee recommendations aggregated from multiple mempool snapshots
  • Block data delivered in order with reorg protection
  • (Coming soon) Address history, balance lookups, protocol events

The trade-off: you trust the indexer's correctness and work with their schema - not raw bytes.

The stack​

Your application
↑
Indexed APIs (fees, blocks, protocol data) ← OverBlock
↑
Nodes (Bitcoin Core, Erigon…)
↑
Blockchain

Decision framework​

Use caseApproach
Consensus client or validation toolRPC direct
Fetch a specific transaction by txidRPC direct
Backfill 880k blocks for an indexerStreaming API
Display fee recommendations in a walletIndexed API
Protocol-specific analyticsIndexed API

Most product teams need indexed APIs. Most protocol or infrastructure teams need raw RPC. Some need both.

→ OverBlock data apps cover the indexed API layer.