Authentication
Our API requires authentication for all endpoints. You must include your API token in the request headers using the Authorization header.
How to authenticate?
Include your API token in the request header as follows:
Example: Using cURL
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/latest
Example: Using JavaScript (fetch API)
fetch("https://api.plenix.net/v1/currency-converter/latest", {
headers: {
"Authorization": "Bearer YOUR_API_TOKEN"
}
})
.then(response => response.json())
.then(data => console.log(data));
Example: Using Postman
1. Open Postman and create a new request.
2. Set the request type to GET.
3. Enter the URL:
https://api.plenix.net/v1/currency-converter/latest4. Go to the Headers tab and add:
Key: Authorization
Value: Bearer YOUR_API_TOKEN
5. Click Send to receive the response.
Usage
Our API provides endpoints to retrieve the latest exchange rates, historical data, and time series data. Below are the endpoints and their parameters.
Latest Rates
Fetch the latest exchange rates, updated daily around 16:00 CET.
Parameters:
- from: (Required) The base currency (3-letter code, e.g., EUR, USD).
- to: (Required) The target currency (3-letter code, e.g., USD, GBP).
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/latest?from=EUR&to=USD
{
"base": "EUR",
"date": "2025-01-29",
"rates": {
"AUD": 1.671,
"BGN": 1.9558,
"BRL": 6.0791,
"CAD": 1.5011,
"..." : "..."
}
}
Historical Rates
Retrieve exchange rates for a specific past date.
Parameters:
- date: (Required) The specific date for historical rates (format: YYYY-MM-DD).
- amount: (Optional) Amount to convert from the base currency.
- from: (Required) The base currency (3-letter code).
- to: (Required) The target currency (3-letter code).
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/historical?amount=1&from=EUR&to=USD&date=1999-01-04
{
"base": "EUR",
"date": "1999-01-04",
"rates": {
"USD": 1.1819
}
}
Time Series Data
Fetch exchange rates over a specific period.
Use this endpoint to fetch historical exchange rates over a specific date range. You need to provide the following parameters:
- start_date: (Required) The start date of the period (format: YYYY-MM-DD).
- end_date: (Required) The end date of the period (format: YYYY-MM-DD).
- from: (Required) The base currency (3-letter code, e.g., EUR, USD).
- to: (Required) The target currency (3-letter code, e.g., USD, GBP).
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/timeseries?start_date=2000-01-01&end_date=2000-12-31&from=EUR&to=USD
{
"base": "EUR",
"start_date": "1999-12-30",
"end_date": "2000-12-29",
"rates": {
"1999-12-30": {
"AUD": 1.5422,
"CAD": 1.4608,
"CHF": 1.6051,
"CYP": 0.57667,
"...": "..."
},
"2000-01-03": {
"AUD": 1.5346,
"CAD": 1.4577,
"CHF": 1.6043,
"CYP": 0.5767,
"...": "..."
},
"...": "..."
}
}
Available Currencies
Get a list of all supported currencies.
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/currencies
{
"AUD": "Australian Dollar",
"CAD": "Canadian Dollar",
"CHF": "Swiss Franc",
"GBP": "British Pound",
"USD": "United States Dollar",
"..." : "..."
}
Currency Conversion
Convert a specific amount from one currency to another.
Parameters:
- amount: (Required) The amount to convert from the base currency.
- from: (Required) The base currency (3-letter code).
- to: (Required) The target currency (3-letter code).
curl -H "Authorization: Bearer YOUR_API_TOKEN" -s https://api.plenix.net/v1/currency-converter/convert?amount=10&from=EUR&to=USD