There is no installation process when using the REST JSON/XML API. Just start using the REST services by making HTTP GET requests to the Global Exchange API server. You can make requests from any client that can make HTTP requests. That could be a browser, a mobile app, or a desktop application. You name it.
For instance, to get information on all supported currencies, just send a
GET request to the
Get all supported currencies:
To get information on a specific currency, add a unique identifier to the request that explicitly or implicitly identify the currency. Currencies are explicitly identified by an ISO 4217 currency code or number.
Get currency information on US dollar (ISO 4217 currency code USD):
The currency can also be implied from a country of the world.
Get currency information on the currency used in Colombia (ISO 3166 country code CO):
The country can be implied from an IP address.
Get currency information on the currency used by the country related to IP address 220.127.116.11:
Yet again, the IP address can be that of the remote client. The value
0 (zero) is used for that. In requests, the
0 (zero) identifier is translated into the IP address of the remote client.
Get currency information on the currency used by the country related to your IP address:
Most request to the JSON/XML API require a country or currency identifier to identify the requested resource.
Countries can be identified either explicitly from a country code or implicitly from a location in the world
Currencies can be identified either explicitly from a currency code or implicitly from a location in the world
The GET requests all query information on the resources that the JSON/XML API provides. All URLs represents a resource located on the Global Exhange API server. The accepted URLs follow this format:
resource part is mandatory. It is the type of information you want to get from the server. If the resource is a collection, like the country and currencies resources, requesting just the resource will return the entire collection. The
id is for identifying a single piece of resource to get. In some cases the resource request must be further refined using
query string arguments.
exchange resource to exchange an amount from one currency to another. Specify an amount, a currency to exchange from, and a currency to exchange to.
Convert 123.45 USD to the preferred currency of the remote client:
to arguments can be any currency identifier.
countries resource provides information about supported countries.
Get information on Denmark:
id argument can be any country identifier. If omitted, then all known countries are returned.
currencies resource provides information about supported currencies.
Get information on the currency used in Denmark:
id argument can be any currency identifier. If omitted, then all known currencies are returned.
ipaddress resource does not accept any identifiers. It simply returns your host IP address
Get your IP address:
If you try to enter one of the examples above into your browser, the response you receive will either be in XML or JSON depending on your browser settings. The browser adds an Accept header to your request, which specifies the preferred response representation.
Content negotiation is a mechanism that makes it possible to serve different representations of a resource at the same URI. It is up to you as a client to inform the server which representation you accept in the response. With the JSON/XML API there are three ways to do that.
The Request Accept HTTP header lists accepted MIME types. To get the response in either JSON or XML, make
application/xml the accepted MIME type.
Get all supported countries using request accept header for content negotiation:
format=xml query string parameter to the request.
Get all supported countries in XML by adding a
format=xml query string parameter:
Extent the URI path with
Get all supported countries in XML by extending the URI path with
The first month is free. After the first month, you must subscribe to the API to get a subscription token. The subscription token must be added to all requests in a
token query string argument. If you require less than 1000 request/month the API continues to be free. Just make a free subscription.