GET historics/{from}-{to}.json

Html.Raw(Transl.Api.Documentation.ReturnTodayPrayerTimes)

https://v2.api.forex/historics/{from}-{to}.{format}

Resource URL

{format}typeoptionaldecription
{key}stringOptionalWe use a key to avoid abuse on our API and to log usages.
https://v2.api.forex/historics/USD-HKD.json?key=demo&
{from}stringRequiredThe three-letter currency code of the currency you would like to convert from.
https://v2.api.forex/historics/EUR-CHF.json?key=demo
{to}stringRequiredThe three-letter currency code of the currency you would like to convert to.
https://v2.api.forex/historics/AUD-GBP.json?key=demo
{format}stringRequiredYou can export data to JSON, CSV, or XML
https://v2.api.forex/historics/USD-HKD.csv?source=ecb&key=demo
{source}stringOptionalDefine 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}stringOptionalFormats the JSON files with the chosen indentation level for optimal readability.
https://v2.api.forex/historics/USD-HKD.json?beautify=true

Parameters

{format}typedecription
{infos}int

Returns informations about the API request

ParametersDescription
timestampHtml.Raw(Transl.Api.Documentation.NoAdjustment)
fromThe three-letter currency code of the currency you would like to convert from.
toThe three-letter currency code of the currency you would like to convert to.
source

Html.Raw(Transl.Api.Documentation.HigerLatDescription)

ParametersDescription
idThe unique Id for the historic source. List of sources Html or Json
nameThe name of the currencies sources
base_currencyThe base currency used to calculate the currency rates historic
countryCountry
source

Request API usages

Information about the source used for your requestDescription
api_countInteger showing the total of quotes of your request
packThe pack you are using Free, Bronze, Silver, Gold
historicsdate

The date (yyyy-mm-dd) of the given exchange rate data was collected.

ParametersDescription
openOpening prices for the specific time frame
highHighest prices for the specific time frame
lowLowest prices for the specific time frame
closeClosing prices for the specific time frame
dateThe date (format unix format) 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": "2024-04-25T19:37:11Z",
    "expire": "2024-04-25T20:37:11Z",
    "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
    }
  }
}