{"id":24841,"library":"xbbg","title":"xbbg","description":"Independent client for Bloomberg data workflows. Current version 1.2.1, supports Python 3.10-3.14. Releases follow semantic versioning with frequent minor/patch updates. Provides pandas- and Arrow-native wrappers around Bloomberg's data services (historical, reference, tick, BQL, etc.) without requiring Bloomberg Terminal GUI.","status":"active","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/alpha-xone/xbbg","tags":["bloomberg","finance","data","market-data"],"install":[{"cmd":"pip install xbbg","lang":"bash","label":"Latest stable"},{"cmd":"pip install xbbg==1.2.1","lang":"bash","label":"Pin version"}],"dependencies":[{"reason":"Bloomberg C++ SDK wrapper for live Bloomberg connectivity","package":"blpapi","optional":false},{"reason":"Used for output DataFrame format","package":"pandas","optional":true},{"reason":"Used for output Table format","package":"pyarrow","optional":true}],"imports":[{"note":"bdh is a function accessed via blp.bdh, not a direct import","wrong":"","symbol":"bdh","correct":"from xbbg import blp"},{"note":"bdp is a function accessed via blp.bdp","wrong":"","symbol":"bdp","correct":"from xbbg import blp"},{"note":"bds is a function accessed via blp.bds","wrong":"","symbol":"bds","correct":"from xbbg import blp"}],"quickstart":{"code":"from xbbg import blp\n\ndf = blp.bdh(\n    tickers=['AAPL US Equity'],\n    flds=['PX_LAST'],\n    start_date='2024-01-01',\n    end_date='2024-01-10',\n)\nprint(df.head())","lang":"python","description":"Fetch historical closing prices for Apple. Requires Bloomberg terminal or Bloomberg Server API (SAPI) running with necessary subscriptions."},"warnings":[{"fix":"Use 'from xbbg import blp' and call blp.bdh(...).","message":"All Bloomberg data functions (bdh, bdp, bds, etc.) are exposed via xbbg.blp, not as standalone imports. Common mistake: from xbbg import bdh (AttributeError). Always use: from xbbg import blp then blp.bdh(...).","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Always provide full Bloomberg ticker: 'TSLA US Equity', 'EURUSD Curncy', 'SPX Index'.","message":"Bloomberg ticker strings must include exchange/type suffix (e.g., 'AAPL US Equity', 'TSLA US Equity'). Omitting suffix (e.g., just 'AAPL') causes errors or wrong data.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use Python xbbg directly or the JavaScript/NAPI bindings (js-xbbg, napi-xbbg).","message":"In version 1.1.0, the apps xbbg-browser, xbbg-bridge, and xbbg-server were removed. Users of those should migrate to JavaScript bindings or direct Python API.","severity":"deprecated","affected_versions":"~=1.0.0, <1.1.0"},{"fix":"Set pivot='on' to get ticker-column format, or handle MultiIndex appropriately.","message":"bdh with per=ticker/security yields multi-index columns. Reshaping or indexing incorrectly leads to unexpected outputs.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Run 'pip install blpapi' and ensure Bloomberg services (bbcomm) are available.","message":"Bloomberg API (blpapi) must be installed separately and configured. xbbg does not bundle it; pip install blpapi is required for live data.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install blpapi","cause":"Bloomberg SDK library not installed.","error":"ModuleNotFoundError: No module named 'blpapi'"},{"fix":"from xbbg import blp; blp.bdh(...)","cause":"Common mistake: importing bdh directly instead of accessing via xbbg.blp.","error":"AttributeError: module 'xbbg' has no attribute 'bdh'"},{"fix":"Use full Bloomberg ticker like 'AAPL US Equity' or 'EURUSD Curncy'.","cause":"Ticker missing the exchange/type suffix (e.g., Equity, Curncy).","error":"KeyError: 'ticker must contain a security type'"},{"fix":"Start Bloomberg Terminal or ensure Bloomberg Server API (SAPI) is configured.","cause":"Bloomberg Desktop API (bbcomm) not running or not available.","error":"BlpapiNotFoundException: Failed to create session"},{"fix":"Verify ticker strings and date range; check Bloomberg connectivity.","cause":"Data frame contains None or NaN due to no data, often from invalid tickers.","error":"TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}