{"openapi":"3.1.0","info":{"title":"FX Reference Rates API","version":"1.0.0","description":"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).","contact":{"name":"FX Reference Rates API","url":"https://fx-reference-rates.regnotes.workers.dev"},"x-guidance":"Use /v1/convert for a single amount conversion (optionally at a past date), /v1/rates/latest for a rate table in any base (limit with symbols=USD,JPY), /v1/rates/historical for a specific date (falls back to the previous publication day and reports as_of), /v1/rates/timeseries for one pair over up to 366 days. Free currency list at /currencies. For AI costs use /v1/ai/gpu-prices (cheapest GPU instances by model, cloud, region, on-demand or spot, ranked by $/GPU-hour), /v1/ai/llm-prices (USD per 1M input/output tokens by model), /v1/ai/dataset for everything in one JSON; free coverage at /ai/coverage. For country economics use /v1/macro/country (one country, all indicators, latest value + history), /v1/macro/indicator (one indicator across up to 20 countries and years), /v1/macro/rank (rank countries by an indicator, filter region/income), /v1/macro/dataset for everything; free list of indicator keys and country codes at /macro/indicators."},"x-discovery":{"llms":"https://fx-reference-rates.regnotes.workers.dev/llms.txt","x402":"https://fx-reference-rates.regnotes.workers.dev/.well-known/x402"},"paths":{"/health":{"get":{"summary":"Health","security":[],"responses":{"200":{"description":"OK"}}}},"/v1/rates/latest":{"get":{"summary":"Latest reference rates in any base","description":"Today's exchange rates (forex reference rates, most recent ECB publication) for ~30 currencies in any base currency, e.g. USD to JPY, CNY, EUR, GBP, HKD, SGD, KRW, INR. Filter with symbols. Returns as_of date and source attribution.","parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string"},"description":"Base currency (default EUR)"},{"name":"symbols","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated currencies (default all)"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/convert":{"get":{"summary":"Convert an amount between currencies","description":"Currency converter: convert an amount between any two of ~30 currencies (e.g. 100 USD to JPY) at the latest ECB reference rate or as of a past date. Returns rate, result and as_of date.","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 4217"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 4217"},{"name":"amount","in":"query","required":true,"schema":{"type":"number"},"description":"Number"},{"name":"date","in":"query","required":false,"schema":{"type":"string"},"description":"Optional YYYY-MM-DD"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/rates/historical":{"get":{"summary":"Reference rates on a date","description":"ECB reference rates on a given date in any base; non-publication days fall back to the previous publication day (as_of).","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string"},"description":"YYYY-MM-DD"},{"name":"base","in":"query","required":false,"schema":{"type":"string"},"description":"Base currency (default EUR)"},{"name":"symbols","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated currencies"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/rates/timeseries":{"get":{"summary":"Daily time series for a currency pair","description":"Daily reference rate series for base/symbol between start and end (max 366 days), with min/max/mean and change.","parameters":[{"name":"base","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 4217"},{"name":"symbol","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 4217"},{"name":"start","in":"query","required":true,"schema":{"type":"string"},"description":"YYYY-MM-DD"},{"name":"end","in":"query","required":true,"schema":{"type":"string"},"description":"YYYY-MM-DD"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/dataset/csv":{"get":{"summary":"Full history as one CSV file","description":"Bulk download: every publication day in coverage as CSV (date + one column per currency) in the requested base (default EUR). One payment, whole dataset.","parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string"},"description":"Base currency (default EUR)"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/ai/gpu-prices":{"get":{"summary":"Cloud GPU instance prices, cheapest first","description":"Cloud GPU price comparison: hourly list prices of GPU / AI accelerator instances (H100, H200, A100, L40S, L4, A10G, T4, B200, MI300X, Trainium, Inferentia ...) on AWS and Azure in US, EU and Asia regions, on-demand and Azure Spot, ranked by USD per GPU-hour. Filter by gpu model, cloud, region, pricing. Official provider price APIs, refreshed daily.","parameters":[{"name":"gpu","in":"query","required":false,"schema":{"type":"string"},"description":"GPU/accelerator model or instance substring, e.g. H100, A100, L4, trainium"},{"name":"cloud","in":"query","required":false,"schema":{"type":"string"},"description":"aws or azure"},{"name":"region","in":"query","required":false,"schema":{"type":"string"},"description":"e.g. us-east-1, eastus, japaneast"},{"name":"pricing","in":"query","required":false,"schema":{"type":"string"},"description":"on_demand or spot"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1-100, default 20"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/ai/llm-prices":{"get":{"summary":"LLM API token prices by model","description":"LLM API pricing lookup: USD per 1M input, output and cached-input tokens plus context window for ~3,300 models (OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Llama, Mistral, Qwen, xAI ...) across providers (direct, Azure, Bedrock, Vertex, Together, Fireworks ...). Filter by model and provider; sorted by input price.","parameters":[{"name":"model","in":"query","required":true,"schema":{"type":"string"},"description":"Model name substring, e.g. gpt-5, claude-sonnet, gemini-2.5"},{"name":"provider","in":"query","required":false,"schema":{"type":"string"},"description":"Provider substring, e.g. openai, anthropic, bedrock"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1-100, default 25"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/ai/dataset":{"get":{"summary":"Full AI price dataset (GPU + LLM) as JSON","description":"Bulk download: every cloud GPU instance price row (AWS + Azure, 10 regions, on-demand and spot, with GPU model/count, $/GPU-hour) and every LLM API token price (~3,300 models) in one JSON with per-source retrieval timestamps. One payment, whole dataset, refreshed daily.","parameters":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/macro/country":{"get":{"summary":"Country macro snapshot: all indicators, latest + history","description":"Country economic profile: latest value and year plus annual history (2005 onward) for 21 World Bank World Development Indicators: GDP (USD), real GDP growth, GDP per capita, GNI per capita PPP, CPI inflation, unemployment, population, exports/imports % GDP, current account % GDP, central government debt % GDP, tax revenue % GDP, real and lending interest rates, FDI inflows % GDP, total reserves, official exchange rate, remittances % GDP, Gini, life expectancy, internet users. Country by ISO3/ISO2 code or name. CC BY 4.0.","parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 3166 alpha-3 or alpha-2 code or country name, e.g. JPN, US, Brazil"},{"name":"years","in":"query","required":false,"schema":{"type":"integer"},"description":"history years to include, 0-25, default 10"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/macro/indicator":{"get":{"summary":"One indicator across countries and years","description":"Macroeconomic time series: one World Development Indicator (e.g. inflation_cpi_pct, gdp_growth_pct, central_govt_debt_pct_gdp) for up to 20 countries over a year range, annual values. See free /macro/indicators for keys. CC BY 4.0.","parameters":[{"name":"indicator","in":"query","required":true,"schema":{"type":"string"},"description":"indicator key from /macro/indicators, e.g. inflation_cpi_pct"},{"name":"countries","in":"query","required":true,"schema":{"type":"string"},"description":"comma-separated ISO3/ISO2 codes, max 20"},{"name":"start","in":"query","required":false,"schema":{"type":"integer"},"description":"first year, default 2015"},{"name":"end","in":"query","required":false,"schema":{"type":"integer"},"description":"last year, default latest"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/macro/rank":{"get":{"summary":"Rank countries by an indicator","description":"Country ranking: sort all economies by one World Development Indicator for a year (default: each country's latest value), highest first or lowest first, optionally filtered by World Bank region or income group. Aggregates (World, regions) excluded unless requested. CC BY 4.0.","parameters":[{"name":"indicator","in":"query","required":true,"schema":{"type":"string"},"description":"indicator key from /macro/indicators"},{"name":"year","in":"query","required":false,"schema":{"type":"integer"},"description":"year; default latest available per country"},{"name":"region","in":"query","required":false,"schema":{"type":"string"},"description":"World Bank region substring, e.g. Latin America, Sub-Saharan"},{"name":"income","in":"query","required":false,"schema":{"type":"string"},"description":"income group substring, e.g. High income, Lower middle"},{"name":"order","in":"query","required":false,"schema":{"type":"string"},"description":"desc (default) or asc"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1-300, default 50"},{"name":"aggregates","in":"query","required":false,"schema":{"type":"string"},"description":"true to include regional/income aggregates"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}},"/v1/macro/dataset":{"get":{"summary":"Full macro indicator dataset as JSON","description":"Bulk download: all 21 World Development Indicators for ~217 economies and aggregates, annual 2005 onward, with country metadata (region, income group), per-indicator source, licence and World Bank last-updated date, in one JSON. One payment, whole dataset, refreshed daily. CC BY 4.0.","parameters":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.200000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50","chainId":4217}}],"network":"eip155:8453","payTo":"0xF98B4FDAC9c2AcCD59803316a2b2DFf2E653F5Ad"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 PAYMENT-REQUIRED header and MPP WWW-Authenticate: Payment challenge)"}}}}}}