wartnode.
Mainnet
DEVELOPERS

Explore the chain. Build with the data.

Free, read-only JSON access to Warthog mainnet and the DeFi testnet. No account or API key required.

Mainnet
/api/v1/mainnet
DeFi testnet
/api/v1/testnet

Make your first request

Use HTTPS on wartnode.com. Select a network in the reference below to try a GET request. Browser requests support CORS without credentials.

curl 'https://wartnode.com/api/v1/mainnet/blocks?limit=2'
const response = await fetch(
  'https://wartnode.com/api/v1/testnet/blocks?limit=2'
);
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data.items, body.meta.coverage);
// For the next page, pass body.data.nextCursor as cursor.
// Keep amounts in raw decimal strings; use BigInt for arithmetic.

Working with the API

  • Pagination: lists default to 25 items, maximum 100. Pass nextCursor back as cursor; a null cursor ends the list.
  • Address history: use /transactions?address=…. Address details require a checksummed 48-character address.
  • Portfolios: use /addresses/…/portfolio for WART, orders, and candidate tokens, then /addresses/…/portfolio/ASSET for token and LP balances. Portfolio observations refresh every 60 seconds. Discovery pages contain up to 20 tokens; coverage can be incomplete.
  • Activity exports: use /addresses/…/activity-export with optional type, asset, and Unix-second from/to filters (start inclusive, end exclusive). The JSON dataset contains at most 10,000 transactions from one database snapshot. Narrow the range on EXPORT_TOO_LARGE or EXPORT_TIMEOUT; retry CHAIN_CHANGED. CSV files and labels are handled locally by the website.
  • Precision: amounts contain raw, decimals, and formatted. Preserve raw strings; JavaScript numbers can lose precision.
  • Freshness: inspect meta.stale, source, and coverage. Incomplete indexing can mean incomplete results. Balances and orders also carry their own observation metadata.
  • Time: block and transaction timestamps use Unix seconds; observation times use ISO 8601. Metric buckets may encode Unix seconds as strings.
  • Limits: 5 requests/second per IP with burst 20, shared by both networks. A global limit also protects the site. On 429, wait at least the Retry-After seconds, then back off.
  • Errors: responses use error.code and error.message. On 409 CHAIN_RESET, discard cursors and restart pagination. A disabled network returns 503 NETWORK_DISABLED; overview and status report their disabled state.
  • Lightweight polling: use /status for chain head and index coverage without downloading history or charts. Address responses expose optional lookup failures in data.tokenBalanceError; candle responses include the requested Unix-second data.window.
  • Network features: tokens, markets, trades, and candles are available on testnet. These endpoints return 404 FEATURE_UNAVAILABLE on enabled mainnet.
  • Compatibility: normalized fields stay compatible within v1. Upstream raw payloads may vary with node versions. Testnet can reset.

Loading API reference…