GET /convert/batch
Teisendage a single amount from one base currency into multiple target currencies in a single API call. Tagastab converted amount and vahetuskurss for each target currency. Far more efficient than making individual conversion requests when you need to display prices in multiple currencies simultaneously, nagu on international pricing pages or multi-currency shopping carts.
from
kohustuslik
Source currency
amount
kohustuslik
Amount
to
kohustuslik
Comma-separated target currencies
| Nimi | Kohustuslik | Vaikeväärtus | Kirjeldus |
|---|---|---|---|
from |
Jah | - | Source currency |
amount |
Jah | - | Amount |
to |
Jah | - | 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"
{
"amount": 100.0,
"from": "USD",
"results": {
"EUR": {
"amount": 86.767896,
"rate": 0.86767896
},
"GBP": {
"amount": 75.707592,
"rate": 0.75707592
},
"NOK": {
"amount": 974.273319,
"rate": 9.74273319
}
},
"success": true
}
{"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}}}