1. Home
  2. Docs
  3. API documentation
  4. GET
  5. Emission by Coin

Emission by Coin

Retrieve annual inflation and underlying smoothed supply dates for a single coin, reported over rolling intervals at your chosen frequency.

Internally, the endpoint:

  • pulls daily smoothed supply from supply_api.php,
  • (optionally) applies an extra local trailing SMA,
  • computes an annual factor (YoY or since-genesis), smooths it,
  • then reports records aligned to each interval end (d, w, m, y).

Endpoint

GET /inflationbycoin.php

Subscription tiers & limits (via X-RapidAPI-Subscription)

TierAllowed frequenciesMax intervals returned
basicd, w, md: 30, w: 4, m: 1, y: 0
prod, w, m, yd: 365, w: 52, m: 12, y: 1
ultrad, w, m, yd: 1095, w: 156, m: 36, y: 3
megad, w, m, yunlimited

The response includes your resolved Tier. If the request’s Origin/Referer is the site, the tier is upgraded to mega.

Query parameters

NameTypeRequiredDefaultDescription
typestringYes*Coin id/symbol/name (case-insensitive). Matched via proxy.php. Examples: bitcoin, btc, pyth-network.
coinstringExact table/id override (alphanumeric, dash or underscore). If provided, it wins over type.
frequencystringNodOne of d, w, m, y. Must be allowed by your tier. Controls interval boundaries only.
window | supply_windowint(source default)Forwarded to supply_api.php as its centered SMA window for supply. 1 disables source smoothing.
sma | supply_trailing_windowint1Extra local trailing SMA on top of the source supply (1 = off). Zeros/≤0 ignored.
acw | annual_factor_windowint100Trailing SMA window for annual factor smoothing.

* One of type or coin is required. If both missing → 400.

What the endpoint computes

  • Supply source: supply_api.php?dataType=supply&frequency=d (daily keys). The source already applies a centered SMA (configurable via window; zeros are ignored).
  • Local supply smoothing: optional trailing SMA (sma) that ignores 0/≤0 values.
  • Annual factor per day:
    • if age < 365d: A_sm(t) / A_sm(genesis)Basis = "since_genesis"
    • else: A_sm(t) / A_sm(t−365)Basis = "yoy"
  • Factor smoothing: trailing SMA (inflation_window/acw).
  • Percent: (factor − 1) × 100.
  • Intervals: rolling windows by frequency (d/w/m/y), newest first, capped by tier.

Important: The interval record’s InflationPercent fields are timeframe (per-period) values, derived as annual % ÷ periods-per-year (365/52/12/1). The AnnualInflationPercent is the canonical annual % from the smoothed factor.

Response

Top level

FieldTypeDescription
Timestampstring (ISO 8601, UTC)Response generation time.
FrequencystringReporting frequency: d, w, m, or y.
supply_windowinteger | "default"Centered SMA window used by the source (or "default" if not overridden).
supply_trailing_windowintegerLocal trailing SMA window on supply.
inflation_windowintegerTrailing SMA window for annual factor.
TierstringResolved subscription tier.
CoinstringCoin display name (from proxy list, or id if unknown).
SymbolstringCoin symbol (if available).
IDstringCoin id/table name.
intervalsarrayInterval records (most recent first).

Each item in intervals

FieldTypeDescription
FromYYYY-MM-DDInterval start (context only).
ToYYYY-MM-DDInterval end (latest day of that period).
Basis"since_genesis" | "yoy"Annual basis used at To.
SupplyStartDateYYYY-MM-DDDate used for the denominator in the factor.
SupplyEndDateYYYY-MM-DDLatest supply date.
AnnualInflationPercentstring (decimal)Annual % from the smoothed factor.
InflationPercentRawstring (decimal)Timeframe % = raw annual % ÷ periods-per-year.
InflationPercentstring (decimal)Timeframe % = smoothed annual % ÷ periods-per-year.

Numeric formats: supplies to 8 dp (when present), factors (if present elsewhere) to 6 dp, percents to 4 dp.
Dates: UTC. Top-level Timestamp uses YYYY-MM-DDThh:mm:ssZ. Interval dates use YYYY-MM-DD.

Example requests

Daily (by id or name)

GET /inflationbycoin.php?type=bitcoin&frequency=d

Monthly, with extra local smoothing and wider factor window

GET /inflationbycoin.php?type=btc&frequency=m&sma=3&inflation_window=150

Using exact table id

GET /inflationbycoin.php?coin=binance-staked-sol&frequency=w

Example response (truncated)

{
  "Timestamp": "2025-07-17T23:18:57Z",
  "Frequency": "d",
  "supply_window": "default",
  "supply_trailing_window": 1,
  "inflation_window": 100,
  "Tier": "basic",
  "Coin": "Bitcoin",
  "Symbol": "btc",
  "ID": "bitcoin",
  "intervals": [
    {
      "From": "2025-06-20",
      "To": "2025-06-21",
      "Basis": "yoy",
      "SupplyStartDate": "2024-06-21",
      "SupplyEndDate": "2025-06-21",
      "AnnualInflationPercent": "1.0100",
      "InflationPercentRaw": "0.0028",
      "InflationPercent": "0.0028"
    }
  ]
}

Caching

File cache per coin/frequency/tier/parameters for 2 hours.

Errors

  • 400 — Missing type/coin, invalid coin format, or invalid frequency.
  • 403 — Access denied (origin/header checks) or frequency not allowed for your tier.
  • 404 — Coin not found in proxy list.
  • 500 — Proxy list or supply_api fetch failed; no positive supply; or no intervals computed.

Notes & gotchas

  • All dates are UTC.
  • frequency controls only reporting interval boundaries; the underlying series is daily from supply_api.
  • AnnualInflationPercent is the canonical annual %; InflationPercent fields are per-period (timeframe) values derived by simple division.

How can we help?