Building a Blockchain Explorer for Stellar: Core Data You Need
A blockchain explorer is one of the most useful tools you can build for a network. For Stellar, the core data comes from five entity types: accounts, ledgers, transactions, assets, and operations. Here is how to query and display each one.
The Five Pillars
1. Accounts
Every Stellar account has a public key, balances, signers, and configuration:
GET /accounts/{accountId}Key fields to display:
2. Ledgers
Ledgers are Stellar's equivalent of blocks — they close every 5-6 seconds:
GET /ledgers?limit=10&order=desc
GET /ledgers/{sequence}Key fields to display:
3. Transactions
Each ledger contains transactions submitted by accounts:
GET /transactions?limit=20&order=desc
GET /transactions/{hash}
GET /transactions/{hash}/operationsKey fields to display:
4. Operations
Operations are the atomic units of work within transactions:
GET /operations?limit=20&order=desc
GET /accounts/{id}/operationsStellar has 25+ operation types. The most common:
payment — XLM or asset transfercreate_account — Fund a new accountchange_trust — Add or remove an asset trustlinemanage_sell_offer / manage_buy_offer — DEX tradinginvoke_host_function — Soroban smart contract calls5. Assets
Every non-XLM token on Stellar is an asset with a code and issuer:
GET /assets?limit=20&order=desc
GET /assets?asset_code=USDCKey fields to display:
Connecting the Data
An explorer lets users navigate between these entities:
Each Horizon response includes _links with HAL links to related resources, making navigation easy.
Pagination
All list endpoints use cursor-based pagination:
// First page
GET /transactions?limit=20&order=desc
// Next page (use _links.next.href from response)
GET /transactions?cursor=abc123&limit=20&order=descSearch
An explorer needs search. Common patterns:
/assets?asset_code={code}LumenQuery as Your Data Layer
Building an explorer from scratch means managing Horizon infrastructure. LumenQuery provides:
*Power your Stellar explorer with LumenQuery. Managed Horizon API with all the data you need — start free.*