{"openapi": "3.1.0", "info": {"title": "VitalityNode Rates API", "version": "1.0", "description": "Exchange rates with a proof: every number comes with its source, the original publication and a stored copy of the source document, so anyone can check it without us.\n\nFor AI agents: the whole API as one plain-text file at [/api/v1/llms.txt](/api/v1/llms.txt); the schema is at [/api/v1/openapi.json](/api/v1/openapi.json).\n\n## Quick start\n\nJust the number (ECB by default, today or the latest published rate):\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&format=plain\"\n# 1.1165\n```\n\nThe number with its date, source and a link to the proof:\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&format=short\"\n# {\"base\": \"EUR\", \"quote\": \"USD\", \"rate\": \"1.1165\", \"date\": \"2026-11-06\", \"method\": \"fallback_previous\",\n#  \"source\": \"ecb\", \"proof\": \"https://vitalitynode.com/lab/rates/proof/<id>.json\"}\n```\n\nThe full answer (the default) is the proof itself: the value as published, the formula, the original publication and a stored copy of the source document with its SHA-256:\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=USD&quote=EUR&date=2026-10-30&source=ecb\"\n```\n\nThe answer is `1 base = rate quote`. `date` in a short answer is the date the rate was published for: on a Sunday, usually a Friday (`method: fallback_previous`). With `format=plain` the date, source and proof link come in the headers `X-Rate-Date`, `X-Rate-Source`, `X-Rate-Method`, `X-Proof-URL`. No key is needed. Browser apps on any site can call the API directly (CORS, `GET` only, no cookies).\n\n## Instead of a hardcoded rate\n\nFetch once a day, keep the last good value if the call fails, and keep the source and date next to the number. One request a day is far below the free limit.\n\nPython (standard library only):\n\n```python\nimport json, logging, pathlib, urllib.request\nfrom datetime import date\nfrom decimal import Decimal\n\nURL = \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&format=short\"\nCACHE = pathlib.Path(\"eur_usd.json\")\nHEADERS = {\"User-Agent\": \"my-app/1.0\"}  # name your client: some networks block the default Python-urllib\n\n\ndef eur_usd() -> Decimal:\n    \"\"\"EUR/USD by the ECB, fetched once a day; if the API fails, the last known value.\"\"\"\n    cached = json.loads(CACHE.read_text()) if CACHE.exists() else None\n    if cached and cached[\"fetched\"] == date.today().isoformat():\n        return Decimal(cached[\"rate\"])\n    try:\n        with urllib.request.urlopen(urllib.request.Request(URL, headers=HEADERS), timeout=10) as response:\n            data = json.load(response)\n        CACHE.write_text(json.dumps({**data, \"fetched\": date.today().isoformat()}))\n        return Decimal(data[\"rate\"])\n    except Exception as exc:\n        if cached is None:\n            raise\n        logging.warning(\"EUR/USD: keeping %s (%s, %s): %s\", cached[\"rate\"], cached[\"source\"], cached[\"date\"], exc)\n        return Decimal(cached[\"rate\"])\n```\n\nJavaScript (browser or Node 18+):\n\n```javascript\nconst URL = \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&format=short\";\nlet cached = null; // { rate, date, source, proof, fetched }\n\nexport async function eurUsd() {\n  const today = new Date().toISOString().slice(0, 10);\n  if (cached && cached.fetched === today) return cached.rate;\n  try {\n    const response = await fetch(URL);\n    if (!response.ok) throw new Error(`HTTP ${response.status}`);\n    cached = { ...(await response.json()), fetched: today };\n  } catch (error) {\n    if (!cached) throw error;\n    console.warn(`EUR/USD: keeping ${cached.rate} (${cached.source}, ${cached.date})`, error);\n  }\n  return cached.rate; // a decimal string: parse it with a decimal library for money\n}\n```\n\nShell:\n\n```bash\nRATE=$(curl -sf \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&format=plain\") || RATE=$(cat eur_usd.txt)\necho \"$RATE\" > eur_usd.txt\n```\n\nA different rule is one parameter away: `source=irs-yearly&period=2025` for the IRS yearly average, `source=hmrc-monthly` for HMRC, `date=2026-03-31` for a past date.\n\n\n## Official rates\n\n`source` is optional and defaults to `ecb`. The answer always names the source used, and the API never replaces it with another one: if that source does not publish the pair, the error lists the sources that do.\n\n| source | Publisher | Rates | History |\n|---|---|---|---|\n| `ecb` | European Central Bank, euro reference rates | about 30 currencies against EUR, daily | 1999 |\n| `frb-h10` | Federal Reserve Board, H.10 (noon buying rates in New York) | 23 currencies against USD, daily values published weekly | 1971 |\n| `us-treasury` | U.S. Treasury, Reporting Rates of Exchange | about 170 currencies against USD, quarterly | 2001 |\n| `boc` | Bank of Canada, daily exchange rates | 26 currencies against CAD, daily | 2017 |\n| `cnb` | Czech National Bank, exchange rate fixing | about 30 currencies against CZK, daily | 1991 |\n| `irs-yearly` | Internal Revenue Service, yearly average exchange rates | 39 currencies against USD, yearly average | 2021 (the IRS page keeps five years) |\n| `ecb-annual`, `ecb-monthly` | European Central Bank, average of the daily reference rates | against EUR, average over the year or the month | 1999 |\n| `boc-annual`, `boc-monthly` | Bank of Canada, average exchange rates | against CAD, average over the year or the month | 2017 |\n| `hmrc-yearly-dec`, `hmrc-yearly-mar` | HM Revenue & Customs, average exchange rates | about 140 currencies against GBP, average over the 12 months to 31 December or to 31 March | 2020 |\n| `hmrc-monthly` | HM Revenue & Customs, monthly exchange rates for customs and VAT | about 150 currencies against GBP, set in advance for each month | 2021 |\n| `un-ore` | United Nations Treasury, UN Operational Rates of Exchange | about 150 currencies against USD, monthly | November 2026 (only the current month is published) |\n\n**Central banks and other state bodies of more than 60 other countries:** one table per country, usually its own currency against USD, valid until the next publication. Every table with its country, currencies, history, latest value and the publisher's terms: `GET /api/v1/official/sources`.\n\n**U.S. Treasury year end:** a Treasury rate with effective date E applies from E + 1 day, so the rate with effective date 31 December (the one FBAR asks for) comes back for `date` = 1 January of the next year; `inputs[].time_period` shows it.\n\n**Averages** (`irs-yearly`, `ecb-annual`, `ecb-monthly`, `boc-annual`, `boc-monthly`, `hmrc-yearly-dec`, `hmrc-yearly-mar`): `date` picks the period that contains it (any date in 2025 gives the 2025 average). There is no fallback to an earlier period: if the average for that period is not published yet, the answer is 400 `period_not_published` with the latest published period.\n\n**`period` instead of `date`:** `period=2025` or `period=2026-10` means the last day of that year or month, so for averages it selects that period: `source=irs-yearly&period=2025`, `source=ecb-monthly&period=2026-10`, `source=hmrc-yearly-mar&period=2026-03` (the 12 months to 31 March 2026). Pass either `date` or `period`, not both.\n\nPairs that a publisher does not quote directly are calculated through its base currency (a cross rate), for example USD/CNY by the ECB through EUR. The proof then lists both published values.\n\n**No publication on that date** (a weekend, a holiday, or the week H.10 has not been released yet; daily and quarterly sources): you get the latest earlier publication of the same source, marked `method: fallback_previous`, if it is not too old (14 days for daily tables, 62 for monthly, 190 for quarterly); an older one is 400 `stale_publication` with the date of the last publication. `rate_date` is the date the published value applies from. A published rate for the date is `method: published`.\n\n**Calculated values** (inverse, per unit, cross) are rounded to 6 significant digits, at least 6 decimal places, `ROUND_HALF_UP`. A value used as published is returned exactly as the source wrote it.\n\n**Every day of a period at once:** `GET /api/v1/official/series?base=EUR&quote=USD&from=2026-01-01&to=2026-11-10` returns the rate for each calendar day (up to 366 days, one request toward the limit), each with the published value it comes from; `format=csv` gives a file.\n\n**Several currencies at once:** `GET /api/v1/official/rates?base=USD&quote=EUR,GBP,JPY&source=irs-yearly&period=2025` answers each currency on its own (`proof` or `error`), up to 30 per request.\n\n## Market prices\n\n`GET /api/v1/market/quote?base=BTC&quote=USDT` returns the last trade, the best bid and ask and their mid on a market venue, fetched from the venue when you ask. Now: Hyperliquid spot for BTC, ETH, USDT and USDC.\n\n- BTC and ETH on Hyperliquid spot are the bridged tokens UBTC and UETH, and USDT is USDT0; each answer says so.\n- Pairs without their own book (BTC/USDT) are calculated through USDC from two snapshots; bid and ask are crossed conservatively (bid / ask and ask / bid).\n- The proof holds the venue's raw responses (order book and recent trades) with their SHA-256, the trade id and hash.\n- `venue` is optional. If the venue does not respond you get 503; prices from another venue are never substituted silently.\n- Hyperliquid publishes no terms for its public API: no licence is granted and none is prohibited. Fiat pairs are not available as market prices yet; use official rates.\n\n## The proof\n\n- `result.inputs[]`: each published value used, with the publisher, the series key, the value as written in the source document, the link to the original publication for that date, and the stored document (`sha256`, `download_url`).\n- `result.derivation`: how the rate was obtained from the inputs.\n- Download the document by its SHA-256 and compare the hash: it is the exact file we received from the publisher.\n\nPublisher notices travel with the data. The ECB publishes its reference rates for information purposes only and discourages using them for transactions.\n\n## API keys and limits\n\nWithout a key, requests are counted per IP address. With a key from a free account, they are counted per account. Send the key as `Authorization: Bearer <key>`. Get a key: sign in at https://vitalitynode.com/lab/rates/keys/\n\n| | Anonymous | Account |\n|---|---|---|\n| Official API requests | 1,000 a day | 10,000 a day |\n| Market API requests | 20 a month | 100 a month |\n| Requests per minute | 10 | 30 |\n\nMonths and days are calendar periods in UTC. Higher limits are set per account on request. Successful responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.\n\nOn top of these, the server accepts about 60 API requests a minute from one IP address, with or without a key. Above that it answers 429 at once with an HTML page from the web server, not the JSON error below, and without `Retry-After`; wait a few seconds and repeat.\n\nUse of the API is covered by the [Terms of Service](/terms/): rates are returned as published, for information only, and are not tax or financial advice. What is recorded about a request is listed in the [Privacy Policy](/privacy/).\n\n**Feedback:** `POST /api/v1/feedback` with `{\"message\": \"...\", \"request_id\": \"...\", \"email\": \"...\"}` (request id and email are optional).\n\n## Errors\n\nErrors are JSON: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`.\n\n| Status | When |\n|---|---|\n| 400 | Something is wrong in the request: unknown currency, source or pair, a date in the future or before the source's history, an average for a period not published yet, a malformed parameter |\n| 401 | The API key is unknown or revoked |\n| 402 | Payment required (x402, USDC on Base): above the free daily limit, 0.005 USD a request; a daily atlas series longer than 60 days, 0.01 USD. The price is in the `PAYMENT-REQUIRED` header |\n| 404 | No endpoint at this path (API paths have no trailing slash) |\n| 429 | A limit is reached; the body and `Retry-After` say when it resets |\n| 503 | The source has no publication on or before the date in our database yet, or the market venue did not respond |\n\n## Examples\n\nReal responses, recorded on 7 November 2026.\n\n### Official rate on a date\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=USD&quote=EUR&source=ecb&date=2026-11-06\"\n```\n\nThe ECB publishes USD per 1 EUR, so USD to EUR is its inverse. The whole response is the proof:\n\n```json\n{\n  \"proof_version\": 1,\n  \"kind\": \"official\",\n  \"request\": {\n    \"id\": \"5a76d37f-e79f-4c4a-92f0-aa9ae447dae4\",\n    \"at\": \"2026-11-07T12:30:30.680388Z\",\n    \"channel\": \"api\"\n  },\n  \"query\": {\n    \"base\": \"USD\",\n    \"quote\": \"EUR\",\n    \"source\": \"ecb\",\n    \"date\": \"2026-11-06\"\n  },\n  \"result\": {\n    \"base\": \"USD\",\n    \"quote\": \"EUR\",\n    \"rate\": \"0.895656\",\n    \"meaning\": \"1 USD = 0.895656 EUR\",\n    \"method\": \"published\",\n    \"rate_date\": \"2026-11-06\",\n    \"derivation\": {\n      \"type\": \"inverse\",\n      \"formula\": \"rate = 1 / obs_value\",\n      \"note\": \"Calculated by vitalitynode.com from the published value(s); not published by the source.\"\n    },\n    \"rounding\": {\n      \"rule\": \"6 significant digits, at least 6 decimal places\",\n      \"places\": 6,\n      \"mode\": \"ROUND_HALF_UP\"\n    },\n    \"inputs\": [\n      {\n        \"role\": \"only\",\n        \"agency\": \"European Central Bank\",\n        \"jurisdiction\": \"Euro area\",\n        \"dataset\": \"ecb\",\n        \"dataset_name\": \"Euro foreign exchange reference rates\",\n        \"attribution\": \"Source: ECB statistics.\",\n        \"terms_url\": \"https://www.ecb.europa.eu/services/using-our-site/disclaimer/html/index.en.html\",\n        \"notice\": \"The ECB publishes these reference rates for information purposes only and strongly discourages using them for transactions.\",\n        \"series_key\": \"EXR.D.USD.EUR.SP00.A\",\n        \"measure\": \"reference\",\n        \"unit\": \"USD per 1 EUR\",\n        \"time_period\": \"2026-11-06\",\n        \"valid_from\": \"2026-11-06\",\n        \"valid_to\": \"2026-11-06\",\n        \"obs_value\": \"1.1165\",\n        \"obs_status\": \"A\",\n        \"decimals\": 4,\n        \"publication_url\": \"https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?startPeriod=2026-11-06&endPeriod=2026-11-06&format=csvdata\",\n        \"publication_date\": \"2026-11-06\",\n        \"recorded_at\": \"2026-11-07T11:32:36.241050Z\",\n        \"document\": {\n          \"url\": \"https://data-api.ecb.europa.eu/service/data/EXR/D..EUR.SP00.A?startPeriod=2026-01-01&endPeriod=2026-12-31&format=csvdata\",\n          \"sha256\": \"55c9fe87a156c57fa57e26ff6610b8fa8e126088883645e1ca0f5205ef1ace54\",\n          \"retrieved_at\": \"2026-11-07T11:32:35.798070Z\",\n          \"last_modified\": \"2026-11-06T14:57:17Z\",\n          \"download_url\": \"https://vitalitynode.com/lab/rates/documents/55c9fe87a156c57fa57e26ff6610b8fa8e126088883645e1ca0f5205ef1ace54\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### A date without a publication\n\nSunday 1 November 2026: the latest earlier ECB publication is Friday 30 October. EUR to USD is the ECB's own number, returned as written:\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=EUR&quote=USD&source=ecb&date=2026-11-01\"\n```\n\n```json\n{\n  \"result\": {\n    \"rate\": \"1.1172\",\n    \"meaning\": \"1 EUR = 1.1172 USD\",\n    \"method\": \"fallback_previous\",\n    \"rate_date\": \"2026-10-30\",\n    \"derivation\": {\n      \"type\": \"as_published\",\n      \"formula\": \"rate = obs_value\",\n      \"note\": null\n    },\n    \"rounding\": null,\n    \"inputs\": [\n      \"... the value published for 2026-10-30 ...\"\n    ]\n  }\n}\n```\n\n### A cross rate\n\nThe ECB does not publish USD/CNY; it is calculated from two ECB values through EUR, and both are in the proof:\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=USD&quote=CNY&source=ecb&date=2026-11-06\"\n```\n\n```json\n{\n  \"result\": {\n    \"rate\": \"6.671294\",\n    \"meaning\": \"1 USD = 6.671294 CNY\",\n    \"method\": \"published\",\n    \"derivation\": {\n      \"type\": \"cross\",\n      \"formula\": \"rate = (1 / base_leg.obs_value) / (1 / quote_leg.obs_value)  # EUR per 1 USD / EUR per 1 CNY\",\n      \"note\": \"Calculated by vitalitynode.com from the published value(s); not published by the source.\"\n    },\n    \"rounding\": {\n      \"rule\": \"6 significant digits, at least 6 decimal places\",\n      \"places\": 6,\n      \"mode\": \"ROUND_HALF_UP\"\n    },\n    \"inputs\": [\n      {\n        \"role\": \"base_leg\",\n        \"series_key\": \"EXR.D.USD.EUR.SP00.A\",\n        \"obs_value\": \"1.1165\",\n        \"unit\": \"USD per 1 EUR\"\n      },\n      {\n        \"role\": \"quote_leg\",\n        \"series_key\": \"EXR.D.CNY.EUR.SP00.A\",\n        \"obs_value\": \"7.4485\",\n        \"unit\": \"CNY per 1 EUR\"\n      }\n    ]\n  }\n}\n```\n\n### Market price right now\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/market/quote?base=ETH&quote=USDC\"\n```\n\n```json\n{\n  \"proof_version\": 1,\n  \"kind\": \"market\",\n  \"request\": {\n    \"id\": \"24941388-9212-4388-942c-b1d20c784741\",\n    \"at\": \"2026-11-07T12:30:31.297460Z\",\n    \"channel\": \"api\"\n  },\n  \"query\": {\n    \"base\": \"ETH\",\n    \"quote\": \"USDC\",\n    \"venue\": null,\n    \"on_unavailable\": \"error\"\n  },\n  \"result\": {\n    \"base\": \"ETH\",\n    \"quote\": \"USDC\",\n    \"last\": \"2242.6\",\n    \"bid\": \"2242.2\",\n    \"ask\": \"2242.3\",\n    \"mid\": \"2242.25\",\n    \"meaning\": \"1 ETH = 2242.6 USDC (last trade)\",\n    \"method\": \"direct\",\n    \"venue\": \"hyperliquid\",\n    \"derivation\": {\n      \"type\": \"as_published\",\n      \"formula\": \"last, bid, ask as published by the venue; mid = (bid + ask) / 2\",\n      \"note\": null\n    },\n    \"rounding\": null,\n    \"inputs\": [\n      {\n        \"role\": \"only\",\n        \"venue\": \"hyperliquid\",\n        \"venue_name\": \"Hyperliquid\",\n        \"attribution\": \"Source: Hyperliquid public info API (spot order book and trades).\",\n        \"terms_note\": \"Hyperliquid publishes no terms for its public info API: no licence is granted and none is prohibited. Prices are shown as received, with the raw responses.\",\n        \"symbol\": \"@151\",\n        \"venue_pair\": \"UETH/USDC\",\n        \"pair\": \"ETH/USDC\",\n        \"note\": \"UETH (Unit Ethereum) is a token bridged to Hyperliquid that tracks ETH.\",\n        \"received_at\": \"2026-11-07T12:30:31.293247Z\",\n        \"venue_time\": \"2026-11-07T12:30:30.343000Z\",\n        \"bid\": \"2242.2\",\n        \"ask\": \"2242.3\",\n        \"last_trade\": {\n          \"price\": \"2242.6\",\n          \"id\": \"90556192385435\",\n          \"hash\": null,\n          \"time\": \"2026-11-07T12:29:14.011000Z\",\n          \"side\": \"B\"\n        },\n        \"raw\": {\n          \"sha256\": \"c148fe0e838a553d6b89d48f7c9a203c0dc16d3897cbe72f663e532f6cb993af\",\n          \"download_url\": \"https://vitalitynode.com/lab/rates/documents/c148fe0e838a553d6b89d48f7c9a203c0dc16d3897cbe72f663e532f6cb993af\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### Market cross\n\nHyperliquid spot has no BTC/USDT book; the price is calculated through USDC from two snapshots:\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/market/quote?base=BTC&quote=USDT\"\n```\n\n```json\n{\n  \"result\": {\n    \"last\": \"75998.238256\",\n    \"bid\": \"75997.237265\",\n    \"ask\": \"76005.846373\",\n    \"mid\": \"76001.541819\",\n    \"derivation\": {\n      \"type\": \"cross\",\n      \"formula\": \"through USDC: last = base_leg.last / quote_leg.last; bid = base_leg.bid / quote_leg.ask; ask = base_leg.ask / quote_leg.bid; mid = (bid + ask) / 2\",\n      \"note\": \"Calculated by vitalitynode.com from the venue's prices; not published by the venue.\"\n    },\n    \"rounding\": {\n      \"rule\": \"6 significant digits, at least 6 decimal places\",\n      \"places\": 6,\n      \"mode\": \"ROUND_HALF_UP\"\n    },\n    \"inputs\": [\n      {\n        \"role\": \"base_leg\",\n        \"venue_pair\": \"UBTC/USDC\",\n        \"bid\": \"75922\",\n        \"ask\": \"75923\",\n        \"last_trade\": {\n          \"price\": \"75923\",\n          \"id\": \"83669422546020\"\n        }\n      },\n      {\n        \"role\": \"quote_leg\",\n        \"venue_pair\": \"USDT0/USDC\",\n        \"bid\": \"0.99891\",\n        \"ask\": \"0.99901\",\n        \"last_trade\": {\n          \"price\": \"0.99901\",\n          \"id\": \"222773516601786\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### Errors\n\n```bash\ncurl \"https://vitalitynode.com/api/v1/official/rate?base=USD&quote=EUR&source=nope\"        # 400\n```\n\n```json\n{\n  \"error\": {\n    \"code\": \"unknown_source\",\n    \"message\": \"Unknown or inactive source 'nope'. Available sources: boc, cnb, ecb, ... (every active code).\"\n  }\n}\n```\n\n```bash\ncurl -H \"Authorization: Bearer ak_wrong\" \"https://vitalitynode.com/api/v1/official/rate?base=USD&quote=EUR&source=ecb\"   # 401\n```\n\n```json\n{\n  \"error\": {\n    \"code\": \"invalid_api_key\",\n    \"message\": \"The API key is unknown or revoked. Send a valid key as 'Authorization: Bearer <key>', or no Authorization header for anonymous access.\"\n  }\n}\n```\n\nA limit reached (429, with `Retry-After`):\n\n```json\n{\n  \"error\": {\n    \"code\": \"rate_limited\",\n    \"message\": \"Monthly official API limit of 20 requests reached. It resets on 2026-12-01 at 00:00 UTC. An API key from a free account raises the limit.\",\n    \"limit\": 20,\n    \"resets_at\": \"2026-12-01T00:00:00Z\"\n  }\n}\n```\n\n", "contact": {"name": "vitalitynode.com", "url": "https://vitalitynode.com/about/", "email": "info@vitalitynode.com"}, "termsOfService": "https://vitalitynode.com/terms/"}, "paths": {"/api/v1/official/rate": {"get": {"operationId": "rates_api_get_official_rate", "summary": "Official rate on a date, with its proof", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "required": false}, {"in": "query", "name": "period", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}, "required": false}, {"in": "query", "name": "format", "schema": {"default": "full", "title": "Format", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OfficialProof"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "description": "How many `quote` one `base` buys by the chosen publisher's rate on `date` (default: today in UTC). `source` defaults to `ecb`; the response names the source used and never substitutes another one. Instead of `date`, `period` (YYYY or YYYY-MM) means the last day of that year or month; for average sources it selects that period. The response is the proof; `format=short` returns only rate, date, source and a proof link, `format=plain` only the number.", "tags": ["official"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/official/rates": {"get": {"operationId": "rates_api_get_official_rates", "summary": "Several official rates in one request, each with its proof", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "required": false}, {"in": "query", "name": "period", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}, "required": false}, {"in": "query", "name": "format", "schema": {"default": "full", "title": "Format", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BatchOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}}, "description": "Same as `/v1/official/rate`, but `quote` lists up to 30 currencies separated by commas (`quote=EUR,GBP,JPY`). Each currency is answered on its own (`proof` or `error`) and counts as one request toward the daily limit.", "tags": ["official"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/feedback": {"post": {"operationId": "rates_api_post_feedback", "summary": "Report a wrong number or anything else", "parameters": [], "responses": {"202": {"description": "Accepted", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeedbackOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "description": "For people and agents: `message` (up to 4000 characters), optional `request_id` from the proof (`request.id`) and optional `email` for a reply. Up to 10 messages a day per key or address.", "tags": ["feedback"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FeedbackIn"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}, "/api/v1/market/quote": {"get": {"operationId": "rates_api_get_market_quote", "summary": "Market price right now, with its proof", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "venue", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Venue"}, "required": false}, {"in": "query", "name": "on_unavailable", "schema": {"default": "error", "title": "On Unavailable", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarketProof"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "description": "Last trade, best bid and ask and their mid for `base`/`quote` on a market venue, fetched at request time. Now: Hyperliquid spot (BTC, ETH, USDT, USDC). `venue` is optional; `on_unavailable=error|fallback` says what to do if the venue does not respond (with a single venue both return 503).", "tags": ["market"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/official/series": {"get": {"operationId": "rates_api_get_official_series", "summary": "Official rate for every day of a period, in one request", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 29 days before `to`", "title": "From"}, "required": false, "description": "YYYY-MM-DD; default - 29 days before `to`"}, {"in": "query", "name": "to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - today in UTC", "title": "To"}, "required": false, "description": "YYYY-MM-DD; default - today in UTC"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SeriesOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "description": "The rate of one publisher table for each calendar day from `from` to `to` (at most 366 days; default: the last 30 days to today in UTC). Each day is the same number `/v1/official/rate` returns for that date, with `method`, `rate_date` and the published values it comes from; a day without a rate has `rate: null` and an `error` code. Counts as one request toward the daily limit. `format=csv` returns the same as a CSV file.", "tags": ["official"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/official/sources": {"get": {"operationId": "rates_api_get_official_sources", "summary": "Every publisher table: country, currencies, history, terms", "parameters": [{"in": "query", "name": "source", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SourcesOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "description": "The catalog of `source` values: who publishes each table, for which country, against which currency, which currencies it covers, from when, the latest loaded value, the periods of average tables and the publisher's terms; `currency_names` names every currency. `?source=ecb` returns one table. Not counted toward the daily limit.", "tags": ["official"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/map/gap": {"get": {"operationId": "atlas_api_gap_map", "summary": "Map 'Official vs street': official and street rate and the gap for every country on a day", "parameters": [{"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GapMap"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "One call for all countries. Every country has the gap with its colour group, or `na` with a reason code. `format=csv` returns the same table as a CSV file. Same numbers as https://vitalitynode.com/lab/atlas/map/gap/.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/map/risk": {"get": {"operationId": "atlas_api_risk_map", "summary": "Map 'Currency risk': value lost against USD at the street rate over a period, for every country", "parameters": [{"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}, {"in": "query", "name": "period", "schema": {"default": "360", "description": "30, 90, 180, 360 or ytd (since January 1)", "title": "Period", "type": "string"}, "required": false, "description": "30, 90, 180, 360 or ytd (since January 1)"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RiskMap"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "One call for all countries. `period`: 30, 90, 180, 360 days or ytd. Every country has the value lost with its colour group, or `na` with a reason code. `format=csv` returns a CSV file. Same numbers as https://vitalitynode.com/lab/atlas/map/risk/.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/facts": {"get": {"operationId": "atlas_api_day_facts", "summary": "Facts of the day: market currencies only, every number with its source", "parameters": [{"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "Up to a few short facts about market-economy currencies on a day: carry over 360 days (central bank rate against value lost on the street), a street gap that is new, a sharp move over 30 days, a central bank rate change. Each fact has one line of text, the numbers as strings, the official and street rate with their sources, and the country page. A day with nothing new gives an empty list. `rules` says what each kind means. Facts, not advice.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/stablecoins": {"get": {"operationId": "atlas_api_stablecoin_summary", "summary": "US dollar stablecoins against the US dollar: last full hour and last full day", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "USDT, USDC and the other US dollar stablecoins over 2 billion USD in circulation, priced against the US dollar itself on Kraken, Bitstamp, Coinbase Exchange and Gemini. For the last full UTC hour and the last full UTC day: the median of venue candle closes, the deviation from 1 USD, a status, and every venue with its close, volume, whether it counts and why not. `rules` says how the price is chosen. Observed prices, not advice.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/stablecoins/{code}/days": {"get": {"operationId": "atlas_api_stablecoin_days", "summary": "Daily series for a US dollar stablecoin against the US dollar", "parameters": [{"in": "path", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 30 days before `to`", "title": "From"}, "required": false, "description": "YYYY-MM-DD; default - 30 days before `to`"}, {"in": "query", "name": "to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full UTC day", "title": "To"}, "required": false, "description": "YYYY-MM-DD; default - the last full UTC day"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "Up to 400 days per call, by UTC day: price (median of venue candle closes), deviation from 1 USD, status and venues. Days without any venue candle are left out. Codes: USDT, USDC, USDS, USDe, DAI, USD1, RLUSD, USDG, PYUSD.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/countries/{code}": {"get": {"operationId": "atlas_api_country", "summary": "One country: official and street rate, gap, value lost, and what each number is made of", "parameters": [{"in": "path", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "period", "schema": {"default": "360", "description": "Days for value lost (1-3650) or ytd", "title": "Period", "type": "string"}, "required": false, "description": "Days for value lost (1-3650) or ytd"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "Official rate with the central bank document it comes from; street rate with every platform's own value (our numbers only: no raw platform responses, no personal data); value lost over `period` with the street rate at both ends (`value_lost_street`); footnote and redenominations with their source; `local_names` - what people in the country call the official and the street rate (empty lists when we have none); `legal_parity` when the official rate is a peg set by law; `monthly_street` - WFP and FEWS NET monthly points over the period; `day_fact` - version, computation time and formula of the day's record. Same numbers as the maps.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/atlas/currencies/{code}/days": {"get": {"operationId": "atlas_api_currency_days", "summary": "Daily series for a currency: official rate, street rate, gap", "parameters": [{"in": "path", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 30 days before `to`", "title": "From"}, "required": false, "description": "YYYY-MM-DD; default - 30 days before `to`"}, {"in": "query", "name": "to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "To"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "description": "Up to 400 days per call. Each day is the current version of our daily record; `null` where there is no number.", "tags": ["atlas"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/x402/official/rate": {"get": {"operationId": "rates_api_get_official_rate_x402", "summary": "Official rate on a date, with its proof", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "required": false}, {"in": "query", "name": "period", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}, "required": false}, {"in": "query", "name": "format", "schema": {"default": "full", "title": "Format", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OfficialProof"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "402": {"description": "Payment required: the price is in the PAYMENT-REQUIRED header"}, "403": {"description": "Paid answers are not available for IRR, CUP, CUC, Iran or Cuba, or from this region"}}, "description": "Paid path for agents (x402): every call costs 0.01 USD in USDC on Base, from the first call; there is no free answer and the daily free limit is not used. Without a payment the answer is 402 with the price in the PAYMENT-REQUIRED header; an answer with an error is not charged. Same parameters and answer as `/api/v1/official/rate`.\n\nHow many `quote` one `base` buys by the chosen publisher's rate on `date` (default: today in UTC). `source` defaults to `ecb`; the response names the source used and never substitutes another one. Instead of `date`, `period` (YYYY or YYYY-MM) means the last day of that year or month; for average sources it selects that period. The response is the proof; `format=short` returns only rate, date, source and a proof link, `format=plain` only the number.", "tags": ["x402"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/x402/official/rates": {"get": {"operationId": "rates_api_get_official_rates_x402", "summary": "Several official rates in one request, each with its proof", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "required": false}, {"in": "query", "name": "period", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}, "required": false}, {"in": "query", "name": "format", "schema": {"default": "full", "title": "Format", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BatchOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "402": {"description": "Payment required: the price is in the PAYMENT-REQUIRED header"}, "403": {"description": "Paid answers are not available for IRR, CUP, CUC, Iran or Cuba, or from this region"}}, "description": "Paid path for agents (x402): every call costs 0.01 USD in USDC on Base, from the first call; there is no free answer and the daily free limit is not used. Without a payment the answer is 402 with the price in the PAYMENT-REQUIRED header; an answer with an error is not charged. Same parameters and answer as `/api/v1/official/rates`.\n\nSame as `/v1/official/rate`, but `quote` lists up to 30 currencies separated by commas (`quote=EUR,GBP,JPY`). Each currency is answered on its own (`proof` or `error`) and counts as one request toward the daily limit.", "tags": ["x402"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/x402/official/series": {"get": {"operationId": "rates_api_get_official_series_x402", "summary": "Official rate for every day of a period, in one request", "parameters": [{"in": "query", "name": "base", "schema": {"title": "Base", "type": "string"}, "required": true}, {"in": "query", "name": "quote", "schema": {"title": "Quote", "type": "string"}, "required": true}, {"in": "query", "name": "source", "schema": {"default": "ecb", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 29 days before `to`", "title": "From"}, "required": false, "description": "YYYY-MM-DD; default - 29 days before `to`"}, {"in": "query", "name": "to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - today in UTC", "title": "To"}, "required": false, "description": "YYYY-MM-DD; default - today in UTC"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SeriesOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitErrorOut"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}, "402": {"description": "Payment required: the price is in the PAYMENT-REQUIRED header"}, "403": {"description": "Paid answers are not available for IRR, CUP, CUC, Iran or Cuba, or from this region"}}, "description": "Paid path for agents (x402): every call costs 0.01 USD in USDC on Base, from the first call; there is no free answer and the daily free limit is not used. Without a payment the answer is 402 with the price in the PAYMENT-REQUIRED header; an answer with an error is not charged. Same parameters and answer as `/api/v1/official/series`.\n\nThe rate of one publisher table for each calendar day from `from` to `to` (at most 366 days; default: the last 30 days to today in UTC). Each day is the same number `/v1/official/rate` returns for that date, with `method`, `rate_date` and the published values it comes from; a day without a rate has `rate: null` and an `error` code. Counts as one request toward the daily limit. `format=csv` returns the same as a CSV file.", "tags": ["x402"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/x402/atlas/countries/{code}": {"get": {"operationId": "atlas_api_country_x402", "summary": "One country: official and street rate, gap, value lost, and what each number is made of", "parameters": [{"in": "path", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "date", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "period", "schema": {"default": "360", "description": "Days for value lost (1-3650) or ytd", "title": "Period", "type": "string"}, "required": false, "description": "Days for value lost (1-3650) or ytd"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "402": {"description": "Payment required: the price is in the PAYMENT-REQUIRED header"}, "403": {"description": "Paid answers are not available for IRR, CUP, CUC, Iran or Cuba, or from this region"}}, "description": "Paid path for agents (x402): every call costs 0.01 USD in USDC on Base, from the first call; there is no free answer and the daily free limit is not used. Without a payment the answer is 402 with the price in the PAYMENT-REQUIRED header; an answer with an error is not charged. Same parameters and answer as `/api/v1/atlas/countries/{code}`.\n\nOfficial rate with the central bank document it comes from; street rate with every platform's own value (our numbers only: no raw platform responses, no personal data); value lost over `period` with the street rate at both ends (`value_lost_street`); footnote and redenominations with their source; `local_names` - what people in the country call the official and the street rate (empty lists when we have none); `legal_parity` when the official rate is a peg set by law; `monthly_street` - WFP and FEWS NET monthly points over the period; `day_fact` - version, computation time and formula of the day's record. Same numbers as the maps.", "tags": ["x402"], "security": [{"ApiKeyAuth": []}]}}, "/api/v1/x402/atlas/currencies/{code}/days": {"get": {"operationId": "atlas_api_currency_days_x402", "summary": "Daily series for a currency: official rate, street rate, gap", "parameters": [{"in": "path", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "from", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 30 days before `to`", "title": "From"}, "required": false, "description": "YYYY-MM-DD; default - 30 days before `to`"}, {"in": "query", "name": "to", "schema": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "To"}, "required": false, "description": "YYYY-MM-DD; default - the last full past day"}, {"in": "query", "name": "format", "schema": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "required": false, "description": "json or csv"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "402": {"description": "Payment required: the price is in the PAYMENT-REQUIRED header"}, "403": {"description": "Paid answers are not available for IRR, CUP, CUC, Iran or Cuba, or from this region"}}, "description": "Paid path for agents (x402): every call costs 0.01 USD in USDC on Base, from the first call; there is no free answer and the daily free limit is not used. Without a payment the answer is 402 with the price in the PAYMENT-REQUIRED header; an answer with an error is not charged. Same parameters and answer as `/api/v1/atlas/currencies/{code}/days`.\n\nUp to 400 days per call. Each day is the current version of our daily record; `null` where there is no number.", "tags": ["x402"], "security": [{"ApiKeyAuth": []}]}}}, "components": {"schemas": {"OfficialRateQuery": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "source": {"default": "ecb", "title": "Source", "type": "string"}, "date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "period": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}, "format": {"default": "full", "title": "Format", "type": "string"}}, "required": ["base", "quote"], "title": "OfficialRateQuery", "type": "object"}, "DerivationOut": {"properties": {"type": {"title": "Type", "type": "string"}, "formula": {"title": "Formula", "type": "string"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}}, "required": ["type", "formula"], "title": "DerivationOut", "type": "object"}, "DocumentOut": {"properties": {"url": {"title": "Url", "type": "string"}, "sha256": {"title": "Sha256", "type": "string"}, "retrieved_at": {"title": "Retrieved At", "type": "string"}, "last_modified": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Modified"}, "download_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Download Url"}, "copy_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Copy Note"}}, "required": ["url", "sha256", "retrieved_at", "last_modified", "download_url"], "title": "DocumentOut", "type": "object"}, "InputOut": {"properties": {"role": {"title": "Role", "type": "string"}, "agency": {"title": "Agency", "type": "string"}, "jurisdiction": {"title": "Jurisdiction", "type": "string"}, "dataset": {"title": "Dataset", "type": "string"}, "dataset_name": {"title": "Dataset Name", "type": "string"}, "attribution": {"title": "Attribution", "type": "string"}, "terms_url": {"title": "Terms Url", "type": "string"}, "notice": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notice"}, "series_key": {"title": "Series Key", "type": "string"}, "measure": {"title": "Measure", "type": "string"}, "unit": {"title": "Unit", "type": "string"}, "time_period": {"title": "Time Period", "type": "string"}, "valid_from": {"title": "Valid From", "type": "string"}, "valid_to": {"title": "Valid To", "type": "string"}, "obs_value": {"title": "Obs Value", "type": "string"}, "obs_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Obs Status"}, "decimals": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Decimals"}, "publication_url": {"title": "Publication Url", "type": "string"}, "publication_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Publication Date"}, "recorded_at": {"title": "Recorded At", "type": "string"}, "document": {"$ref": "#/components/schemas/DocumentOut"}}, "required": ["role", "agency", "jurisdiction", "dataset", "dataset_name", "attribution", "terms_url", "notice", "series_key", "measure", "unit", "time_period", "valid_from", "valid_to", "obs_value", "obs_status", "decimals", "publication_url", "publication_date", "recorded_at", "document"], "title": "InputOut", "type": "object"}, "OfficialProof": {"properties": {"proof_version": {"title": "Proof Version", "type": "integer"}, "kind": {"title": "Kind", "type": "string"}, "request": {"$ref": "#/components/schemas/RequestOut"}, "query": {"$ref": "#/components/schemas/QueryOut"}, "result": {"$ref": "#/components/schemas/ResultOut"}}, "required": ["proof_version", "kind", "request", "query", "result"], "title": "OfficialProof", "type": "object"}, "QueryOut": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "source": {"title": "Source", "type": "string"}, "date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Date"}, "period": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Period"}}, "required": ["base", "quote", "source", "date"], "title": "QueryOut", "type": "object"}, "RequestOut": {"properties": {"id": {"title": "Id", "type": "string"}, "at": {"title": "At", "type": "string"}, "channel": {"title": "Channel", "type": "string"}}, "required": ["id", "at", "channel"], "title": "RequestOut", "type": "object"}, "ResultOut": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "rate": {"title": "Rate", "type": "string"}, "meaning": {"title": "Meaning", "type": "string"}, "method": {"title": "Method", "type": "string"}, "rate_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rate Date"}, "issuer_of": {"description": "Which of the two currencies the publisher's own state (or currency union) issues; empty: the publisher's own rate, not the currency's official rate", "items": {"type": "string"}, "title": "Issuer Of", "type": "array"}, "derivation": {"$ref": "#/components/schemas/DerivationOut"}, "rounding": {"anyOf": [{"$ref": "#/components/schemas/RoundingOut"}, {"type": "null"}]}, "inputs": {"items": {"$ref": "#/components/schemas/InputOut"}, "title": "Inputs", "type": "array"}}, "required": ["base", "quote", "rate", "meaning", "method", "rate_date", "issuer_of", "derivation", "rounding", "inputs"], "title": "ResultOut", "type": "object"}, "RoundingOut": {"properties": {"rule": {"title": "Rule", "type": "string"}, "places": {"title": "Places", "type": "integer"}, "mode": {"title": "Mode", "type": "string"}}, "required": ["rule", "places", "mode"], "title": "RoundingOut", "type": "object"}, "ErrorBody": {"properties": {"code": {"title": "Code", "type": "string"}, "message": {"title": "Message", "type": "string"}}, "required": ["code", "message"], "title": "ErrorBody", "type": "object"}, "ErrorOut": {"properties": {"error": {"$ref": "#/components/schemas/ErrorBody"}}, "required": ["error"], "title": "ErrorOut", "type": "object"}, "LimitErrorBody": {"properties": {"code": {"title": "Code", "type": "string"}, "message": {"title": "Message", "type": "string"}, "limit": {"title": "Limit", "type": "integer"}, "resets_at": {"title": "Resets At", "type": "string"}}, "required": ["code", "message", "limit", "resets_at"], "title": "LimitErrorBody", "type": "object"}, "LimitErrorOut": {"properties": {"error": {"$ref": "#/components/schemas/LimitErrorBody"}}, "required": ["error"], "title": "LimitErrorOut", "type": "object"}, "BatchItemOut": {"properties": {"quote": {"title": "Quote", "type": "string"}, "proof": {"anyOf": [{"$ref": "#/components/schemas/OfficialProof"}, {"type": "null"}]}, "error": {"anyOf": [{"$ref": "#/components/schemas/ErrorBody"}, {"type": "null"}]}}, "required": ["quote", "proof", "error"], "title": "BatchItemOut", "type": "object"}, "BatchOut": {"properties": {"results": {"items": {"$ref": "#/components/schemas/BatchItemOut"}, "title": "Results", "type": "array"}}, "required": ["results"], "title": "BatchOut", "type": "object"}, "FeedbackOut": {"properties": {"status": {"title": "Status", "type": "string"}, "id": {"title": "Id", "type": "integer"}}, "required": ["status", "id"], "title": "FeedbackOut", "type": "object"}, "FeedbackIn": {"properties": {"message": {"title": "Message", "type": "string"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Request Id"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}}, "required": ["message"], "title": "FeedbackIn", "type": "object"}, "MarketQuoteQuery": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "venue": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Venue"}, "on_unavailable": {"default": "error", "title": "On Unavailable", "type": "string"}}, "required": ["base", "quote"], "title": "MarketQuoteQuery", "type": "object"}, "LastTradeOut": {"properties": {"price": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "hash": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hash"}, "time": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time"}, "side": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Side"}}, "required": ["price", "id", "hash", "time", "side"], "title": "LastTradeOut", "type": "object"}, "MarketInputOut": {"properties": {"role": {"title": "Role", "type": "string"}, "venue": {"title": "Venue", "type": "string"}, "venue_name": {"title": "Venue Name", "type": "string"}, "attribution": {"title": "Attribution", "type": "string"}, "terms_note": {"title": "Terms Note", "type": "string"}, "symbol": {"title": "Symbol", "type": "string"}, "venue_pair": {"title": "Venue Pair", "type": "string"}, "pair": {"title": "Pair", "type": "string"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "received_at": {"title": "Received At", "type": "string"}, "venue_time": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Venue Time"}, "bid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Bid"}, "ask": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ask"}, "last_trade": {"$ref": "#/components/schemas/LastTradeOut"}, "raw": {"$ref": "#/components/schemas/RawOut"}}, "required": ["role", "venue", "venue_name", "attribution", "terms_note", "symbol", "venue_pair", "pair", "note", "received_at", "venue_time", "bid", "ask", "last_trade", "raw"], "title": "MarketInputOut", "type": "object"}, "MarketProof": {"properties": {"proof_version": {"title": "Proof Version", "type": "integer"}, "kind": {"title": "Kind", "type": "string"}, "request": {"$ref": "#/components/schemas/RequestOut"}, "query": {"$ref": "#/components/schemas/MarketQueryOut"}, "result": {"$ref": "#/components/schemas/MarketResultOut"}}, "required": ["proof_version", "kind", "request", "query", "result"], "title": "MarketProof", "type": "object"}, "MarketQueryOut": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "venue": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Venue"}, "on_unavailable": {"title": "On Unavailable", "type": "string"}}, "required": ["base", "quote", "venue", "on_unavailable"], "title": "MarketQueryOut", "type": "object"}, "MarketResultOut": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "last": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last"}, "bid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Bid"}, "ask": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ask"}, "mid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mid"}, "meaning": {"title": "Meaning", "type": "string"}, "method": {"title": "Method", "type": "string"}, "venue": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Venue"}, "derivation": {"$ref": "#/components/schemas/DerivationOut"}, "rounding": {"anyOf": [{"$ref": "#/components/schemas/RoundingOut"}, {"type": "null"}]}, "inputs": {"items": {"$ref": "#/components/schemas/MarketInputOut"}, "title": "Inputs", "type": "array"}}, "required": ["base", "quote", "last", "bid", "ask", "mid", "meaning", "method", "venue", "derivation", "rounding", "inputs"], "title": "MarketResultOut", "type": "object"}, "RawOut": {"properties": {"sha256": {"title": "Sha256", "type": "string"}, "download_url": {"title": "Download Url", "type": "string"}}, "required": ["sha256", "download_url"], "title": "RawOut", "type": "object"}, "SeriesQuery": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "source": {"default": "ecb", "title": "Source", "type": "string"}, "from": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 29 days before `to`", "title": "From"}, "to": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - today in UTC", "title": "To"}, "format": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}}, "required": ["base", "quote"], "title": "SeriesQuery", "type": "object"}, "SeriesDayOut": {"properties": {"date": {"title": "Date", "type": "string"}, "rate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rate"}, "method": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Method"}, "rate_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rate Date"}, "derivation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Derivation"}, "inputs": {"anyOf": [{"items": {"$ref": "#/components/schemas/SeriesInputOut"}, "type": "array"}, {"type": "null"}], "title": "Inputs"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Why there is no rate on this day; explained in `errors`", "title": "Error"}}, "required": ["date", "rate"], "title": "SeriesDayOut", "type": "object"}, "SeriesDocumentOut": {"properties": {"url": {"title": "Url", "type": "string"}, "retrieved_at": {"title": "Retrieved At", "type": "string"}, "download_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Download Url"}, "copy_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Copy Note"}}, "required": ["url", "retrieved_at", "download_url"], "title": "SeriesDocumentOut", "type": "object"}, "SeriesInputOut": {"properties": {"role": {"title": "Role", "type": "string"}, "series_key": {"title": "Series Key", "type": "string"}, "unit": {"title": "Unit", "type": "string"}, "time_period": {"title": "Time Period", "type": "string"}, "obs_value": {"description": "The number exactly as published", "title": "Obs Value", "type": "string"}, "document": {"description": "SHA-256 of the document; details in `documents`", "title": "Document", "type": "string"}}, "required": ["role", "series_key", "unit", "time_period", "obs_value", "document"], "title": "SeriesInputOut", "type": "object"}, "SeriesOut": {"properties": {"kind": {"title": "Kind", "type": "string"}, "request": {"$ref": "#/components/schemas/RequestOut"}, "query": {"$ref": "#/components/schemas/SeriesQueryOut"}, "meaning": {"title": "Meaning", "type": "string"}, "issuer_of": {"items": {"type": "string"}, "title": "Issuer Of", "type": "array"}, "source": {"$ref": "#/components/schemas/SeriesSourceOut"}, "rounding": {"additionalProperties": true, "title": "Rounding", "type": "object"}, "days": {"items": {"$ref": "#/components/schemas/SeriesDayOut"}, "title": "Days", "type": "array"}, "errors": {"additionalProperties": {"type": "string"}, "title": "Errors", "type": "object"}, "documents": {"additionalProperties": {"$ref": "#/components/schemas/SeriesDocumentOut"}, "title": "Documents", "type": "object"}}, "required": ["kind", "request", "query", "meaning", "issuer_of", "source", "rounding", "days", "errors", "documents"], "title": "SeriesOut", "type": "object"}, "SeriesQueryOut": {"properties": {"base": {"title": "Base", "type": "string"}, "quote": {"title": "Quote", "type": "string"}, "source": {"title": "Source", "type": "string"}, "from": {"title": "From", "type": "string"}, "to": {"title": "To", "type": "string"}}, "required": ["base", "quote", "source", "from", "to"], "title": "SeriesQueryOut", "type": "object"}, "SeriesSourceOut": {"properties": {"code": {"title": "Code", "type": "string"}, "name": {"title": "Name", "type": "string"}, "agency": {"title": "Agency", "type": "string"}, "jurisdiction": {"title": "Jurisdiction", "type": "string"}, "attribution": {"title": "Attribution", "type": "string"}, "terms_url": {"title": "Terms Url", "type": "string"}, "notice": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notice"}, "copies_allowed": {"title": "Copies Allowed", "type": "boolean"}}, "required": ["code", "name", "agency", "jurisdiction", "attribution", "terms_url", "notice", "copies_allowed"], "title": "SeriesSourceOut", "type": "object"}, "PeriodOut": {"properties": {"period": {"description": "Value of `period` in requests", "title": "Period", "type": "string"}, "label": {"description": "How the period reads, e.g. 2025, April 2024 to March 2025, October 2026", "title": "Label", "type": "string"}}, "required": ["period", "label"], "title": "PeriodOut", "type": "object"}, "SourceOut": {"properties": {"code": {"description": "Value of `source` in requests", "title": "Code", "type": "string"}, "name": {"title": "Name", "type": "string"}, "publisher": {"title": "Publisher", "type": "string"}, "publisher_kind": {"description": "central_bank, tax, customs, treasury, regulator or commercial_bank", "title": "Publisher Kind", "type": "string"}, "country": {"title": "Country", "type": "string"}, "country_name": {"title": "Country Name", "type": "string"}, "pivot": {"description": "The table's own currency: rates are published against it", "title": "Pivot", "type": "string"}, "issuer": {"description": "The publisher belongs to the state (or currency union) that issues the pivot currency", "title": "Issuer", "type": "boolean"}, "frequency": {"title": "Frequency", "type": "string"}, "validity": {"description": "period (a value covers its own period) or until_next (valid until the next publication)", "title": "Validity", "type": "string"}, "average": {"description": "An average over a period: no fallback to an earlier period", "title": "Average", "type": "boolean"}, "periods": {"anyOf": [{"items": {"$ref": "#/components/schemas/PeriodOut"}, "type": "array"}, {"type": "null"}], "description": "Average tables and the other tables of the average pages (hmrc-monthly): every published period, newest first (`period` value and label); null otherwise", "title": "Periods"}, "history_from": {"title": "History From", "type": "string"}, "last_published": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Published"}, "currencies": {"items": {"type": "string"}, "title": "Currencies", "type": "array"}, "schedule": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule"}, "notice": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notice"}, "legal_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Legal Note"}, "attribution": {"description": "Credit line to keep when you pass the numbers on", "title": "Attribution", "type": "string"}, "terms_url": {"title": "Terms Url", "type": "string"}, "terms_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Terms Note"}, "copies_allowed": {"description": "False: the publisher's terms forbid handing out copies; proofs link the original", "title": "Copies Allowed", "type": "boolean"}, "homepage_url": {"title": "Homepage Url", "type": "string"}}, "required": ["code", "name", "publisher", "publisher_kind", "country", "country_name", "pivot", "issuer", "frequency", "validity", "average", "history_from", "last_published", "currencies", "schedule", "notice", "legal_note", "attribution", "terms_url", "terms_note", "copies_allowed", "homepage_url"], "title": "SourceOut", "type": "object"}, "SourcesOut": {"properties": {"count": {"title": "Count", "type": "integer"}, "sources": {"items": {"$ref": "#/components/schemas/SourceOut"}, "title": "Sources", "type": "array"}, "currency_names": {"additionalProperties": {"type": "string"}, "description": "Name of every currency in `currencies` of the tables above", "title": "Currency Names", "type": "object"}}, "required": ["count", "sources", "currency_names"], "title": "SourcesOut", "type": "object"}, "MapQuery": {"properties": {"date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "format": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}}, "title": "MapQuery", "type": "object"}, "Document": {"properties": {"sha256": {"title": "Sha256", "type": "string"}, "original_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Where the publisher put it", "title": "Original Url"}, "download_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Our stored copy; null when the source's terms forbid copies", "title": "Download Url"}, "copy_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Copy Note"}}, "required": ["sha256"], "title": "Document", "type": "object"}, "GapCountry": {"properties": {"country": {"title": "Country", "type": "string"}, "name": {"title": "Name", "type": "string"}, "kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "country, territory or uninhabited", "title": "Kind"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "currency_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "e.g. Nigerian naira; empty when we have no name", "title": "Currency Name"}, "currency_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "own, union (shared by a currency union), uses (another state's currency) or parallel", "title": "Currency Role"}, "parallel_market": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Parallel market for the currency: yes, unknown, or no - freely traded: its street rate is the USDT price on local platforms, not a parallel market", "title": "Parallel Market"}, "official": {"anyOf": [{"$ref": "#/components/schemas/Official"}, {"type": "null"}]}, "street": {"anyOf": [{"$ref": "#/components/schemas/Street"}, {"type": "null"}]}, "gap": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "street / official - 1; positive - the street pays more units per USD", "title": "Gap"}, "gap_pct": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gap Pct"}, "noise": {"default": false, "description": "Within the day's noise level of freely traded currencies", "title": "Noise", "type": "boolean"}, "group": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Group"}, "na": {"anyOf": [{"$ref": "#/components/schemas/Reason"}, {"type": "null"}]}, "policy_rate": {"anyOf": [{"$ref": "#/components/schemas/PolicyRate"}, {"type": "null"}], "description": "Policy rate of the central bank issuing the currency, on the date"}, "policy_rate_na": {"anyOf": [{"$ref": "#/components/schemas/Reason"}, {"type": "null"}]}, "street_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Which street sources were not used for the day and why; also for rows with a rate", "title": "Street Note"}, "url": {"title": "Url", "type": "string"}}, "required": ["country", "name", "url"], "title": "GapCountry", "type": "object"}, "GapMap": {"properties": {"beta": {"title": "Beta", "type": "boolean"}, "notice": {"title": "Notice", "type": "string"}, "attribution": {"title": "Attribution", "type": "string"}, "terms": {"title": "Terms", "type": "string"}, "map": {"title": "Map", "type": "string"}, "date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "noise_pct": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Noise Pct"}, "legend": {"items": {"$ref": "#/components/schemas/Group"}, "title": "Legend", "type": "array"}, "countries": {"items": {"$ref": "#/components/schemas/GapCountry"}, "title": "Countries", "type": "array"}, "notes": {"items": {"$ref": "#/components/schemas/Note"}, "title": "Notes", "type": "array"}}, "required": ["beta", "notice", "attribution", "terms", "map", "legend", "countries", "notes"], "title": "GapMap", "type": "object"}, "Group": {"properties": {"key": {"title": "Key", "type": "string"}, "color": {"title": "Color", "type": "string"}, "label": {"title": "Label", "type": "string"}, "min": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Max"}, "countries": {"title": "Countries", "type": "integer"}}, "required": ["key", "color", "label", "countries"], "title": "Group", "type": "object"}, "Note": {"properties": {"currency": {"title": "Currency", "type": "string"}, "countries": {"items": {"type": "string"}, "title": "Countries", "type": "array"}, "text": {"title": "Text", "type": "string"}, "source_url": {"title": "Source Url", "type": "string"}}, "required": ["currency", "countries", "text", "source_url"], "title": "Note", "type": "object"}, "Official": {"properties": {"rate": {"description": "Units of the currency per 1 USD, as declared by the state", "title": "Rate", "type": "string"}, "origin": {"description": "issuer (the state's own table), legal_parity (peg set by law) or base (USD itself)", "title": "Origin", "type": "string"}, "source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "attribution": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Attribution"}, "rate_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "Date of the publication the rate comes from", "title": "Rate Date"}, "method": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "published, or fallback_previous when the last publication is carried forward", "title": "Method"}, "document": {"anyOf": [{"$ref": "#/components/schemas/Document"}, {"type": "null"}]}}, "required": ["rate", "origin"], "title": "Official", "type": "object"}, "PolicyRate": {"properties": {"rate": {"description": "Percent per year that the calculations use; for a target range - its midpoint", "title": "Rate", "type": "string"}, "rate_low": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Lower bound, when the central bank sets a range (the Fed)", "title": "Rate Low"}, "rate_high": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Upper bound, when the central bank sets a range", "title": "Rate High"}, "text": {"description": "As shown on the page: 16.50% or 3.75–4.00%", "title": "Text", "type": "string"}, "name": {"description": "What the central bank calls its main rate, e.g. Key rate", "title": "Name", "type": "string"}, "central_bank": {"title": "Central Bank", "type": "string"}, "attribution": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Attribution"}, "in_force_from": {"description": "The day the rate took effect, as the central bank states", "format": "date", "title": "In Force From", "type": "string"}, "decided_on": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "Date of the decision, when the central bank gives it", "title": "Decided On"}, "changed_on": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "Last change on or before the date; null - no change in our history", "title": "Changed On"}, "known_since": {"description": "Our history of this rate starts on this day", "format": "date", "title": "Known Since", "type": "string"}, "document": {"$ref": "#/components/schemas/Document"}}, "required": ["rate", "text", "name", "central_bank", "in_force_from", "known_since", "document"], "title": "PolicyRate", "type": "object"}, "Reason": {"properties": {"code": {"description": "Why the number is n/a, e.g. no_official_rate, no_street_rate, uses_usd, street_official_disagree", "title": "Code", "type": "string"}, "text": {"title": "Text", "type": "string"}}, "required": ["code", "text"], "title": "Reason", "type": "object"}, "Street": {"properties": {"rate": {"description": "Units of the currency per 1 USD: median of trading platforms for the day (USDT taken as 1 USD)", "title": "Rate", "type": "string"}, "sources": {"title": "Sources", "type": "integer"}}, "required": ["rate", "sources"], "title": "Street", "type": "object"}, "Error": {"properties": {"error": {"$ref": "#/components/schemas/ErrorBody"}}, "required": ["error"], "title": "Error", "type": "object"}, "RiskQuery": {"properties": {"date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "format": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}, "period": {"default": "360", "description": "30, 90, 180, 360 or ytd (since January 1)", "title": "Period", "type": "string"}}, "title": "RiskQuery", "type": "object"}, "RiskCountry": {"properties": {"country": {"title": "Country", "type": "string"}, "name": {"title": "Name", "type": "string"}, "kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "country, territory or uninhabited", "title": "Kind"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "currency_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency Name"}, "currency_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "own, union, uses or parallel", "title": "Currency Role"}, "value_lost": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "1 - rate(start) / rate(end) at the street rate; below zero - the currency gained", "title": "Value Lost"}, "value_lost_pct": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value Lost Pct"}, "start": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Start"}, "method": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "daily (daily street rate) or monthly (WFP, FEWS NET monthly market series)", "title": "Method"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "group": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Group"}, "na": {"anyOf": [{"$ref": "#/components/schemas/Reason"}, {"type": "null"}]}, "street_note": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Which street sources were not used on the end day and why", "title": "Street Note"}, "url": {"title": "Url", "type": "string"}}, "required": ["country", "name", "url"], "title": "RiskCountry", "type": "object"}, "RiskMap": {"properties": {"beta": {"title": "Beta", "type": "boolean"}, "notice": {"title": "Notice", "type": "string"}, "attribution": {"title": "Attribution", "type": "string"}, "terms": {"title": "Terms", "type": "string"}, "map": {"title": "Map", "type": "string"}, "date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "title": "Date"}, "period": {"title": "Period", "type": "string"}, "period_days": {"title": "Period Days", "type": "integer"}, "legend": {"items": {"$ref": "#/components/schemas/Group"}, "title": "Legend", "type": "array"}, "countries": {"items": {"$ref": "#/components/schemas/RiskCountry"}, "title": "Countries", "type": "array"}, "notes": {"items": {"$ref": "#/components/schemas/Note"}, "title": "Notes", "type": "array"}}, "required": ["beta", "notice", "attribution", "terms", "map", "period", "period_days", "legend", "countries", "notes"], "title": "RiskMap", "type": "object"}, "FactsQuery": {"properties": {"date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}}, "title": "FactsQuery", "type": "object"}, "StablecoinDaysQuery": {"properties": {"from": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 30 days before `to`", "title": "From"}, "to": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full UTC day", "title": "To"}}, "title": "StablecoinDaysQuery", "type": "object"}, "CountryQuery": {"properties": {"date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "Date"}, "period": {"default": "360", "description": "Days for value lost (1-3650) or ytd", "title": "Period", "type": "string"}}, "title": "CountryQuery", "type": "object"}, "DaysQuery": {"properties": {"from": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - 30 days before `to`", "title": "From"}, "to": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "description": "YYYY-MM-DD; default - the last full past day", "title": "To"}, "format": {"default": "json", "description": "json or csv", "title": "Format", "type": "string"}}, "title": "DaysQuery", "type": "object"}}, "securitySchemes": {"ApiKeyAuth": {"type": "http", "scheme": "bearer"}}}, "servers": [{"url": "https://vitalitynode.com", "description": "Production"}]}