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)
| Tier | Allowed frequencies | Max intervals returned |
|---|---|---|
| basic | d, w, m | d: 30, w: 4, m: 1, y: 0 |
| pro | d, w, m, y | d: 365, w: 52, m: 12, y: 1 |
| ultra | d, w, m, y | d: 1095, w: 156, m: 36, y: 3 |
| mega | d, w, m, y | unlimited |
The response includes your resolved Tier. If the request’s Origin/Referer is the site, the tier is upgraded to mega.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | Yes* | — | Coin id/symbol/name (case-insensitive). Matched via proxy.php. Examples: bitcoin, btc, pyth-network. |
coin | string | — | — | Exact table/id override (alphanumeric, dash or underscore). If provided, it wins over type. |
frequency | string | No | d | One of d, w, m, y. Must be allowed by your tier. Controls interval boundaries only. |
window | supply_window | int | — | (source default) | Forwarded to supply_api.php as its centered SMA window for supply. 1 disables source smoothing. |
sma | supply_trailing_window | int | — | 1 | Extra local trailing SMA on top of the source supply (1 = off). Zeros/≤0 ignored. |
acw | annual_factor_window | int | — | 100 | Trailing 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 viawindow; zeros are ignored). - Local supply smoothing: optional trailing SMA (
sma) that ignores0/≤0values. - 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"
- if age < 365d:
- 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
| Field | Type | Description |
|---|---|---|
Timestamp | string (ISO 8601, UTC) | Response generation time. |
Frequency | string | Reporting frequency: d, w, m, or y. |
supply_window | integer | "default" | Centered SMA window used by the source (or "default" if not overridden). |
supply_trailing_window | integer | Local trailing SMA window on supply. |
inflation_window | integer | Trailing SMA window for annual factor. |
Tier | string | Resolved subscription tier. |
Coin | string | Coin display name (from proxy list, or id if unknown). |
Symbol | string | Coin symbol (if available). |
ID | string | Coin id/table name. |
intervals | array | Interval records (most recent first). |
Each item in intervals
| Field | Type | Description |
|---|---|---|
From | YYYY-MM-DD | Interval start (context only). |
To | YYYY-MM-DD | Interval end (latest day of that period). |
Basis | "since_genesis" | "yoy" | Annual basis used at To. |
SupplyStartDate | YYYY-MM-DD | Date used for the denominator in the factor. |
SupplyEndDate | YYYY-MM-DD | Latest supply date. |
AnnualInflationPercent | string (decimal) | Annual % from the smoothed factor. |
InflationPercentRaw | string (decimal) | Timeframe % = raw annual % ÷ periods-per-year. |
InflationPercent | string (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_apifetch failed; no positive supply; or no intervals computed.
Notes & gotchas
- All dates are UTC.
frequencycontrols only reporting interval boundaries; the underlying series is daily fromsupply_api.- AnnualInflationPercent is the canonical annual %; InflationPercent fields are per-period (timeframe) values derived by simple division.
