linerturkey.blogg.se

Currency exchange api
Currency exchange api










The current subscription plan does not support this API endpoint. The maximum allowed API amount of monthly API requests has been reached. The requested API endpoint does not exist. No API Key was specified or an invalid API Key was specified. "info": "Your monthly API request volume has been reached.

CURRENCY EXCHANGE API CODE

Errors always come with an error code and a description.Įxample Error: The following error is returned if your monthly API request volume has been exceeded. Whenever a requested resource is not available or an API call fails for another reason, a JSON error is returned. In this case, the size of your API response will be normal. or new results with an entirely new set of ETag and Date objects indicating that new data has been accessed.

currency exchange api

In this case, the size of the API response will be as small as 0.2kb

  • the results from your initial API request along with a 304 – Not Modified HTTP header indicating that no change has occured.
  • If-None-Match: "1872ade88f3013edeb33decd74a4f947"ĭepending on whether or not your result set has updated since your last API request, the API will return either: Moreover, you will need to add the If-Modified-Since HTTP header to your API request containing the date and time data from your last request. Once you make another API request, make sure to include the If-None-Match HTTP header abd set ut to your previously generated ETag value. This data must be cached along with the entire API response in order for ETags to work. Your initial request to the Fixer API will create an ETag object containing a unique ETag key and a Date object containing the exact date and time at which the data was last modified. (Definition by ) ETags - Quickstart Guide Step 1 If the ETag at the server has not changed, a "Not Modified" message is returned, and the cached data is used. Whenever a resource is requested (via its URL), the data and ETag are retrieved and stored in the Web cache, and the ETag is sent along with subsequent requests. The ETag is an identifier assigned to a data resource in a server, and if that resource is ever updated at the server, the ETag is changed. HTTP ETags are a way of reducing the load on your back-end by requesting new Fixer data only if rates have changed since the last API response.Īn ETag is a part of the HTTP protocol and one of the several mechanisms used for cache validation.

    currency exchange api

    All data is returned in standard JSON format and can be parsed easily using any programming language.Įxample Response: Below you will find an example API response carrying a number of common world currencies, all relative to the currency EUR and time stamped at the exact time they were collected.Īs illustrated above, the API's response - when queried for real-time exchange rates - always contains a timestamp object containing a standard UNIX time stamp indicating the time the given exchange rate data was collected, a base object containing the three-letter currency code of the base currency, a date object containing the date the given exchange rate data was collected, and a rates object containing the actual exchange rate data.įurther below, in the Endpoints section, the API response structure will be discussed in detail. Exchange rates delivered by the Fixer API are by default relative to EUR.










    Currency exchange api