Why Use the REST API
- Sub-second access to any dataset supported by the EVM API suite.
- Works behind outbound-only firewalls—no need to expose webhooks.
- Fine-grained filters reduce egress costs; pull only the chains, blocks, or pools you need.
Core Concepts
- Endpoints: Each dataset has a dedicated path (e.g.,
/evm/blocks,/evm/prices-spot-depth). All requests arePOST. - Pagination: Responses contain
cursorandcount. Pass thecursorfrom the previous response to request the next page. - Ordering: Use range filters (
range.from/range.to,_updated_atwindows, sequence numbers) to advance chronologically. - Authentication: OAuth 2.0 bearer tokens scoped to your entitlements. Rotate tokens per your security policy.
Example Poller
- Call the endpoint with
cursor=nullto seed the stream. - Persist the returned
cursorand latest_updated_at. - Re-run every few seconds/minutes; include
cursorto continue where you left off. - On failure, replay using the last committed cursor (idempotent).
Best Practices
- Backoff: Implement exponential backoff and respect rate limits documented in your contract.
- Schema evolution: Subscribe to Schema Governance so pollers can handle new fields gracefully.
- Verification: Periodically call Verification endpoints for sampled
_tracing_idvalues. - Upserts: Merge by dataset-specific key +
_tracing_idto avoid duplication.
Use separate pollers per dataset family (ledger, pricing, lineage) to prevent one noisy workload from blocking another.