Overview
Mirror Nodes expose historical protocol data via OpenAPI-compatible REST endpoints (Mirror Node REST API).
When to use this skill
- Constructing explorer-like views without running your own mirror.
- Paginating large responses via
links.next.
Prerequisites
- Base URLs from environment/setup references (
testnet,mainnethosts).
Workflow
Choose host — see references/mirror-endpoints.md.
Query accounts, transactions, tokens, contracts, topics — recipes in references/query-cookbook.md.
Implement pagination loop — follow references/pagination.md.
Use sample scripts: scripts/query-account-history.js, scripts/query-nft-ownership.js, scripts/query-contract-logs.js, scripts/simple-explorer.js.
Examples
Example 1
“List last 100 payments for account X.”
GET /api/v1/transactions?account.id=X&limit=100.
Example 2
“Who owns NFT serial 12?”
NFT endpoints (/tokens/{tokenId}/nfts/{serial}) plus ownership transfers.
Example 3
“Stream contract logs for USDC-like token.”
/api/v1/contracts/{id}/results/logs with timestamp constraints.
Troubleshooting
| Issue | Tip |
|---|---|
| Stale data | Mirror lag vs consensus — seconds normally |
| Rate limits | Backoff + caching |
References
- Local: references/mirror-endpoints.md, references/query-cookbook.md, references/pagination.md