← All articles

Why Two Blockchain Data APIs Can Return Different Numbers

A blockchain data block feeding two stacks of different heights

You query two blockchain data APIs for the number of USDC transfers on Ethereum over the past hour. One returns 1,200 transfers. The other returns 1,080.

Why the numbers differ. Providers can serve data from different blocks, index different contracts, apply different filters, or calculate the same metric differently. If you’re investigating a mismatch, jump to the verification steps.

Understanding these differences is particularly important when building trading systems, payment applications, risk models, or analytics dashboards where inaccurate data can affect downstream decisions.

How blockchain data APIs work

Most blockchain data APIs sit on top of an indexing pipeline.

The indexer retrieves blocks, transactions, event logs, contract state, and sometimes execution traces. It processes that information into structured datasets that applications can query without repeatedly scanning the blockchain.

A typical pipeline looks like this:

Blockchain → RPC → Indexer → Database → Data API → Application

Along the way, the provider makes decisions about what to index, how to interpret contract activity, which records to include, and how to calculate derived metrics.

Two providers can start with the same blockchain data and produce different results because of these decisions.

Six reasons blockchain data APIs disagree

1. Different block heights

One of the first things to check is whether both providers have indexed up to the same block.

Suppose two APIs return the following results for a token's cumulative transfer count:

Metric API A API B
Latest indexed block 24,000,100 24,000,090
Total transfers 50,120 50,000

API B is ten blocks behind. If those ten blocks contain 120 transfers, the discrepancy is fully explained by indexing lag.

This can happen when providers have different indexing speeds, RPC infrastructure, caching policies, or confirmation requirements.

Query latency and data freshness should also be evaluated separately. An API returning a response in 10 ms may still be serving data that is several blocks old.

When comparing blockchain data, use the same block range or query both providers at the same historical block where supported. Check the block hash as well, particularly when working with recent, non-finalized data.

For Graph-compatible subgraphs, you can check indexing progress using:

{
  _meta {
    block {
      number
      hash
      timestamp
    }
    hasIndexingErrors
  }
}

2. Different metric definitions

Many commonly used blockchain metrics have no universal definition.

Consider a DEX transaction that swaps USDC for WETH through a router. The transaction may generate several ERC-20 Transfer events as tokens move between the user, router, and liquidity pools.

Should that count as one transaction, one trade, or several token transfers?

The answer depends on the metric being calculated.

For example, suppose a block range contains:

  • 1,200 USDC Transfer events
  • 120 zero-value transfer events
  • 940 unique transaction hashes associated with those events

Three APIs could report the following:

Methodology Result
Count every Transfer event 1,200
Exclude zero-value transfers 1,080
Count unique transactions containing transfers 940

All three results can be correct under their respective definitions.

The ERC-20 standard explicitly requires zero-value transfers to emit a Transfer event. Whether those events are meaningful to an application is a separate question.

Similar differences exist across other blockchain metrics:

Metric Potential differences in calculation
Active users Unique senders, recipients, wallets, or estimated users
Transaction count All transactions or successful transactions only
Transfer volume All transfers or transfers excluding mints, burns, and internal movements
DEX volume Individual pool swaps or complete routed trades
Token supply Total supply or estimated circulating supply
TVL Assets deposited, borrowed assets, nested positions, and pricing methodology
Stablecoin payments All token transfers or transfers classified as payments

Before comparing the numbers, check how each provider defines the metric.

3. Different data sources

Not every blockchain indexer processes the same types of data.

Some focus on smart contract events. Others also process transaction receipts, execution traces, contract calls, or historical state.

This affects what the API can return.

For example, an Ethereum transaction may trigger a series of internal contract calls that transfer ETH between addresses. Those movements do not necessarily produce ERC-20-style transfer events.

An event-based indexer may miss these movements, while a trace-based indexer can capture them.

Contract coverage matters as well. A provider reporting USDC activity might include only the official USDC contract, while another includes bridged representations of USDC.

The same issue applies to protocols that operate through multiple contracts, versions, factories, or proxy implementations.

When comparing APIs, check the underlying contract addresses, supported networks, and types of blockchain data being indexed.

4. Gaps in historical coverage

A provider can be fully synchronized with chain head and still have gaps in its historical dataset.

Possible causes include:

  • Indexing from a later start block
  • Missing contracts or event signatures
  • Incomplete historical backfills
  • Failed ingestion jobs or incorrect pagination
  • Mapping or event-decoding errors
  • Failure to account for contract upgrades

These issues can be difficult to detect because the API continues returning valid-looking responses.

Consider a lending protocol that upgraded its contracts two years ago. If an indexer only tracks the newer contracts, its historical deposit and withdrawal totals may exclude activity from the previous implementation.

Checking the latest indexed block will not reveal that problem. You need to examine historical coverage and reconcile the indexed records against the underlying chain data.

5. Blockchain reorganizations and finality

Recent blockchain data can change before it reaches finality.

