CurrencyBeacon provides a simple REST API with real-time and historical exchange rates for 168 world currencies. We deliver currency pairs and data in universally usable JSON format - compatible with any programming languages and any of your applications.
Our real-time and historical exchange rate data is retrieved from several major forex data providers, central banks and various commercial vendors in real-time, validated, processed and delivered in seconds within the market window.
By providing the most representative forex market value available ("midpoint" value) for every API request, our API powers currency converters, mobile applications, financial software components and back-office systems all around the world.
Central banks and currency traders define the rates at which they are willing to buy/sell a specific currency. The real-time mid-market rate is the midpoint between demand and supply at any point in time, making it the most accurate rate. The mid-market rate is the rate you will find on independent sources such as Yahoo Finance, Google Finance, Xignite and XE.
Please note that most commercial application add a margin to cover processing costs before rates are given to consumers.
All requests to our API should be directed to the URL below:
CurrencyBeacon currently supports 5 API endpoints. These are
Below you will find a list of parameter that each endpoint requires and a description of what the API
||This endpoint provides real-time rates of all currencies we support. Please note that these are mid-market rates and margins are typically added by our users before consumers have access to this endpoint. The endpoint requires the base currency and a list of symbols to be returned. You can refer to a list all supported currencies here.|
||This service provides historical exchange rate data for every past day all the way back to the year of 1996. Historical rates may be accessed by simply attaching the date parameter with a valid date (Format: YYYY-MM-DD) to the API's historical endpoint. We support the base currency and list of symbols to be returned. View all supported currencies here.|
If you have the startup or the professional plan, then you have access to the timeframe
service, you may
exchange rates for a time-period of your choice.
To use this endpoint, simply specify your preferred time frame, consisting of a
||This endpoint gives you access to all the currencies we support together with the name of the currencies and the list of countries that use that currency. You can view a list of all supported currencies here.|
An API key is required for every request to the CurrencyBeacon API. Your API key is used to
with our API, and it should be provided as a
api_key URL parameter.
The API key can be retrieved from the account pages. If you do know your API key please signup for a free account key.
api_key should be appended to the url request like in the example below
curl -G https://api.currencybeacon.com/v1/latest?api_key=baa9dc110aa712sd3a9fa2a3dwb6c01d4c875950dc32vs
Every API request returns an appropriate HTTP reponse code and below is a list of what they mean with regards to the API
||Success Everything went smooth.|
||Unauthorized Missing or incorrect API token in header.|
||Unprocessable Entity meaning something with the message isn’t quite right, this could be malformed JSON or incorrect fields. In this case, the response body contains JSON with an API error code and message containing details on what went wrong.||
||Internal Server Error This is an issue with CurrencyBeacon's servers processing your request. In most cases the message is lost during the process, and we are notified so that we can investigate the issue.|
||Service Unavailable During planned service outages, CurrencyBeacon API services will return this HTTP response and associated JSON body.||
||Too many requests. API limits reached.|
Whenever the CurrencyBeacon server detects an input error it will return an HTTP 422 status code along with a JSON object containing error details:
||Maintenance - The CurrencyBeacon API is offline for maintenance.|
||Unauthorized Missing or incorrect API token.|
||Invalid query parameters.||
||Authorized Subscription level required.|
JSONP and CORS are supported, allowing you to use CurrencyBeacon API entirely in client-side code. For JSONP You just need to specify the callback parameter, eg.
We have a gallery of code samples here. Learn how to use out APi in multiple programming languages.
Feel free to reach out to us if you have an issue with out API our with any questions you might have at [email protected]