← 金融与货币

历史汇率

GET /historical/:date

检索任何特定过去日期的汇率。在 URL 路径中提供 YYYY-MM-DD 格式的日期,可选按基础货币和目标货币符号筛选。适用于生成历史发票、审计过往交易、回测交易策略和构建汇率图表。数据来源于 ECB 每日参考汇率。

参数

date 必填

Date in URL (YYYY-MM-DD)

base 可选 默认: EUR

Base currency

symbols 可选

Target currencies

请求示例

基本用法
curl "https://nordapi.ee/api/v1/historical/2026-03-15?base=USD"
Rates on a specific date with USD base
curl "https://nordapi.ee/api/v1/historical/2026-03-15?base=USD"
EUR rates for specific currencies on a date
curl "https://nordapi.ee/api/v1/historical/2026-01-01?base=EUR&symbols=NOK,SEK,DKK"
Historical rates on New Year's Day 2025
curl "https://nordapi.ee/api/v1/historical/2025-01-02?base=GBP&symbols=USD,EUR"

实时响应

HTTP 404: {
  "error": "No rates available for this date",
  "message": "Exchange rates are not available for the requested date.",
  "success": false
}

响应示例

{"success":true,"base":"USD","date":"2026-03-15","rates":{"EUR":0.921,"GBP":0.793}}