Sub topic 4
Where the Data Comes From: Nodes, Explorers, and Analytics APIs
Assume you understand what a blockchain, wallet address, and transaction are. You should also know that Bitcoin commonly uses the UTXO model, while Ethereum commonly uses account balances and contract events. This chapter explains how raw blockchain records become data for exchange-flow and holder analysis.
Nodes: the primary source
A node is software that stores and validates blockchain data. It connects to other nodes, checks transactions against the protocol rules, and keeps a local copy of some or all of the chain.
You can query a node through an RPC, or remote procedure call, interface. An RPC is a structured request that asks the node for specific information, such as:
- A block by its number or hash
- Transactions in a block
- The balance at an address
- Logs emitted by a smart contract
- The current chain tip
A full node usually stores enough data to validate the current chain. An archive node stores additional historical state, such as an address balance at an old block. Archive nodes require more storage and are more expensive to operate or rent.
For exchange-flow analysis, nodes provide data close to the source. You can independently choose the block range, token contract, and filtering rules. However, raw node data requires substantial processing. You must decode transactions, handle reorganizations, remove duplicates, and maintain address labels separately.
Explorers: readable views of node data
A blockchain explorer is a website or API that reads blockchain data and presents it in a more convenient form. It may show an address balance, transaction history, token transfers, contract events, and known labels.
Explorers often add useful interpretation:
- Human-readable token names and symbols
- Links between transactions and addresses
- Labels such as exchange or bridge
- Decoded contract calls
- Pagination and search
This convenience can hide important details. An explorer may apply its own indexing rules, classify addresses using private research, or omit records that do not fit its interface. Its displayed balance might also represent only one asset or one chain.
Analytics APIs: prepared datasets
An analytics API is a service that collects blockchain data, indexes it, enriches it with labels, and exposes metrics through an API. It may provide exchange balances, entity-level flows, whale rankings, or historical time series.
| Source | Main strength | Main risk |
|---|---|---|
| Node RPC | Direct and customizable data | Processing and infrastructure work |
| Explorer API | Easy transaction lookup | Limited filters and provider-specific labels |
| Analytics API | Ready-to-use entities and metrics | Opaque methods and possible labeling errors |
Analytics APIs are useful when you need many chains, long history, or frequent monitoring. Before relying on a metric, check its definition. “Exchange inflow” might count transfers into labeled wallets, changes in known reserves, or an adjusted estimate. These are different measurements.
Querying token transfers
Many Ethereum tokens follow the ERC-20 standard. A transfer usually emits a Transfer event. The event includes the sender, recipient, and amount. The following JSON-RPC request asks a node for these events from one token contract over a small block range.
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x10d4f00",
"toBlock": "0x10d4f0a",
"address": "<TOKEN_CONTRACT_ADDRESS>",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}The topic is the keccak-256 hash of Transfer(address,address,uint256). The returned logs still need decoding. The indexed sender and recipient are stored as 32-byte hexadecimal values, and the amount uses the token's smallest unit. Divide by the token's decimal scale before presenting human-readable values.
Building a reliable data pipeline
A practical pipeline records the source, chain, block range, request time, and provider version. It should also store the raw response or a reproducible reference to it. For each result, distinguish observed facts from derived values:
- A node observed an event in a specific block.
- Your code decoded its addresses and amount.
- Your label database associated an address with an exchange.
- Your aggregation calculated an inflow or outflow.
This separation makes errors easier to find. A wrong exchange total may come from a missed event, a decoding bug, or an outdated label rather than from the blockchain itself.
Exercise
You need reproducible ERC-20 transfer data for a known token between two block numbers. Which source should you prefer, and what must you record?
Show answer
Prefer a node RPC or a raw-data provider that supports exact block-range queries. Record the chain, token contract, block range, event filter, request time, and decoding rules. Keep the provider and software versions so another analyst can repeat the query.