Starkscan ExplorerStarkscanDocs
QuickstartBuildAgentsReference
Open explorer
Documentation homeQuickstartAuthenticationBase URLs and chainsConceptsGet your first API keyMonitor 10 WalletsPagination and cursorsRead a transactionYour first error
BuildLaunch MatrixPackage TrustAPIAdvanced UtilitiesAgent HTTP quickstartMigration skillsRate limitsRoute CertificationRoute examplesSelf-serve account routesSDKTypeScript SDK

Live reference

Interactive API referenceReference hub
AgentsAgent CLIBuild an agentConnect your agentMCP QuickstartMCP tools reference
Reference Hub
Docs/API/Rate limits

Rate limits

Understand Starkscan route-class budgets, headers, and the correct retry behavior for external API keys.

API referenceReferenceQuickstartTypeScript SDK

In this guide

Route classesHeaders to readRetry rulesExample `429`Operational noteBest practices for agents
Loading documentation content…
PreviousMigration skillsDownload source-backed SKILL.md artifacts for Voyager migration and accounting point-in-time balances.NextRoute CertificationHow Starkscan certifies REST routes, workflow evidence, and nightly correctness.

On this page

Route classesHeaders to readRetry rulesExample `429`Operational noteBest practices for agents
Starkscan ExplorerStarkscanDocumentation

One product surface across the explorer, HTTP API, CLI, SDK, and MCP transport. The docs should guide you into the right path instead of behaving like a separate app.

Open explorerAPI referenceBack to top

Rate limits

Starkscan rate-limits external API keys by route class.

Treat rate limits as part of the HTTP contract, not as a hidden operational detail.

Route classes

Current hosted external keys use two budget classes. The OpenAPI schema reserves additional fine-grained class names for self-hosted/internal deployments, but clients using Starkscan-issued API keys should back off on the class they actually receive in X-Starkscan-Route-Class.

ClassTypical useExample routes
lightcheap host/status and simple lookup readsGET /v1/{chain}/status, GET /v1/{chain}/block/{block_ref}, GET /v1/{chain}/tx/{tx_hash}
heavyindexed lists, wallet/profile reads, exact token reads, traces, search, contract reads, and batch helpersGET /v1/{chain}/token/{token}/balance-of/{address}, GET /v1/{chain}/token/{token}/total-supply, GET /v1/{chain}/address/{address}/transactions, GET /v1/{chain}/transfers?address={address}, GET /v1/{chain}/tx/{tx_hash}/trace, GET /v1/{chain}/search, GET /v1/{chain}/contract/{address}/read, POST /v1/{chain}/tx/previews

The exact numeric budget is deployment-controlled. Read the headers instead of hard-coding assumptions into clients.

For wallet/app Voyager migrations, treat the replacement set as:

Migration routeExpected hosted key class
GET /v1/{chain}/token/{token}/balance-of/{address}heavy
GET /v1/{chain}/tx/{tx_hash}light
GET /v1/{chain}/address/{address}/transactionsheavy
GET /v1/{chain}/transfers?address={address}heavy

Headers to read

Starkscan-issued API keys emit these budget headers on budgeted responses:

  • x-ratelimit-limit
  • x-ratelimit-remaining
  • x-ratelimit-policy
  • X-Starkscan-Route-Class

On 429 Too Many Requests, Starkscan also emits:

  • Retry-After

Example response headers:

x-ratelimit-limit: 30
x-ratelimit-remaining: 0
x-ratelimit-policy: heavy;w=60
X-Starkscan-Route-Class: heavy
retry-after: 12

Retry rules

  • On 429 Too Many Requests, stop and honor Retry-After.
  • Do not retry immediately in a tight loop.
  • Keep concurrency bounded even when x-ratelimit-remaining still looks healthy.
  • Prefer the smallest route set that answers the task.
  • Do not let a heavy 429 stop unrelated light probes; keep backoff state per route class.

Example 429

curl -i \
  -H "X-Starkscan-Api-Key: $STARKSCAN_API_KEY" \
  "$STARKSCAN_BASE_URL/v1/$STARKSCAN_CHAIN/contract/<address>/read?selector=<selector>"

Representative response:

HTTP/1.1 429 Too Many Requests
retry-after: 12
x-ratelimit-limit: 30
x-ratelimit-remaining: 0
x-ratelimit-policy: heavy;w=60
X-Starkscan-Route-Class: heavy
content-type: application/json; charset=utf-8

{"code":"rate_limited","message":"Rate limit exceeded; retry shortly","docSlug":"api/rate-limits","requestId":"mzk-..."}

Operational note

Current public-read rate limiting is process-local fixed-window state:

  • counters reset on process restart
  • each replica enforces its own independent window budget
  • boundary-adjacent bursts can briefly approach roughly double the minute budget

Do not build client correctness on an assumption that every host behaves like one perfectly global distributed limiter.

Best practices for agents

  • Use Agent HTTP quickstart as the bounded starter contract.
  • Back off by route class. A heavy 429 should not force an agent to stop cheap light status checks.
  • Log X-Request-Id on every failure.
  • Include rate-limit headers in issue reports when present.
  • Prefer cursor-based incremental reads over repeated full rescans.