認證同限額 資料 endpoint 可以匿名試用:每個 IP 每分鐘 12 次、每小時 100 次。加 key 之後用帳戶每月額度。
bash · header COPY
Authorization: Bearer YOUR_KEY
X-RateLimit-Remaining: 9999
X-RateLimit-Reset: 1788220800 解釋資料新鮮度嘅欄位 `source` 係來源類別,`market_session` 係市場狀態,`data_updated_at` 係數值寫入時間。三個都應該保存。
Endpoints GET /v1/latest[/{BASE}]現時匯率,可以全部返回或者用 symbols 篩選。
GET /v1/{YYYY-MM-DD}[/{BASE}]指定日期同基準貨幣嘅歷史快照。
GET /v1/convert/{FROM}/{TO}[/{AMOUNT}] · POST /v1/convert金額換算,支援單次 GET 同批量 POST。
GET /v1/rate/{slug}用 slug 返回單一貨幣對。
GET /v1/range每日時間序列,支援分頁同下載。
GET /v1/currencies支援貨幣清單,唔接受參數。
GET /v1/account帳戶、方案、現有 key 同今月用量。
錯誤 錯誤統一用 `{ result: "error", code, message }`。429 會加 `Retry-After`;資料來源失敗時唔會偷偷轉用假數。
json · error COPY
{
"result": "error",
"code": "missing_parameter",
"message": "missing required parameter: symbols"
} English complete field-by-field reference →
配合你的技術堆疊使用 同一個請求可用於 curl、Python 和 JavaScript。評估 API 無需密鑰。
開啟快速入門 → curl Python JavaScript / Node.js
複製程式碼 curl -fsS --max-time 10 "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP" from urllib.request import Request, urlopen
import json
request = Request("https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP")
with urlopen(request, timeout=10) as response:
data = json.load(response)
print(data["rates"]["EUR"]) const response = await fetch("https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP", {
signal: AbortSignal.timeout(10_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data.rates.EUR); 回應範例 {
"result": "success",
"base": "USD",
"source": "live",
"sources": {
"EUR": "live",
"GBP": "live"
},
"market_session": "open",
"timestamp": "2026-06-15T12:00:00Z",
"data_updated_at": "2026-06-15T12:00:00Z",
"effective_at": {
"EUR": "2026-06-15T12:00:00Z",
"GBP": "2026-06-15T12:00:00Z"
},
"rates": {
"EUR": 0.86207,
"GBP": 0.74627
},
"derived_symbols": [],
"notice": "Indicative rates, not for settlement."
} rates.EUR 代表 1 USD 對應嘅 EUR 數量。effective_at.EUR 係觀測時間,sources.EUR 顯示來源類別。數值同時間只係示例。
Python → JavaScript / Node.js → Google Sheets → Excel → Go → Swift → Zapier →