Agora Public API

Getting started with Agora's API.

The endpoints exposed here are currently in Beta! As we continue to build our initial offering, these endpoints may implement breaking changes. Be sure to check back for our change log regularly as a precaution.

The Agora Public API exposes real-time data and operations for the Agora stablecoin platform. The current surface covers AUSD supply metrics across all supported chains.

Download OpenAPI spec

Base URL

All endpoints are served from https://api.agora.finance.

Authentication

The endpoints available today are public and require no authentication. Authenticated endpoints will be introduced as the surface expands.

Make your first request

Fetch the full per-chain AUSD supply breakdown:

$curl https://api.agora.finance/v0/metrics

Response (truncated — production returns one entry per supported chain):

1{
2 "chains": [
3 {
4 "chainId": "eip155:1",
5 "network": "ethereum",
6 "totalSupply": "500000000.000000",
7 "circulatingSupply": "400000000.000000"
8 }
9 ],
10 "totalSupply": "1234567890.123456",
11 "circulatingSupply": "987654321.654321",
12 "partial": false
13}

When one or more chains are temporarily unavailable, the response sets partial: true and the top-level aggregate fields are absent (the keys are not present, not null). See Response shape below for the full convention and a partial-state example.

If you only need the headline number, /v0/metrics/total-supply and /v0/metrics/circulating-supply return a plain-text decimal — useful when the per-chain breakdown isn’t needed:

$curl https://api.agora.finance/v0/metrics/total-supply
$# 1234567890.123456

Response shape

A few conventions worth knowing before you parse a response:

  • Supply values are decimal strings, not numbers. Every supply field — totalSupply, circulatingSupply, and the body of the plain-text endpoints — is a string like "987654321.654321". AUSD carries six decimals of precision; representing supply as a JSON number would silently truncate it. Parse with a decimal library (decimal.Decimal in Python, BigNumber.js in JavaScript, rust_decimal in Rust). This follows industry standard practice (Circle, Stripe).

  • chainId is a CAIP-2 identifier. Real values include eip155:1 (Ethereum), eip155:137 (Polygon), solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, and sui:mainnet. Use this for cross-referencing with DeFi Llama, CoinGecko, or on-chain data.

  • Aggregates may be omitted when chains are unavailable. If one or more chains can’t be reached, /v0/metrics returns partial: true and omits the top-level totalSupply / circulatingSupply rather than publishing a silently-truncated figure. The omitted fields are absent — the keys are not in the response, not set to null — so guard with 'totalSupply' in response, not response.totalSupply != null. The per-chain chains[] array still includes every chain that has a recent cached value. The full response schema is in the Endpoints reference.

    Partial response shape:

    1{
    2 "chains": [
    3 { "chainId": "eip155:1", "network": "ethereum", "totalSupply": "500000000.000000", "circulatingSupply": "400000000.000000" }
    4 ],
    5 "partial": true
    6}
  • Every response carries a Request-Id header. Capture it in your logs — it’s how Agora support traces a specific request end-to-end.

Errors and rate limits

Errors share a common JSON shape with a stable code, a human-readable message, and a link back to this docs site:

1{
2 "code": "not_found",
3 "message": "No matching route.",
4 "docs_url": "https://docs.agora.finance/api/errors"
5}

Triggered rate limits return 429 rate_limit_exceeded with a Retry-After header indicating how long to wait. See the Error Reference for the full code list and handling guidance.