{"uid":"cap_n4QCDEJPidLEJNNH6Gp2A","slug":"ecb-foreign-exchange-rates-api-e2e6af3d","name":"ECB Foreign Exchange Rates API","description":"Official daily foreign exchange reference rates from the European Central Bank (~30 currencies vs EUR, published each business day around 16:00 CET), rebased on request to any listed currency via EUR cross-rates and filtered to a requested symbol list; returns the reference date, the rate table and the ECB source attribution.","url":"https://4yearcycle.com/x402/fx-rates","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"base":{"type":"string","default":"EUR","pattern":"^[A-Za-z]{3}$","examples":["EUR","USD","GBP"],"description":"Base currency as ISO 4217 code (case-insensitive). EUR or any of the ~30 ECB-listed currencies (USD, GBP, JPY, CHF, ...); non-EUR bases are computed as cross-rates via EUR. Default: EUR."},"symbols":{"type":"string","examples":["USD,GBP,JPY","CHF"],"description":"Optional comma-separated ISO 4217 codes to restrict the rate table to (case-insensitive); codes the ECB does not list are ignored. Empty = all listed currencies."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["base","date","rates","source","notice"],"properties":{"base":{"type":"string","description":"Base currency of the rate table (ISO 4217)"},"date":{"type":"string","description":"ECB reference date of the rates (YYYY-MM-DD, last business day)"},"rates":{"type":"object","description":"Units of each quoted currency per 1 unit of base, e.g. rates.USD = USD per base. ECB publishes vs EUR; other bases are cross-rates via EUR rounded to 6 decimals.","additionalProperties":{"type":"number"}},"notice":{"type":"string","description":"ECB attribution notice: the underlying data is available free of charge from the ECB; cross-rates are computed values"},"source":{"type":"string","description":"Always \"ECB\" — European Central Bank euro foreign exchange reference rates"}}}}}}},"responseSchema":{"type":"json","example":{"base":"USD","date":"2026-08-17","rates":{"CHF":0.809885,"EUR":0.862589,"GBP":0.737514,"JPY":159.225395},"notice":"ECB euro foreign exchange reference rates, available free of charge at ecb.europa.eu; non-EUR bases are cross-rates computed via EUR.","source":"ECB"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EHh0BroGWD4ZUDstVZ1Bf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns European Central Bank (ECB) euro foreign exchange reference rates for ~30 currencies, with support for non-EUR base currencies via cross-rates.","exampleAgentPrompt":"Can you look up the current ECB foreign exchange rates with USD as the base currency and give me the rates for EUR, GBP, CHF, and JPY?","exampleUseCases":[{"title":"Multi-currency invoice reconciliation","prompt":"I need today's ECB reference rates for EUR, GBP, and CHF with USD as the base — I'm reconciling invoices across those currencies."},{"title":"Travel budget conversion","prompt":"What are the latest ECB exchange rates from EUR to JPY, USD, and GBP? I'm planning a trip and want official rates."},{"title":"Financial report FX snapshot","prompt":"Fetch me the current ECB FX rates for all available currencies using EUR as the base so I can record today's official rates in our financial report."}],"resultDescription":"A JSON object containing the base currency, ECB reference date (last business day), a map of currency codes to exchange rates per 1 unit of the base, the data source ('ECB'), and an attribution notice. Non-EUR bases are computed as cross-rates via EUR, rounded to 6 decimal places.","failureModes":["Unsupported or misspelled currency code returns no rate or is silently ignored","Non-ECB-listed currency symbols are dropped from the result","ECB data may be one business day stale on weekends or holidays","Invalid ISO 4217 format in 'base' or 'symbols' may return errors or empty results","Payment failure (x402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need authoritative, ECB-sourced euro foreign exchange reference rates — especially for compliance, financial reporting, or regulatory contexts where the ECB is the canonical source. Prefer it over commercial forex APIs when official European reference data matters, or when you need cross-rates among ~30 ECB-listed currencies without requiring a dedicated forex subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T00:32:02.570Z","isFirstParty":false}