{"id":45664,"library":"openbb-commodity","title":"OpenBB Commodity","description":"Commodity extension for the OpenBB Platform, providing tools for analyzing and fetching commodity data (e.g., metals, energy, agriculture). Current version 1.5.2, requires Python 3.10+. Part of the OpenBB v4 ecosystem; release cadence follows OpenBB's major/minor releases.","status":"active","version":"1.5.2","language":"python","source_language":"en","source_url":"https://github.com/OpenBB-finance/OpenBB","tags":["openbb","commodity","finance","data"],"install":[{"cmd":"pip install openbb-commodity","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core OpenBB platform required for all extensions","package":"openbb-core","optional":false}],"imports":[{"wrong":"from openbb import obbject","symbol":"obbject","correct":"from openbb_commodity import obbject"}],"quickstart":{"code":"from openbb import obbject\n\n# Fetch crude oil prices using the default provider\nresult = obbject.commodity.crude_oil()\nprint(result)\n\n# If you need to specify a provider (e.g., fred)\n# result = obbject.commodity.crude_oil(provider='fred')","lang":"python","description":"Quickstart: Use the OpenBB obbject to access commodity endpoints. The extension registers providers like 'fred' for commodity data."},"warnings":[{"fix":"Use 'from openbb import obbject' and then access commodity via 'obbject.commodity'.","message":"Do not import 'openbb-commodity' directly. The extension is loaded automatically when you import openbb and have the package installed. Attempting 'from openbb_commodity import ...' may fail or bypass the main OpenBB interface.","severity":"gotcha","affected_versions":"all"},{"fix":"Check available endpoints by running 'dir(obbject.commodity)' after installation, and ensure you have the required provider packages installed (e.g., 'pip install openbb-fred').","message":"The 'commodity' module may have limited methods depending on installed providers. Not all commodity types (e.g., copper, gold) may be available without a specific provider like 'fred' or 'yfinance'.","severity":"gotcha","affected_versions":"all"},{"fix":"Always specify 'provider' if the default provider is not set. Example: 'obbject.commodity.crude_oil(provider='fred')'.","message":"OpenBB v4 introduced a provider-based architecture. Methods like 'crude_oil()' may require a 'provider' parameter. Omitting it may raise 'ProviderError'.","severity":"breaking","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'1.5.2':23 '3.10':26 'agricultur':20 'analyz':12 'cadenc':34 'commod':2,3,15,41 'current':21 'data':16,43 'e.g':17 'ecosystem':32 'energi':19 'extens':4 'fetch':14 'financ':42 'follow':35 'major/minor':38 'metal':18 'openbb':1,7,30,36,40 'part':27 'platform':8 'provid':9 'python':25 'releas':33,39 'requir':24 'tool':10 'v4':31 'version':22","created_at":"2026-06-07T12:56:07.362992+00:00","updated_at":"2026-06-07T12:56:07.362992+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'obbject' from 'openbb_commodity' (/tmp/tmpq0tx_kj_/venv/lib/python3.12/site-packages/openbb_commodity/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["finance"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}