GET historics/{from}-{to}.json
Html.Raw(Transl.Api.Documentation.ReturnTodayPrayerTimes)
https://v2.api.forex/historics/{from}-{to}.{format}
Resource URL
{format} | type | optional | decription |
---|---|---|---|
{key} | string | Optional | We use a key to avoid abuse on our API and to log usages. https://v2.api.forex/historics/USD-HKD.json?key=demo& |
{from} | string | Required | The three-letter currency code of the currency you would like to convert from. https://v2.api.forex/historics/EUR-CHF.json?key=demo |
{to} | string | Required | The three-letter currency code of the currency you would like to convert to. https://v2.api.forex/historics/AUD-GBP.json?key=demo |
{format} | string | Required | You can export data to JSON, CSV, or XML https://v2.api.forex/historics/USD-HKD.csv?source=ecb&key=demo |
{source} | string | Optional | Define the currency source. Default api forex mixed source .List of sources Html or Json https://v2.api.forex/historics/USD-HKD.json?source=ecb&key=demo |
{beautify} | string | Optional | Formats the JSON files with the chosen indentation level for optimal readability. https://v2.api.forex/historics/USD-HKD.json?beautify=true |
Parameters
{format} | type | decription | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{infos} | int | Returns informations about the API request
| ||||||||||||||||||||||||||||
historics | date | The date (yyyy-mm-dd) of the given exchange rate data was collected.
|
Example Request
https://v2.api.forex/historics/USD-HKD.json?source=apiforex&key=demo
Example Result
{ "success": true, "infos": { "timestamp": "2025-04-29T07:40:25Z", "expire": "2025-04-29T08:40:25Z", "from": "USD", "to": "HKD", "converted": false, "source": { "id": "apiforex", "name": "Api Forex", "base_currency": "USD", "country": "World", "note": "You are using the demonstration key of api.forex. Register your own key to gain full access to the API." }, "terms": { "privacy": "https://api.forex/privacy", "legacy": "https://api.forex/terms" }, "usage": { "api_count": 10, "pack": "Bronze" }, "note": "Bronze Pack can retreive only 1 year of historicals data, upgrade your pack if you need more" }, "historics": { "2020-12-01": { "open": 7.7511, "high": 7.7528, "low": 7.7507, "close": 7.7522, "date": 1606780800 }, "2020-11-30": { "open": 7.7507, "high": 7.7513, "low": 7.7501, "close": 7.7504, "date": 1606694400 }, "2020-11-27": { "open": 7.7504, "high": 7.7513, "low": 7.7503, "close": 7.7507, "date": 1606435200 }, "2020-11-26": { "open": 7.7505, "high": 7.7513, "low": 7.7503, "close": 7.7507, "date": 1606348800 }, "2020-11-25": { "open": 7.7513, "high": 7.7517, "low": 7.7507, "close": 7.751, "date": 1606262400 }, "2020-11-24": { "open": 7.7517, "high": 7.7522, "low": 7.7511, "close": 7.7517, "date": 1606176000 }, "2020-11-23": { "open": 7.7518, "high": 7.7532, "low": 7.7515, "close": 7.7527, "date": 1606089600 }, "2020-11-20": { "open": 7.7528, "high": 7.7539, "low": 7.7519, "close": 7.7537, "date": 1605830400 }, "2020-11-19": { "open": 7.7519, "high": 7.7528, "low": 7.7512, "close": 7.7528, "date": 1605744000 }, "2020-11-18": { "open": 7.7527, "high": 7.7531, "low": 7.7517, "close": 7.7525, "date": 1605657600 } } }