One provider might expose transactions as soon as they appear in a new block. Another might wait for additional confirmations or only serve finalized data.

Their results can therefore differ even when both indexing systems are operating correctly.

If a blockchain reorganization occurs, an indexer must revert the records associated with the replaced blocks and process the canonical replacements. Any affected balances, positions, and aggregated metrics may also need to be recalculated.

A provider that fails to handle this correctly can retain transactions that no longer exist in the canonical chain.

We cover this in more detail in Blockchain Reorgs and Data Consistency: Why Your API Can Return Data That Later Disappears.

6. Data normalization and pricing

Some blockchain metrics require information beyond raw transactions and events.

For example, a Uniswap swap provides token amounts, but calculating its USD value requires a pricing methodology.

One provider might use the token's price at the time of the swap. Another might use an hourly average, a centralized exchange price, or an on-chain liquidity-weighted price.

Both providers could have indexed every swap correctly and still report different daily USD trading volumes.

Other sources of discrepancies include token decimal conversions, address labeling, rounding, time-zone boundaries, and the treatment of bridged assets.

For metrics such as TVL, trading volume, circulating supply, and wallet exposure, understanding the calculation is just as important as verifying the underlying blockchain records.

How to verify blockchain data accuracy

If two APIs return different numbers, start by reducing the comparison to something that can be independently reproduced.

Step 1: Match the query parameters

Make sure both APIs are using the same chain, contract addresses, block range, time boundaries, filters, and finality requirements.

If you're comparing hourly or daily activity, use the same UTC time window and agree on how the start and end boundaries are treated.

Step 2: Compare the underlying records

Instead of comparing only the total transfer count, retrieve the individual transfers from each provider. For EVM event logs, the chain ID, block hash, transaction hash, and log index can help identify corresponding records.

Find which events appear in one dataset but are absent from the other.

This helps narrow down whether the discrepancy comes from missing data, duplicate records, filtering, or different aggregation logic.

Step 3: Query the blockchain directly

For ERC-20 transfers, you can use Ethereum's eth_getLogs RPC method with the token contract address, a fixed block range, and the Transfer event signature.

For other types of data, use the appropriate RPC method:

Data to verify Verification method
ERC-20 transfers eth_getLogs
Token balances eth_call using balanceOf()
Total token supply eth_call using totalSupply()
Native token balances eth_getBalance
Transaction status and logs eth_getTransactionReceipt
Internal contract calls Transaction tracing
Contract state at a historical block Historical eth_call

Use a sufficiently finalized block where possible. For large log queries, divide the block range into smaller batches to avoid RPC limits and verify that every batch completed successfully.

Historical state verification may also require archive-capable RPC access.

Step 4: Reproduce the calculation

Once you've verified the underlying data, apply the same filters and aggregation logic used by the API.

If you're calculating transfer volume, for example, normalize token decimals, decide whether to include mint and burn events, and specify how duplicate records are handled.

If the metric involves USD values or address classifications, you'll also need the relevant pricing data or labeling methodology.

The objective is to establish whether the discrepancy comes from incomplete blockchain data or differences in how that data was processed.

When should you build your own indexed dataset?

Generic blockchain data APIs are convenient for common requirements such as balances, transfers, and transaction histories.

However, when a particular metric is central to your product or trading strategy, relying entirely on a provider's predefined calculation can become a limitation.

Subgraphs offer developers more control over what gets indexed and how the resulting dataset is constructed. You define the contracts, event handlers, schema, and mapping logic, making it easier to inspect how a particular metric was produced.

For example, a developer building a stablecoin analytics platform could explicitly define:

  • Which stablecoin contracts to track
  • How to handle mints and burns
  • Whether to exclude zero-value transfers
  • How to aggregate transfer volume
  • Which historical snapshots to maintain

This provides greater control over the resulting dataset without requiring the team to build and operate an entire indexing pipeline.

Subgraphs still depend on accurate mappings, reliable RPC infrastructure, correct historical coverage, and proper reorg handling. They also have limitations when working with complete execution traces or chain-wide transaction data.

What to look for in a blockchain data provider

When evaluating a blockchain data API or indexing service, look beyond chain coverage and response times.

  • Can you identify the block associated with a response?
  • Can you inspect the underlying records behind an aggregate?
  • Does the provider document how metrics are calculated?
  • How does the provider handle missing data, indexing failures, and reorganizations?

These capabilities make discrepancies easier to investigate and help developers determine whether the data is suitable for their application.

For financial applications and automated trading systems in particular, it is worth periodically reconciling critical metrics against an independent data source.

Technical references

About Ormi

Ormi is the next-generation data layer for Web3, purpose-built for real-time, high-throughput applications like DeFi, gaming, wallets, and on-chain infrastructure. Its hybrid architecture ensures sub-30ms latency and up to 4,000 RPS for live subgraph indexing.

With 99.9% uptime and deployments across ecosystems representing $50B+ in TVL and $100B+ in annual transaction volume, Ormi is trusted to power the most demanding production environments without throttling or delay.