Historical Commodity Prices API

GET

https://api.apifreaks.com/v1.0/commodity/rates/historical

format
Format of the Response
symbolsArrayrequired
Comma separated list of desired commodities symbols
dateStringrequired
Date for which the rates are required. Format: YYYY-MM-DD

Sample Responses

400
400
400
404
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests
RESPONSE

Click Test it to start the request and see the response here!


API Response

FieldTypeRequirementDescription
successBooleanMandatory
API request success indicator. "true" for successful requests.
dateStringMandatory
Date for which the user requested the commodity price. Format: YYYY-MM-DD.
ratesMapMandatory
Map containing rate data for each available requested commodity symbol.
rates.[SYMBOL]MapMandatory
Map containing different rates for the specified commodity symbol.
rates.[SYMBOL].dateStringMandatory
Date for which commodity prices were fetched. Format: YYYY-MM-DD.
rates.[SYMBOL].openStringMandatory
The opening price of the commodity on the given date.
rates.[SYMBOL].highStringMandatory
The highest price of the commodity recorded on the given date.
rates.[SYMBOL].lowStringMandatory
The lowest price of the commodity recorded on the given date.
rates.[SYMBOL].closeStringMandatory
The closing price of the commodity on the given date.