Loading
Loading
https://api.apifreaks.com/v1.0/commodity/rates/historical
1. Open the Authorizations dropdown and Verify your API key.
2. Click Run to see the live response here.
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/commodity/rates/historical"
payload = {}
headers = {
'X-apiKey': ''
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
| Field | Type | Requirement | Description |
|---|---|---|---|
| success | Boolean | Mandatory | API request success indicator. "true" for successful requests. |
| date | String | Mandatory | Date for which the user requested the commodity price. Format: YYYY-MM-DD. |
| rates | Map | Mandatory | Map containing rate data for each available requested commodity symbol. |
| rates.[SYMBOL] | Map | Mandatory | Map containing different rates for the specified commodity symbol. |
| rates.[SYMBOL].date | String | Mandatory | Date for which commodity prices were fetched. Format: YYYY-MM-DD. |
| rates.[SYMBOL].open | String | Mandatory | The opening price of the commodity on the given date. |
| rates.[SYMBOL].high | String | Mandatory | The highest price of the commodity recorded on the given date. |
| rates.[SYMBOL].low | String | Mandatory | The lowest price of the commodity recorded on the given date. |
| rates.[SYMBOL].close | String | Mandatory | The closing price of the commodity on the given date. |