{"uid":"cap_PUnsm-nRqaZvTWHYphNKD","slug":"fx-reference-rates-api-historical-rates-8c5a9ee4","name":"FX Reference Rates API – Historical Rates","description":"ECB reference rates on a given date in any base; non-publication days fall back to the previous publication day (as_of).","url":"https://fx-reference-rates.regnotes.workers.dev/v1/rates/historical?utm_source=zero.xyz","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":["date"],"properties":{"base":{"type":"string","pattern":"^[A-Z]{3}$","description":"One of: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"symbols":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"base":"EUR","as_of":"2026-06-30","rates":{"GBP":0.86178,"USD":1.1394},"requested_date":"2026-06-30"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jtwvjaz5t9aaSemDWKq64","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns ECB foreign exchange reference rates for a specific historical date, with any base currency, falling back to the nearest prior publication day if the requested date had no ECB publication.","exampleAgentPrompt":"What were the ECB reference rates on March 15, 2024 with USD as the base currency? Include GBP, EUR, and JPY.","exampleUseCases":[{"title":"Historical invoice currency conversion","prompt":"I need to find the official ECB exchange rate between EUR and USD on November 30, 2023 — it's for an invoice reconciliation and I need the exact ECB rate for that date."},{"title":"Weekend date fallback handling","prompt":"What were the ECB FX rates on Saturday December 23, 2023, using GBP as the base? I know ECB doesn't publish on weekends so just give me the closest prior publication day."},{"title":"Multi-currency portfolio snapshot","prompt":"Can you pull the ECB reference rates for all currencies relative to JPY as the base on January 2, 2024? I want to see what everything was worth in yen at the start of the year."}],"resultDescription":"A JSON object containing the base currency, the actual publication date used (as_of), the originally requested date, and a map of currency codes to exchange rates. If the requested date falls on a non-publication day (weekend or ECB holiday), the as_of field reflects the most recent prior publication date.","failureModes":["Date before ECB data coverage — no historical data available for very early dates","Invalid date format — must be YYYY-MM-DD pattern","Invalid base or symbol currency code — must be one of the 30 supported 3-letter ISO codes","Date in the far future — no ECB data available yet","Malformed symbols parameter — comma-separated 3-letter codes required"],"whenToPreferThis":"Use this endpoint when you need official ECB foreign exchange reference rates for a specific past date, especially for financial reporting, compliance, invoice reconciliation, or audit purposes where the authoritative ECB rate (not a market rate) is required. Prefer this over real-time FX endpoints when historical accuracy and ECB provenance matter. The automatic fallback to the previous publication day makes it reliable even for weekends and holidays.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:05:29.651Z","isFirstParty":false,"canonicalSlug":"fx-reference-rates-api-historical-rates-8c5a9ee4"}