A blockchain data API transforms protocol-oriented records into application-oriented answers. A node can return blocks, transactions, receipts, state, and contract logs. A wallet or analytics product usually needs different objects: token transfers for an address, balances at a specific block, decoded events, protocol positions, or daily activity. The data API indexes and reshapes the first set into the second.
This page owns that transformation pipeline. For the broader distinction among node RPC, subscriptions, archive access, indexing, and transaction relay, read what a blockchain API is .
Raw node data is not an application data model
Ethereum JSON-RPC exposes protocol records and execution queries. A transaction receipt can contain status and logs; a log contains an emitting address, topics, and data; a block links transactions to a parent block. None of those records universally says, for example, customer received 25 units of token X or wallet balance is Y across all contracts.
An indexer adds interpretation. It selects records, decodes known formats, associates events with entities, applies network-specific rules, and stores results under a query schema. The Graph’s Subgraph model illustrates the pattern: a manifest selects contracts and events, mapping code converts event data into entities, and a GraphQL schema defines what consumers can query.
The resulting API is a derived view. Its correctness depends on source coverage, decoding logic, block ordering, reorganization handling, and the version of its schema.
Stage 1: ingest canonical chain records
An indexer begins from a known network and checkpoint. It reads blocks in order and stores at least the block height, block hash, parent hash, timestamp, and processing status. Depending on the workload, it also fetches transactions, receipts, logs, traces, account state, or contract calls.
The parent hash is essential. It lets the pipeline verify that the next block extends the history it has already processed. A height alone cannot distinguish two blocks that competed at the same position.
Graph Node describes three pipelined stages: fetching relevant events, processing them in order with handlers, and writing the resulting data to a store. Its documentation also describes a fork-aware ordered Firehose stream and notes that some indexing features require archive or trace-capable RPC endpoints. The exact infrastructure differs across products, but every indexer needs a defined source, order, and restart checkpoint.
A durable checkpoint records the last fully committed block, not merely the last block requested. After a crash, the pipeline should replay from a safe boundary without duplicating entities or skipping partially written records.
Stage 2: decode and normalize
Raw logs become useful only when their format is known. On EVM networks, an application can match the first event topic to an ABI event signature, decode indexed topics and data fields, and attach the emitting contract and transaction context. Traces can reveal internal calls that do not appear as top-level transactions, while receipts show execution outcome.
Normalization then gives the data a stable shape. A transfer record might include network ID, block and transaction hashes, log index, token contract, sender, recipient, raw integer amount, token decimals, and decoded display amount. The raw amount must remain available because decimals are metadata and can be missing, incorrect, or changed in an upstream catalog.
Cross-chain normalization needs stronger boundaries. The same address text or ticker can refer to different accounts or assets on different networks. A stable identity should include the network and, for tokens, the contract or native-asset identifier.
Provider schemas can also transform representation. Google Cloud’s documented Blockchain Analytics schemas separate blocks, transactions, receipts, logs, decoded events, token transfers, traces, and selected account-state records. Some documented EVM datasets normalize addresses to lowercase, so consumers must normalize query inputs consistently rather than assuming checksum casing is preserved.
Stage 3: derive balances and application entities
A transfer history is usually event-derived. A balance can be derived by summing all relevant debits and credits, read directly from chain state at a block, or served from a materialized snapshot. These methods can disagree when the event model is incomplete, a token changes balances without a standard transfer event, fees or rebases alter accounting, or the indexer missed history.
For that reason, a data API should disclose how each field is produced:
- Source field: copied from a block, transaction, receipt, log, trace, or state query.
- Decoded field: interpreted using an ABI, token standard, or protocol schema.
- Derived field: calculated from multiple records, such as a balance or volume.
- Enriched field: joined from offchain metadata, labels, prices, or identity data.
Higher-level entities might represent a wallet portfolio, liquidity position, bridge transfer, payment, or governance vote. They are convenient, but they embed methodology. Changes to mappings or aggregation rules should produce a versioned schema or documented reindex, not silently rewrite meaning.
Stage 4: survive reorganizations and replay
A recently observed block can be replaced by another valid branch. When the stored block hash no longer matches the node’s canonical history, the indexer must identify the common ancestor, reverse entities created or changed by removed blocks, and process the replacement branch.
Rollback design depends on the data model. Immutable event rows can be marked removed or deleted by block range. Mutable balances and positions need a prior version, reversible delta, or complete recomputation from a checkpoint. Aggregates need the same treatment as their source rows; reversing a transfer without reversing daily volume leaves inconsistent data.
Consumers should be able to distinguish observed, confirmed, and the network’s stronger finality state where one exists. An API that hides its indexed head and confirmation policy cannot tell a client how fresh or stable a result is.
Replay must be idempotent. A deterministic entity key often includes network, transaction hash, and log or trace position. Reprocessing the same canonical block should produce the same entities, while processing a replacement block should create a traceable new version.
Stage 5: serve queryable and traceable results
The query layer should expose more than a convenient JSON shape. Each material record should retain enough provenance to reach the chain source: network, block height and hash, transaction hash, log or trace position, and the indexer’s schema or methodology version.
Useful API semantics include:
- cursor pagination with stable ordering;
- filters that state whether bounds are inclusive;
- an
as ofblock or indexed-height field; - timestamps clearly identified as chain time, ingestion time, or update time;
- raw integer values plus decimals and display values;
- explicit nulls for unknown data rather than invented zeroes;
- lag and indexing-error status; and
- bulk export or backfill paths separate from latency-sensitive queries.
A response timestamp alone is not a freshness guarantee. The underlying indexer may be behind the chain head, an enrichment job may lag the core index, or one network may be stale while others remain current.
A data-quality checklist
Before using a blockchain data API for balances, payments, compliance, or reporting, test:
- Coverage: Which networks, address types, token standards, logs, traces, and historical ranges are actually indexed?
- Lineage: Can each derived record be traced to block, transaction, and event positions?
- Canonical handling: How are reorganizations detected, rolled back, and surfaced to clients?
- Completeness: How are gaps, skipped blocks, failed decodes, and indexing errors reported?
- Methodology: Are balance, transfer, volume, and position calculations documented and versioned?
- Normalization: Are chain IDs, contract IDs, decimals, casing, timestamps, and null values consistent?
- Freshness: Does every response expose an indexed block and observable lag?
- Recovery: Can consumers backfill a range after webhook or provider downtime?
- Verification: Can critical results be cross-checked against node RPC, a second provider, or a blockchain explorer ?
A blockchain data API is valuable because it converts low-level chain records into queryable business entities. That convenience also creates a responsibility: clients must understand which fields came directly from the protocol, which were decoded, which were derived, and how the service corrects them when the canonical chain or methodology changes.
Sources and references
- JSON-RPC API — ethereum.org; retrieved 2026-10-19.
- Subgraphs — The Graph; retrieved 2026-10-19.
- Graph Node — The Graph; retrieved 2026-10-19.
- Blockchain Analytics Dataset Schemas — Google Cloud; retrieved 2026-10-19.