API Examples

Example 1

Call

https://xurrency.com/api/eur/gbp/1.5

Result

{"result":{"updated_at":"2010-10-02T02:06:00Z", "value":1.3014,"target":"gbp","base":"eur"}, "code":0, "status":"ok"}

Example 2

Call

https://xurrency.com/api/eur/xxx/yyy/1.5

Result

{"code": 2, "message": "Currencies are not valid", "status": "fail"}

Example 3

Call

https://xurrency.com/api/eur/gbp/1000000000

Result

{"code": 1, "message": "Amount should be between 0 and 999999999", "status": "fail"}

Example 4

Call

https://xurrency.com/api/eur/gbp/usd/cad/1.5

Result

{"result":[{"updated_at":"2011-04-14T17:49:00Z", "value":1.3287, "target":"gbp", "base":"eur"}, {"updated_at":"2011-04-14T17:49:00Z", "value":2.17275, "target":"usd", "base":"eur"}, {"updated_at":"2011-04-14T17:49:00Z", "value":2.0877, "target":"cad", "base":"eur"}],"code":0,"status":"ok"}

Example 5

Call

https://xurrency.com/api/eur/usd/1?key={KEY}&date=20100405

Result

{"result":{"updated_at":"2010-04-05T00:00:00+00:00", "value":"1.3487", "target":"usd", "base":"eur"}, "code":0,"status":"ok"}