Quick Start


To get a list of exchange rates compared to 1 United States Dollar (USD), simply go a GET call to the following endpoint:

GET  https://exchange.geekmy.co/api/v1/rates/

The resulting JSON is a list of objects, as follows:

[
    {"code":"AED", "rate":3.67311, "updated":"2016-06-07T03:00:02.109916Z"},
    {"code":"AFN", "rate":69.065001, "updated":"2016-06-07T03:00:02.181608Z"},
    {"code":"ALL", "rate":121.9719, "updated":"2016-06-07T03:00:02.032979Z"},
    {"code":"AMD", "rate":478.079998, "updated":"2016-06-07T03:00:02.164678Z"},
    {"code":"ANG", "rate":1.788725, "updated":"2016-06-07T03:00:02.206549Z"},
    ...
    ... and so forth ...
]

Each of the objects will contain the following data:

code The currency code, in capital letters.
rate Exchange rate of the currency against 1 USD.
updated Last updated time of the returned rate.

Currency Conversion Endpoint


If you want to convert any mount of one currency to another, or to simply get the exchange rate, use the following endpoint:

GET  https://exchange.geekmy.co/api/v1/convert/

The endpoint accepts three parameters that needs to be passed as search queries:

Parameter Required? Description
from Required Three-digit currency code for the base currency (i.e. currency to convert from)
rate Required Exchange rate of the currency against 1 USD.
amount Optional Pass an amount to be converted. Otherwise the endpoint will assume a value of 1

On successful call, the endpoint will return the following:

GET https://exchange.geekmy.co/api/v1/convert/?from=myr&to=usd

{
    "status": "success",
    "last_updated": "2016-06-06T03:25:01.481Z",
    "timestamp": "2016-06-07T03:49:02.192Z",
    "from":"MYR",
    "to":"USD",
    "amount": 1,
    "converted_amount": 0.24473872916967493,
    "rate": 0.24473872916967493,
    "message": "Converted MYR 1 to USD 0.24473872917.",
}
Parameter Type Example Values Description
status string "success", "error" The status of the call.
last_updated date string 2016-06-06T03:25:01.481Z The last updated timestamp of the currency conversion in use.
timestamp date string 2016-06-06T03:25:01.481Z The timestamp of the call.
from string "MYR" The base currency to convert from.
to string "USD" The currency to convert to.
amount float 1.00, 1 The amount used in the final conversion. Defaults to 1
converted_amount float 2.40, 0.95 The amount after currency conversion.
rate float 2.40, 0.95 The currency conversion rate.
message string - Informative or error message.

Rate Limits


To maintain fair use and keep cost of running this service acceptable, there is a limit of 1 call every minute for every host. This rate limit is implemented loosely, so you can actually make up to 1,440 calls every 24 hours.

However, if there's a need to have a much higher rate, please get in touch.

About


Firdouss Ross @geekmy

After being frustrated of getting a reliable currency exchange rate API that is straight-forward, I decided to build one.

Me

Firdouss Ross is a web application developer, with more emphasis on front-end development. He dives into loads of HTML5, CSS3 and JavaScript of many flavours on a daily basis. He leads the development team in ACE EdVenture Pixel and also the CTO of UniDigest.com

Occasionally, when he is bored, he will spawn up small websites (like this one!), or fork something that solves small problems. Check out some other small problems that are (probably) solved:

On other times, he sometimes write, read, listen and of course, ride.

Contact


Need a limit upgrade? Or just want to say Coucou? Get in touch!