Skip to content
Anon Wallet

Public APIs

Anon publishes a small set of public HTTP APIs. They are read-only JSON endpoints on https://api.anon.inc that anyone can call: wallets, dashboards, status pages and scripts. There is no API key and no account, and a browser on any website can read them.

Beta: every API on this page is in beta. Fields, values and the shape of a response may change without notice. Write your client to ignore unknown fields and values, and read each page's beta status and changelog.

The APIs

API Endpoint What it returns Cache Schema
RAILGUN liveness GET /api/v1/railgun/liveness Whether the Railgun services Anon depends on are responding and caught up, per chain, right now. 15 s in browsers, 30 s in shared caches JSON Schema
RAILGUN liveness history GET /api/v1/railgun/liveness/history The last 14 days of the same report in 5-minute buckets, with 24-hour, 7-day and 14-day uptime. 60 s in browsers, 120 s in shared caches JSON Schema

Use the live endpoint to decide what is true now, and the history for charts and status pages. Both show what Anon's own monitor sees. They are not official Railgun status and never a "safe to transact" signal.

curl -i https://api.anon.inc/api/v1/railgun/liveness
curl -i https://api.anon.inc/api/v1/railgun/liveness/history

What every public API has in common

Property Value
Base URL https://api.anon.inc
Authentication None
Methods GET and HEAD. OPTIONS answers CORS preflights. Any other method is 405.
Parameters None. Any query string is ignored.
Format JSON (application/json; charset=utf-8) with a schemaVersion field
Status Beta, with no notice period and no SLA
  • CORS. Every answer carries Access-Control-Allow-Origin: * and Access-Control-Expose-Headers: ETag, and never Access-Control-Allow-Credentials. A plain fetch needs no preflight.
  • Caching. Every 200 carries Cache-Control and an ETag. Send the ETag back in If-None-Match and an unchanged answer is a 304 with no body. The CDN keeps a separate copy for each Origin request header value.
  • Errors. Branch on the HTTP status code, never on the message text. An error from the API itself is {"error": "<message>"} with Cache-Control: no-store. A 503 means the data is not available right now: retry with backoff.
  • Rate limit. Above about 120 requests per minute from one IP, the CDN answers 429 (Cloudflare error 1015) for about 60 seconds. Cached hits count too. In a browser that 429 has no CORS header, so fetch fails with a network error instead.
  • JSON Schemas are permissive. They describe today's responses and are not a promise.

Fair use

  • Respect Cache-Control, and use ETag so an unchanged answer costs a 304.
  • Fetch when a user opens a screen that needs the data, rather than on a timer.
  • Servers that poll should send a descriptive User-Agent, for example my-wallet/1.4 (+https://example.com/contact).
  • If you serve many users, fetch from your own server and cache it there.
  • Back off on 429 and on 5xx, and keep showing the last good answer.

Other routes on api.anon.inc

Only the endpoints listed on this page are public APIs. Other routes on api.anon.inc serve Anon's own apps and websites. Some of them answer without a key, but they are not documented for other callers and may change, move or be restricted at any time. Do not build on them.