GET /convert/batch
在单次 API 调用中将一种基础货币的金额转换为多种目标货币。返回每种目标货币的转换金额和汇率。当需要同时显示多种货币价格时(如国际定价页面或多币种购物车),比逐个发送转换请求高效得多。
from
必填
Source currency
amount
必填
Amount
to
必填
Comma-separated target currencies
| 名称 | 必填 | 默认值 | 描述 |
|---|---|---|---|
from |
是 | - | Source currency |
amount |
是 | - | Amount |
to |
是 | - | Comma-separated target currencies |
curl "https://nordapi.ee/api/v1/convert/batch?from=USD&amount=100&to=EUR,GBP,NOK"
curl "https://nordapi.ee/api/v1/convert/batch?from=USD&amount=100&to=EUR,GBP,NOK"
curl "https://nordapi.ee/api/v1/convert/batch?from=EUR&amount=250&to=JPY,CNY,INR"
curl "https://nordapi.ee/api/v1/convert/batch?from=USD&amount=5000&to=NOK,SEK,DKK"
HTTP 404: {
"error": "Exchange rate not found",
"message": "The requested exchange rate is not available. Please check your currency codes and try again.",
"success": false
}
{"success":true,"from":"USD","amount":100.0,"results":{"EUR":{"rate":0.865,"amount":86.54},"GBP":{"rate":0.748,"amount":74.81},"NOK":{"rate":9.545,"amount":954.48}}}