Fixer.io support

We are support Fixer.io API. If you implemment they API in you application, you can re-use it for CurrencyCentral.

Basic HTTP Authentication

Our base url:

https://currencycentral.org/api/

Just use your API key to authenticate

https://currencycentral.org/api/latest
        ? access_key = API_KEY

HTTP Header Authentication

If you do not wish to specify your API Key in the URL parameters, you may instead provide it as a Token in the HTTP Authorization Header.

Authorization: Token API_KEY

The format of the HTTP header must be exactly as above (replacing API_KEY with a valid API key). The API key should be unquoted. If both HTTP header and URL parameter are provided, we will use the value from the URL and ignore the header.

Using Header Authentication are recommended for security reason. Request URL can be visible for middle services like proxy.

API data example

All data is returned in standard JSON format and can be parsed easily using any programming language.

{
    "success": true,
    "base": "EUR",
    "date": "2020-06-05",
    "rates": {
        "USD": 1.133,
        "AUD": 1.6227,
        "JPY": 123.77,
        "RUB": 77.8155,
        /* ... */
    }
}

As illustrated above, the API's response always contains a base object the three-letter currency code of the base currency, a date object containing the date the given official exchange rate data, and a rates object containing the actual exchange rate data.

Endpoints

CurrencyCentral have two endpoints.

Latest

Return actual official exchange rates. Just append latest to basic url.

https://currencycentral.org/api/latest

Important: our server use UTC timezone. Please check date field on response to be sure your get right day. Or just use historical requests.

Historical

You can query the CurrencyCentral API for historical rates by appending a date (format YYYY-MM-DD) to the base URL.

https://currencycentral.org/api/2020-02-02

Historical rates are available all the way back to the year of 1999.

SSL Connection

All subscription plans available on CurrencyCentral come with 256-bit SSL encryption. To connect to the API via SSL, simply use the https protocol instead of standard http.

JSONP Callbacks

The CurrencyCentral API comes with support for JSONP Callbacks. This feature enables you to specify a function name, pass it into the API's callback GET parameter and cause the API to return your requested API response wrapped inside that function.

https://currencycentral.org/api/latest
              ? access_key = API_KEY
              & callback = MY_FUNCTION

In the example call above we are requesting the API to use the callback name MY_FUNCTION.

Example response wrapped inside MY_FUNCTION callback function.

/**/MY_FUNCTION({
    "success": true,
    "base": "EUR",
    "date": "2020-06-05",
    "rates": {
        "USD": 1.133,
        "AUD": 1.6227,
        "JPY": 123.77,
        "RUB": 77.8155,
        /* ... */
    }
});

Errors

Whenever a requested resource is not available or an API call fails for another reason, a JSON error is returned. Errors always come with an error code and a description.

Example Error: The following error is returned if your monthly API request volume has been exceeded.

{
    "success": false,
    "error": {
        "code": 104,
        "info": "Your monthly API request volume has been reached. Please upgrade your plan."
    }
}

Other errors

Error Code Description
404 The requested resource does not exist.
101 No API Key was specified or an invalid API Key was specified.
102 The contract this API request is coming from is inactive.
103 The requested API endpoint does not exist.
104 The maximum allowed API amount of monthly API requests has been reached.
106 The current request did not return any results.
201 An invalid base currency has been entered.
202 One or more invalid symbols have been specified.
203 Contract connected to API Key don't support currency.
302 An invalid date has been specified.

Latest Rates Endpoint

Latest endpoint will return exchange rates for current day. Please remeber that our server use UTC timezone and current data for you can be different. Check date field in JSON response to be sure.

API Request Format

https://currencycentral.org/api/latest
    ? access_key = API_KEY
    & symbols = GBP,JPY,EUR

Request Parameters

Param Description
access_key [Required] Your API Key.
symbols [Required] Enter a list of comma-separated currency codes to limit output currencies.

API Response Format

{
    "success": true,
    "base": "EUR",
    "date": "2017-10-11",
    "rates": {
        "USD": 1.1856,
        "AUD": 1.5175,
        "JPY": 133.12,
        "RUB": 68.404
    },
}

Response Objects

Object Description
success Returns true or false depending on whether or not your API request has succeeded.
base Returns the three-letter currency code of the base currency used for this request.
rates Returns exchange rate data for the currencies you have requested.

Historical Rates Endpoint

Historical rates are available all the way back to the year of 1999. You can query the CurrencyCentral API for historical rates by appending a date (format YYYY-MM-DD) to the base URL.

API Request Format

https://currencycentral.org/api/2020-02-02
    ? access_key = API_KEY
    & symbols = GBP,JPY,EUR

Request Parameters

Param Description
YYYY-MM-DD [Required] A date in the past for which historical rates are requested.
access_key [Required] Your API Key.
symbols [Required] Enter a list of comma-separated currency codes to limit output currencies.

API Response Format

{
    "success": true,
    "base": "EUR",
    "date": "2020-02-02",
    "rates": {
        "USD": 1.1052,
        "AUD": 1.6494,
        "JPY": 120.35,
        "RUB": 70.3375
    },
    "historical": true
}

Response Objects

Object Description
success Returns true or false depending on whether or not your API request has succeeded.
historical Returns true if a request for historical exchange rates was made.
base Returns the three-letter currency code of the base currency used for this request.
rates Returns exchange rate data for the currencies you have requested.