# FX Reference Rates API – Country Macroeconomic Indicator Ranking

> FX Reference Rates API – Country Macroeconomic Indicator Ranking is a paid API for AI agents from fx-reference-rates.regnotes.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Ranks ~217 countries by a chosen macroeconomic indicator (GDP, inflation, unemployment, etc.) from World Bank data, with optional filters by year, income group, region, and result count.

## Facts

- Endpoint: GET https://fx-reference-rates.regnotes.workers.dev/v1/macro/rank?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fx-reference-rates-api-country-macroeconomic-indicator-ranking-c000ead8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_obuPVBKonOu2GwrrhUY6P

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fx-reference-rates-api-country-macroeconomic-indicator-ranking-c000ead8
```

Example prompt: Show me the top 20 countries ranked by GDP growth rate in descending order for 2023, excluding regional aggregates.

## When to prefer this

Use this endpoint when you need a ranked, cross-country comparison of a specific macroeconomic indicator from World Bank data, especially when filtering by income group or region matters. Prefer it over raw data downloads when you need a ready-made leaderboard or bottom-N list. Not suitable for transaction FX pricing or historical time-series analysis.

## Known failure modes

- Missing required 'indicator' query parameter returns a validation error
- Invalid indicator enum value returns a 400-level error
- Requesting a year before World Bank data coverage returns empty or null results
- Invalid region or income group filter silently returns empty array
- Non-numeric or malformed 'limit' parameter fails schema validation

## How this service works

Daily ECB euro foreign exchange reference rates for 30 currencies (incl. EUR), any base via cross rates, conversion, historical dates (2024-09-24 onward) and time series. Updated daily. Source: ECB (European Central Bank euro foreign exchange reference rates). Reference rates are published around 16:00 CET on TARGET business days for information purposes only; not for transaction pricing. Cross rates are derived via EUR. Also: AI infrastructure price reference data (cloud GPU instance list prices on AWS and Azure, LLM API token prices), refreshed daily. Also: country macroeconomic indicators (GDP, growth, inflation, unemployment, debt, current account, reserves, FDI, population and more) for ~217 economies from the World Bank World Development Indicators (CC BY 4.0).

## Output

Returns a JSON object with a 'ranked' array where each element contains the country's ISO3 code, full name, rank number, year of data, and numeric indicator value, plus the indicator name used for ranking.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "indicator"
     ],
     "properties": {
      "year": {
       "type": "string",
       "pattern": "^\\d{4}$"
      },
      "limit": {
       "type": "string",
       "pattern": "^\\d{1,3}$"
      },
      "order": {
       "enum": [
        "desc",
        "asc"
       ],
       "type": "string"
      },
      "income": {
       "type": "string"
      },
      "region": {
       "type": "string"
      },
      "indicator": {
       "enum": [
        "gdp_usd",
        "gdp_growth_pct",
        "gdp_per_capita_usd",
        "gni_per_capita_ppp_usd",
        "inflation_cpi_pct",
        "unemployment_pct",
        "population",
        "exports_pct_gdp",
        "imports_pct_gdp",
        "current_account_pct_gdp",
        "central_govt_debt_pct_gdp",
        "tax_revenue_pct_gdp",
        "real_interest_rate_pct",
        "lending_rate_pct",
        "fdi_net_inflows_pct_gdp",
        "total_reserves_usd",
        "official_fx_lcu_per_usd",
        "remittances_pct_gdp",
        "gini_index",
        "life_expectancy_years",
        "internet_users_pct"
       ],
       "type": "string"
      },
      "aggregates": {
       "enum": [
        "true",
        "false"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ranked": [
   {
    "iso3": "IRL",
    "name": "Ireland",
    "rank": 1,
    "year": 2025,
    "value": 12.3376
   }
  ],
  "indicator": "gdp_growth_pct"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fx-reference-rates-api-country-macroeconomic-indicator-ranking-c000ead8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fx-reference-rates.regnotes.workers.dev](https://www.zero.xyz/host/fx-reference-rates.regnotes.workers.dev/llms.txt)
