Skip to content

Get Historical Sugar Prices API

Sugar is one of the world’s most significant commodities since it is the primary carbohydrate in the majority of sweet meals. Sugar is present in the tissues of most plants; it is used for sweetening and comes in a variety of forms.

Due to strong demand, its output grew by 14 percent between 2009 and 2018. China, Indonesia, and the United States were the top importers throughout those years. Brazil produced the most sugar in 2016, accounting for 768.7 million tons. It was followed by India (348.4) and China (122.7).

Investing in sugar is a wise decision since its output grows year after year and it is used by the vast majority of the world’s countries. However, you should be aware that its price fluctuates continuously, making it impossible to determine how it behaved at various times in time. An API can provide you with real-time pricing, but not every application can provide you with historical rates.

Get Historical Sugar Prices API

Nonetheless, obtaining a historical price is not difficult. We strongly advise you to use Commodities-API for this purpose. This is a free web API that provides commodity price for commodities including coffee, rice, sugar, and wheat, to mention a few.

How Does It Work?

To obtain the data, first, log in to the website, obtain an API key, and then select the appropriate currency and commodity. That’s all there is to it, and you are free to utilize the API any way you see appropriate. The Commodities-API can give data in any currency, with an accuracy of two decimal points, from a list of over 170 choices. You can also get data updates every 60 seconds and run 100.000 API requests each month.

Commodities-API employs JSON API, or JavaScript Object Notation, an encoding method that eliminates the need for each application to write its own ad hoc code in order to connect with servers that interact in a certain manner. The JSON API module includes support for entity types, bundles, and fields, as well as data storage and data structures.

Commodities-API offers historical rates for major currencies dating back to 2020. You may query the Commodities-API API for historical rates by adding a date (format YYYY-MM-DD) to the basic URL.

Get Historical Sugar Prices API

Example

API Request:

https://commodities-api.com/api/2013-12-24

? access_key = API_KEY

& base = GBP

& symbols = USD,CAD,EUR

Request Parameters:

ParameterDescription
YYYY-MM-DD[required] A date in the past for which historical rates are requested.
access_key[required] Your API Key.
base[optional] Enter the three-letter currency code or commodities code of your preferred base currency.
symbols[optional] Enter a list of comma-separated currency codes or commodities codes to limit output currencies.

Where Does The Information Come From?

Commodities-API collects and analyzes data from banks and the stock market to offer you with the most reliable and secure data accessible. Aside from that, this API uses bank-grade 256-bit SSL encryption to assure your connection’s security at all times.

Currency and commodity prices are translated using the same API endpoints, which may also be used to convert any amount from one currency to another, any commodity to any commodity, and any currency to any currency. For all commodities and currency rates, the API offers midpoint data. Midpoint rates are calculated using the average median rate of Bid and Ask during a certain time period.


Also published on Medium.

Published inAppsTechnology
%d bloggers like this: