Commodities API

Commodities API

Check different Commodity rates with this API. Get the latest price, prices per date, open, close, and much more.

API description

What is Commodities-API?

 

Commodities-API started out as a simple, lightweight, open-source API for the latest and historical commodities rates published by the banks and the stock market. This API is capable of delivering real-time commodities data via API at an accuracy of 2 decimal points and a frequency as high as every 60 seconds. The capabilities include delivering exchange rates for almost any commodity, precious metals, converting single currencies, returning time-series data, and fluctuation data.

Commodities prices data delivered by our API is collected from over 15 reliable data sources every minute. Sources include banks and financial data providers.

In this sense, developers are given an API key that allows them to access the API service provider's data sources and, with it, requests are sent and received through endpoints. The endpoints are added by developers to their apps. JSON is used to format the responses.

Apart from that, the same API endpoints are used to convert currency and commodity prices, and they may be used to convert any amount from one currency to another, as well as from one commodity to any commodity and any currency to any currency.

Utilising this API, you can gain a better understanding of the market and give each of your clients the prices they require for any commodity. A comprehensive variety of products is available for you to check out and contrast.

Commodities-API returns midpoint data for all commodities and currency rates. The average median rate of bid and ask for a given period is used to calculate midpoint rates. This API supports Rice, Wheat, Coffee, Corn, Sugar, Brent Crude Oil, WTI Crude Oil, Palm Oil, Soybeans, Natural Gas, Ethanol, Gold, Silver, Rubber and much more. Commodities-API is capable of delivering accurate commodities and exchange rate data for almost any commodity, in 170 world currencies, including Bitcoin and other major cryptocurrencies.

To use it, you must first make an API call while using different symbols for the currency and the commodity. In a simple API call, you can use a number of different commodities, but only one currency.

API Documentation

Endpoints


Check all the available symbols for your queries. This endpoint retrieves all the supported commodities and currencies as well. 



                                                                            
GET https://zylalabs.com/api/7/commodities+api/30/supported+symbols
                                                                            
                                                                        
Supported Symbols - Endpoint Features
Object Description

Check the real-time exchange rate data updated every 60 seconds with this endpoint. 

 

Note: All the commodities rates you get need using ANY currency as a base currency (base parameter) need to be divided by 1
We return the values based on the base currency. For example, for 1 USD the return is a number like 0.00055307742 for Gold (XAU).
To get the gold rate per troy ounce in USD: 1/0.00055307742 = 1808.06 USD



                                                                            
GET https://zylalabs.com/api/7/commodities+api/31/latest+rates
                                                                            
                                                                        
Latest Rates - Endpoint Features
Object Description
base [Required] Enter the three-letter currency code or commodity code of your preferred base currency. Check Symbols endpoint
symbols [Required] Enter a list of comma-separated currency codes or commodity codes to limit output codes. Check Symbols endpoint

Historical rates are available for most symbols all the way back to the year 2021. You can query the API for historical rates by appending a date (format YYYY-MM-DD) to the base URL.

Note: All the commodities rates you get need using ANY currency as a base currency (base parameter) need to be divided by 1
We return the values based on the base currency. For example, for 1 USD the return is a number like 0.00055307742 for Gold (XAU).
To get the gold rate per troy ounce in USD: 1/0.00055307742 = 1808.06 USD



                                                                            
GET https://zylalabs.com/api/7/commodities+api/32/historical+rates
                                                                            
                                                                        
Historical Rates - Endpoint Features
Object Description
base [Required]
symbols [Required]
date [Required]

With this endpoint, you will be provided with daily historical rates between two dates of your choice. 

Note: This endpoint has a limitation of 365 days per range, and only can provide one symbol information per request.

All the commodities rates you get need using ANY currency as a base currency (base parameter) need to be divided by 1
We return the values based on the base currency. For example, for 1 USD the return is a number like 0.00055307742 for Gold (XAU).
To get the gold rate per troy ounce in USD: 1/0.00055307742 = 1808.06 USD



                                                                            
GET https://zylalabs.com/api/7/commodities+api/33/time-series
                                                                            
                                                                        
Time-Series - Endpoint Features
Object Description
start_date [Optional] The start date of your preferred timeframe.
end_date [Optional] The end date of your preferred timeframe.
base [Optional] Enter the three-letter currency code or commodity code of your preferred base currency
symbols [Optional] Enter the three-letter currency code or commodity code of your preferred base currency

Using the fluctuation API endpoint, you will be able to retrieve information about how prices fluctuate from day to day.
This endpoint has a limitation of 365 days and only one symbol per request



                                                                            
GET https://zylalabs.com/api/7/commodities+api/34/fluctuation
                                                                            
                                                                        
Fluctuation - Endpoint Features
Object Description
start_date [Optional] The start date of your preferred timeframe.
end_date [Optional] The end date of your preferred timeframe.
base [Optional] Enter the three-letter currency code or commodity code of your preferred base currency
symbols [Optional] Enter the three-letter currency code or commodity code of your preferred base currency

Allows you to query the API to get the open, high, low, and close price.
This endpoint has a limitation of one symbol per request.



                                                                            
GET https://zylalabs.com/api/7/commodities+api/35/open-high-low-close+%28ohlc%29+price
                                                                            
                                                                        
Open/High/Low/Close (OHLC) Price - Endpoint Features
Object Description
base [Optional] Enter the three-letter currency code or commodity code of your preferred base currency
symbols [Optional] Enter the three-letter currency code or commodity code of your preferred base currency

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Commodities API REST API, simply include your bearer token in the Authorization header.

Headers

Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.


Simple Transparent Pricing

No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.

🧙Free
$0.00 / Mo

  • 100 Requests / Month
🔥Pro Plus
$99.99 / Mo

  • 10,000 Requests / Month
⚡Pro
$49.99 / Mo

  • 1,000 Requests / Month
✨Plus
$199.99 / Mo

  • 20,000 Requests / Month
🌟Elite
$499.99 / Mo

  • 50,000 Requests / Month
🚀 Enterprise
Custom quote

Need more? We offer unlimited API calls, Request Quote


Zyla API Hub is, in other words, an API MarketPlace. An all-in-one solution for your developing needs. You will be accessing our extended list of APIs with only your user. Also, you won't need to worry about storing API keys, only one API key for all our products is needed.

Prices are listed in USD. We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world’s most reliable payment companies. If you have any trouble with paying by card, just contact us at [email protected]

Sometimes depending on the bank's fraud protection settings, a bank will decline the validation charge we make when we attempt to be sure a card is valid. We recommend first contacting your bank to see if they are blocking our charges. If more help is needed, please contact [email protected] and our team will investigate further

Prices are based on a recurring monthly subscription depending on the plan selected — plus overage fees applied when a developer exceeds a plan’s quota limits. In this example, you'll see the base plan amount as well as a quota limit of API requests. Be sure to notice the overage fee because you will be charged for each additional request.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

Just go to the pricing page of that API and select the plan that you want to upgrade to. You will only be charged the full amount of that plan, but you will be enjoying the features that the plan offers right away.

Yes, absolutely. If you want to cancel your plan, simply go to your account and cancel on the Billing page. Upgrades, downgrades, and cancellations are immediate.

You can contact us through our chat channel to receive immediate assistance. We are always online from 9 am to 6 pm (GMT+1). If you reach us after that time, we will be in contact when we are back. Also you can contact us via email to [email protected]

API Provider: MV

Useful links:


Category: