{"openapi":"3.1.0","info":{"title":"FXpeek Historical Exchange Rate API","version":"1.0.0","description":"Source-linked historical reference exchange rates for invoices, reporting, CSV export and developer workflows. Returns dated reference data; not a live or transaction quote.","contact":{"name":"FXpeek","url":"https://fxpeek.com/en/api","email":"data@fxpeek.com"},"license":{"name":"Reference data — see terms","url":"https://fxpeek.com/en/terms"},"x-fxpeek-access":{"apiKeyRequired":true,"apiKeyScheme":"x-api-key","apiKeyRequiredNote":"JSON/CSV API endpoints require an x-api-key header; anonymous requests return 401 api_key_required. Free endpoints that need no key: /api/mcp, /api/badge/{pair}, /api/og, /api/ai-feed.","monthlyQuota":"Starter $5/month 5,000 requests; Pro $19/month 50,000; Business $59/month 250,000. All plans include full history per request.","accessNote":"Dated lookups via date=YYYY-MM-DD, CSV export and source-linked values. Send x-api-key; anonymous calls return 401 api_key_required with the current plans. FXpeek's own browser pages, charts, CSV builder previews and widgets need no key (same-origin requests are not billed as API customers).","coverage":"USD, EUR, CNY, JPY, GBP, IDR, VND, THB, PHP, MYR, HKD, KRW, SGD, AUD, CAD (plus USDT/USDC reference endpoints). Southeast Asian and long-tail pairs are first-class, not an afterthought.","source":"ECB reference rates via Frankfurter; per-row source path is retained so a value can be re-checked later.","higherVolumeUrl":"https://fxpeek.com/en/api","termsUrl":"https://fxpeek.com/en/terms"}},"servers":[{"url":"https://fxpeek.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Paid API key. Anonymous requests return 401 api_key_required."}}},"paths":{"/api/rates":{"get":{"operationId":"getLatestRate","summary":"Latest available reference rate for a currency pair","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","example":"USD"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","example":"CNY"}}],"responses":{"200":{"description":"Latest dated reference rate"}}}},"/api/history":{"get":{"operationId":"getHistory","summary":"Dated history for a currency pair (or a single date)","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","example":"USD"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","example":"VND"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":365,"maximum":3650}},{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"date","example":"2024-12-31"}}],"responses":{"200":{"description":"Dated reference history rows"}}}},"/api/csv":{"get":{"operationId":"getCsv","summary":"Dated history as CSV for spreadsheet and reconciliation workflows","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","example":"CNY"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","example":"TRY"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":365}}],"responses":{"200":{"description":"CSV text","content":{"text/csv":{}}}}}},"/api/badge/{pair}":{"get":{"operationId":"getBadge","summary":"shields.io endpoint badge JSON for a currency pair","parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string","example":"usd-eur"}}],"security":[],"responses":{"200":{"description":"shields.io endpoint badge payload"}}}},"/api/mcp":{"post":{"operationId":"mcpRpc","summary":"MCP (Model Context Protocol) Streamable HTTP endpoint: JSON-RPC 2.0","description":"Tools: get_latest_rate(from,to) and get_history(from,to,days|date). get_history with date=YYYY-MM-DD returns requestedDate plus the actual data date (weekends and holidays resolve to the nearest available working day). Reference data only, not a transaction quote.","security":[],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{"200":{"description":"JSON-RPC 2.0 response"}}},"get":{"operationId":"mcpDescribe","summary":"Self-describing probe for the MCP endpoint","security":[],"responses":{"200":{"description":"server name, transport and tool list"}}}},"/api/stablecoin":{"get":{"operationId":"getStablecoinRate","summary":"Reference rate for USDT/USDC pairs (e.g. USDT-CNY)","parameters":[{"name":"pair","in":"query","required":true,"schema":{"type":"string","example":"USDT-CNY"}}],"responses":{"200":{"description":"stablecoin reference rate payload"}}}}}}