Response format
The following section describes the list of supported formats for retrieving the exchange rates.
Supported formats
JSON (default)
The default API response format is JSON. We recommend that you use the default format if your system supports it.
Sample.json
{
"bankId": "NOCB",
"baseCurrency": "NOK",
"quoteType": "Direct",
"rates": {
"2020-09-24": {
"CHF": {
"rate": 1030.66,
"unitMultiplier": 2
},
"CNY": {
"rate": 139.6,
"unitMultiplier": 2
},
"EUR": {
"rate": 11.1023
},
"USD": {
"rate": 9.534
}
}
}
}
XML
Extensible Markup Language (XML) format. Conforms to the W3C XML standard.
Sample.xml
<?xml version="1.0" encoding="utf-8"?>
<ExchangeRates xmlns="http://schemas.fluentax.com/ExchangeRates/1.0/ExchangeRates">
<BankId>NOCB</BankId>
<BaseCurrency>NOK</BaseCurrency>
<QuoteType>Direct</QuoteType>
<Rates effectiveDate="2020-09-24">
<Rate currency="CHF" value="1030.66" unitMultiplier="2" />
<Rate currency="CNY" value="139.6" unitMultiplier="2" />
<Rate currency="EUR" value="11.1023" />
<Rate currency="USD" value="9.534" />
</Rates>
</ExchangeRates>
CSV
Comma-separated values (CSV) text file format. Conforms to the RFC 4180 standard.
Parameter | Value |
---|---|
Encoding | UTF-8 (without BOM) |
Field separator | , (comma) |
Line terminator | LF |
Columns | BankId , From Currency , To Currency , Effective Date , Exchange Rate , Unit |
Date format | YYYY-MM-DD (ISO 8601) |
Thousands separator | no thousands separator used |
Decimal separator | . (decimal point) |
Sample.csv
BankId,From Currency,To Currency,Effective Date,Exchange Rate,Unit
NOCB,CHF,NOK,2020-09-24,1030.66,100
NOCB,CNY,NOK,2020-09-24,139.6,100
NOCB,EUR,NOK,2020-09-24,11.1023,1
NOCB,USD,NOK,2020-09-24,9.534,1
Excel (xlsx)
Office Open XML SpreadsheetML File Format. Commonly known as .xlsx or Excel file format.
Content negotiation
The Fluentax Exchange Rates API supports several ways to set the requested response format.
Response format | Accept header | URL format | Query format |
---|---|---|---|
JSON (default) | application/json | .json | json |
XML | application/xml | .xml | xml |
CSV | text/csv | .csv | csv |
Excel (xlsx) | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx | xlsx |
Accept header
Add the header Accept: <requested format>
to your request.
curl https://fx-api.fluentax.com/v1/Banks/AECB/DailyRates/Latest \
-H "Accept: application/json"
-H "Authorization: Bearer <your access token>" \
Query parameter
Append the query parameter ?format=<requested format>
to the end of the URL.
curl https://fx-api.fluentax.com/v1/Banks/AECB/DailyRates/Latest?format=xml \
-H "Authorization: Bearer <your access token>" \
URL suffix
Append the suffix .<requested format>
to the end of the request URL.
curl https://fx-api.fluentax.com/v1/Banks/AECB/DailyRates/Latest.csv \
-H "Authorization: Bearer <your access token>" \