# Commodities-API
[![Commodities-API](https://www.commodities-api.com/img/logo_metals.png)](https://commodities-api.com)
<!--start: description-->
**Commodities-API** - The ultimate API for accessing comprehensive and accurate real-time and historical rates on various commodities effortlessly. Commodities-API supports 350+ symbols with updates every 60 seconds. Try the Start 7-Day Free Trial. Cancel anytime at your convenience.
<!--end: description-->
<!--start: docs-->
## Key Features:
- **Built for Developers:** Tailored for developers, ensuring ease of use and seamless integration.
- **Robust JSON API:** A powerful JSON API designed for accurate and efficient data retrieval.
- **Top-Tier Security:** Trust Commodities-API with advanced security measures to protect your data.
- **Reliable Data Sources:** Benefit from reliable and accurate data from trusted sources.
- **Flexible Integration:** Easily integrate Commodities-API into any language for diverse applications.
- **Historical Data Access:** Dive into historical data for comprehensive analysis and informed decision-making.
- **Exceptional Accuracy:** Rely on Commodities-API for spot-on accuracy in real-time and historical data.
- **User-Friendly Documentation:** Navigate through our comprehensive documentation for a smooth integration process.
- **Specialized Support:** Count on our dedicated support team for assistance tailored to your specific needs.
## Supported Commodities
Explore a wide range of supported commodities, including precious metals, energy resources, agricultural products, and more. From coffee to electricity, we cover it all. [View Supported Commodities](https://www.commodities-api.com/symbols)
## Documentation
For detailed information on API endpoints, usage, and integration guidelines, check our [API Documentation](https://www.commodities-api.com/documentation).
Start using Commodities-API today for unparalleled access to commodities data. Visit [Commodities-API.com](https://commodities-api.com) and integrate in just minutes!
## Installation
You can install Commodities-API Python SDK with pip.
```bash
pip commodities-api
```
## Usage
The Commodities-API Python SDK is a wrapper around the [requests](https://docs.python-requests.org/en/master/) library. Commodities-API supports a GET request for now.
Sign-up to Commodities-API to [get your API key](https://commodities-api.com/register) and some credits to get started.
### Making the GET request
```python
>>> from commodities_api import CommoditiesApiClient
>>> client = CommoditiesApiClient(access_key='REPLACE-WITH-YOUR-ACCESS-KEY')
>>> response = client.get_latest("base", ["symbols"])
```
### Request Example
```python
>>> from commodities_api import CommoditiesApiClient
>>> client = CommoditiesApiClient(access_key='REPLACE-WITH-YOUR-ACCESS-KEY')
>>> response = client.get_latest("USD", ["RICE", "WHEAT", "SUGAR"])
```
### Response Example
```json
{
"data": {
"success": true,
"timestamp": 1715796300,
"date": "2024-05-15",
"base": "USD",
"rates": {
"RICE": 0.052356020942408,
"SUGAR": 5.3676865271068,
"USD": 1,
"WHEAT": 0.0036618232950551,
"USDRICE": 19.100000000000136,
"USDSUGAR": 0.1863000000000006,
"USDWHEAT": 273.08799999999803
},
"unit": {
"RICE": "per cwt",
"WHEAT": "per metric ton",
"SUGAR": "per lb"
}
}
}
```
### AVAILABLE METHODS
```python
>>> get_latest(base: str, symbols: List[str])
```
```python
>>> get_historical(date:str, base:str, symbols: List[str])
```
```python
>>> get_time_series(start_date: str, end_date: str, symbol: str)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Zyla-Labs/pypi-commodities-api",
"name": "commodities-api",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "commodities-api, precious Commodities api, Commodities api, Commodities, precious Commodities, gold, silver, Platinum, Palladium, Ruthenium, Rhodium, forex data, rates, money, usd, eur, btc, forex api, gbp to usd, gbp to eur, eur to usd, api, currency api, exchange rate api, get currency rates api, currency rates php, usd to eur api, copper, nickel, aluminium, TIN, Zinc",
"author": "Commodities-API",
"author_email": "hello@commodities-api.com",
"download_url": "https://files.pythonhosted.org/packages/0e/d3/a9f36bea897c9ccf439442e88c2fcddc4296fb0e8a0b73158e0b12713b65/commodities_api-0.3.tar.gz",
"platform": null,
"description": "# Commodities-API\r\n\r\n[![Commodities-API](https://www.commodities-api.com/img/logo_metals.png)](https://commodities-api.com)\r\n\r\n<!--start: description-->\r\n\r\n**Commodities-API** - The ultimate API for accessing comprehensive and accurate real-time and historical rates on various commodities effortlessly. Commodities-API supports 350+ symbols with updates every 60 seconds. Try the Start 7-Day Free Trial. Cancel anytime at your convenience.\r\n\r\n<!--end: description-->\r\n\r\n<!--start: docs-->\r\n\r\n## Key Features:\r\n\r\n- **Built for Developers:** Tailored for developers, ensuring ease of use and seamless integration.\r\n- **Robust JSON API:** A powerful JSON API designed for accurate and efficient data retrieval.\r\n- **Top-Tier Security:** Trust Commodities-API with advanced security measures to protect your data.\r\n- **Reliable Data Sources:** Benefit from reliable and accurate data from trusted sources.\r\n- **Flexible Integration:** Easily integrate Commodities-API into any language for diverse applications.\r\n- **Historical Data Access:** Dive into historical data for comprehensive analysis and informed decision-making.\r\n- **Exceptional Accuracy:** Rely on Commodities-API for spot-on accuracy in real-time and historical data.\r\n- **User-Friendly Documentation:** Navigate through our comprehensive documentation for a smooth integration process.\r\n- **Specialized Support:** Count on our dedicated support team for assistance tailored to your specific needs.\r\n\r\n## Supported Commodities\r\n\r\nExplore a wide range of supported commodities, including precious metals, energy resources, agricultural products, and more. From coffee to electricity, we cover it all. [View Supported Commodities](https://www.commodities-api.com/symbols)\r\n\r\n## Documentation\r\n\r\nFor detailed information on API endpoints, usage, and integration guidelines, check our [API Documentation](https://www.commodities-api.com/documentation).\r\n\r\nStart using Commodities-API today for unparalleled access to commodities data. Visit [Commodities-API.com](https://commodities-api.com) and integrate in just minutes!\r\n\r\n\r\n## Installation\r\n\r\nYou can install Commodities-API Python SDK with pip.\r\n\r\n```bash\r\npip commodities-api\r\n```\r\n\r\n## Usage\r\n\r\nThe Commodities-API Python SDK is a wrapper around the [requests](https://docs.python-requests.org/en/master/) library. Commodities-API supports a GET request for now.\r\n\r\nSign-up to Commodities-API to [get your API key](https://commodities-api.com/register) and some credits to get started.\r\n\r\n### Making the GET request\r\n\r\n```python\r\n>>> from commodities_api import CommoditiesApiClient\r\n\r\n>>> client = CommoditiesApiClient(access_key='REPLACE-WITH-YOUR-ACCESS-KEY')\r\n\r\n>>> response = client.get_latest(\"base\", [\"symbols\"])\r\n```\r\n\r\n### Request Example\r\n\r\n```python\r\n>>> from commodities_api import CommoditiesApiClient\r\n\r\n>>> client = CommoditiesApiClient(access_key='REPLACE-WITH-YOUR-ACCESS-KEY')\r\n\r\n>>> response = client.get_latest(\"USD\", [\"RICE\", \"WHEAT\", \"SUGAR\"])\r\n```\r\n\r\n### Response Example\r\n\r\n```json\r\n{\r\n \"data\": {\r\n \"success\": true,\r\n \"timestamp\": 1715796300,\r\n \"date\": \"2024-05-15\",\r\n \"base\": \"USD\",\r\n \"rates\": {\r\n \"RICE\": 0.052356020942408,\r\n \"SUGAR\": 5.3676865271068,\r\n \"USD\": 1,\r\n \"WHEAT\": 0.0036618232950551,\r\n \"USDRICE\": 19.100000000000136,\r\n \"USDSUGAR\": 0.1863000000000006,\r\n \"USDWHEAT\": 273.08799999999803\r\n },\r\n \"unit\": {\r\n \"RICE\": \"per cwt\",\r\n \"WHEAT\": \"per metric ton\",\r\n \"SUGAR\": \"per lb\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n### AVAILABLE METHODS\r\n\r\n```python\r\n>>> get_latest(base: str, symbols: List[str])\r\n```\r\n\r\n```python\r\n>>> get_historical(date:str, base:str, symbols: List[str])\r\n```\r\n\r\n```python\r\n>>> get_time_series(start_date: str, end_date: str, symbol: str)\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to get the latest commodities from the Commodities-API",
"version": "0.3",
"project_urls": {
"Homepage": "https://github.com/Zyla-Labs/pypi-commodities-api"
},
"split_keywords": [
"commodities-api",
" precious commodities api",
" commodities api",
" commodities",
" precious commodities",
" gold",
" silver",
" platinum",
" palladium",
" ruthenium",
" rhodium",
" forex data",
" rates",
" money",
" usd",
" eur",
" btc",
" forex api",
" gbp to usd",
" gbp to eur",
" eur to usd",
" api",
" currency api",
" exchange rate api",
" get currency rates api",
" currency rates php",
" usd to eur api",
" copper",
" nickel",
" aluminium",
" tin",
" zinc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9256d19deb34b1b727d271ae2178410d4c90ccd37dd4b08f7f822b45e0b50a6",
"md5": "c74d30b973f5310fb83665118fe3a8db",
"sha256": "e4ce9c37b47008ff9d237a9dbce42b3732c876934c25f1221235e6d60252fb06"
},
"downloads": -1,
"filename": "commodities_api-0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c74d30b973f5310fb83665118fe3a8db",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3619,
"upload_time": "2024-05-16T15:32:21",
"upload_time_iso_8601": "2024-05-16T15:32:21.274776Z",
"url": "https://files.pythonhosted.org/packages/e9/25/6d19deb34b1b727d271ae2178410d4c90ccd37dd4b08f7f822b45e0b50a6/commodities_api-0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0ed3a9f36bea897c9ccf439442e88c2fcddc4296fb0e8a0b73158e0b12713b65",
"md5": "4435e0e85cc2672b74febdf5f26e2b15",
"sha256": "fb9b47919fc05a79d648fd899c2a1c41fc72fc2edda998f1dd4b8cca1a3da2de"
},
"downloads": -1,
"filename": "commodities_api-0.3.tar.gz",
"has_sig": false,
"md5_digest": "4435e0e85cc2672b74febdf5f26e2b15",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3415,
"upload_time": "2024-05-16T15:32:23",
"upload_time_iso_8601": "2024-05-16T15:32:23.183786Z",
"url": "https://files.pythonhosted.org/packages/0e/d3/a9f36bea897c9ccf439442e88c2fcddc4296fb0e8a0b73158e0b12713b65/commodities_api-0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-16 15:32:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Zyla-Labs",
"github_project": "pypi-commodities-api",
"github_not_found": true,
"lcname": "commodities-api"
}