Description
TheExchangeRatesAPI.live() method is used to communicate with this endpoint as seen below:
ExchangeRatesAPI.live(base, Optional[target])
Query Parameters
Below are the query parameters for this method:string
required
The base currency to get the latest exchange rates for, e.g GBP.
It must be a currency code supported by AbstractAPI.
string
The target currency or currencies that the base currency is converted into.
A list of comma separated currency codes is also permitted, e.g “target=USD,CAD,BRL”.
This will limit the response data to the specified currency codes.
Usage
Below is a code snippet to query theExchangeRatesAPI.live() method:
Response Fields
String
The base currency used to make the request
Integer
A Unix timestamp of when the returned data was last updated
Object
A JSON object of currencies supported by AbstractAPI and their rates. Response is limited if target currencies are specified in the request.
Integer
The status code of the response.
Limit response data
You can limit the response data by specifying a comma-separated list of target currency codes in your query.Below is a code snippet to limit response data: