Loading
Loading
https://api.apifreaks.com/v1.0/commodity/fluctuation
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/fluctuation"
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. |
| startDate | String | Mandatory | The start date of the fluctuation interval in YYYY-MM-DD format. |
| endDate | String | Mandatory | The end date of the fluctuation interval in YYYY-MM-DD format. |
| rates | Map | Mandatory | Map where each key is a commodity symbol (e.g., "WTIOIL", "BRENTOIL") and the value contains fluctuation metrics. |
| rates.[SYMBOL] | Map | Mandatory | Map containing fluctuation data for a specific commodity symbol. |
| rates.[SYMBOL].startRate | Number | Mandatory | The price of the commodity on the start date of the interval. |
| rates.[SYMBOL].endRate | Number | Mandatory | The price of the commodity on the end date of the interval. |
| rates.[SYMBOL].change | Number | Mandatory | The absolute price difference between the end and start date. May be positive or negative. |
| rates.[SYMBOL].changePercent | Number | Mandatory | The percentage change in price from start to end date. May be positive or negative. |