MRI API Docs · v1.0.4 · API v2.3
Free programmatic access to the moneyfeel Macro & Geopolitical Risk Index. Regime classifications, probability vectors, strategy metrics and full historical datasets — 5 regions, 3 timeframes, 2007 to present.
Base URL
All endpoints are prefixed with /v1. A GET /v1 returns the API index (endpoint list). The API is hosted on Cloudflare Workers — globally distributed and optimized for low-latency access.
Quick Start
mf_live_/v1/current — no auth required.Windows PowerShell: curl is aliased to Invoke-WebRequest — use curl.exe for the syntax above (with -H and \ for line continuation), or see the native syntax in the PowerShell tab in Quick Start.
Authentication
Pass your API key in the Authorization header as a Bearer token. Keys are permanent and do not expire. You can revoke or regenerate them at any time from your account page.
Endpoints
Public endpoints require no authentication. Authenticated endpoints require a valid API key in the Authorization header.
Returns the API name, version and the list of public and protected endpoints. Useful as a discovery entry point.
Returns worker status, version and current timestamp. Use to verify connectivity before making data requests. /v1/ping is an alias of this endpoint.
Returns the list of valid region and tf values to use in other endpoints.
Returns the latest regime classification across all 5 regions and all 3 timeframes (daily, weekly, monthly), with DEFCON level and display color per timeframe. No authentication required. Updated daily at market close.
Returns regime classifications and probability vectors for a given region and timeframe over a date range.
| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | Required | GLOBAL · US · EU · ASIA · EM |
| tf | string | Optional | DAILY · WEEKLY · MONTHLY (default: WEEKLY) |
| from | date | Optional | Start date YYYY-MM-DD (default: 2007-01-01) |
| to | date | Optional | End date YYYY-MM-DD (default: today) |
Returns the most recent regime record for the requested region and timeframe.
Returns scalar performance metrics for the MRI overlay strategy: CAGR, Sharpe, Sortino, Max Drawdown, Alpha, Beta, VaR, CVaR, Win Month %, and more. Pass region to filter, or omit to get all 15 combinations.
Returns the full daily return series for the MRI overlay strategy and the benchmark, including cumulative returns, active returns, rolling Sharpe (6M), rolling Beta (6M), rolling Volatility (6M) and drawdown series.
Returns annual return comparison between the MRI overlay and the B&H benchmark, with win/loss status per year. Available from 2007 to present.
Returns the 10 largest peak-to-trough drawdowns for the MRI overlay strategy: start date, recovery date, drawdown percentage and duration in days.
Downloads the complete dataset as a CSV file — regime classifications and strategy timeseries merged by date. Includes comment headers with attribution and download date. One request returns the full history (~5,000 rows for DAILY, ~1,100 for WEEKLY).
Returns the latest macro signal breakdown for a region: credit stress, normalized volatility, momentum z-score, sovereign spread and policy rates (VIX, Fed, ECB). Pass region to filter; omit to get the first available region.
Data Schema
Fields returned by /v1/history and /v1/regime/latest.
Error Handling
All errors return a consistent JSON structure with a machine-readable error code, a human-readable message and a link to this documentation.
| HTTP | error code | When it happens | Resolution |
|---|---|---|---|
| 401 | missing_auth | No Authorization header (or not a Bearer token) | Add Authorization: Bearer mf_live_YOUR_KEY |
| 401 | invalid_api_key | API key not found or revoked | Generate a new key from your account page |
| 401 | invalid_auth | Token is not a valid API key or session | Use a valid mf_live_ key |
| 429 | rate_limit_exceeded | Over 30 req/min | Wait Retry-After seconds |
| 429 | daily_quota_exceeded | Over 2,000 req/day | Quota resets at 00:00 UTC. Use /v1/download for bulk data. |
| 400 | invalid_param | Invalid or missing region / timeframe | Use values from /v1/regions |
| 404 | no_data | No records for the requested filters | Try a broader date range |
| 404 | not_found | Endpoint path does not exist | Check the endpoint list above |
| 500 | internal_error | Unexpected server error | Retry after a few seconds. If persistent, contact support. |
Rate Limits
All limits apply per API key. Daily quotas reset at 00:00 UTC. When a limit is exceeded, the response includes a Retry-After header with the seconds to wait.
Open Source
The API documentation, Python and R client examples, curl scripts and full data schema are available on GitHub under the moneyfeel-io organization.
Data Attribution
If you use MRI data in research, publications or products, please include the following attribution:
Data is provided under CC BY-NC 4.0 — free for research and non-commercial use.