Install
Install from PyPI or conda-forge on Python 3.11–3.15, provide the Bloomberg runtime, and check detection with get_sdk_info().
Python
xbbg for notebooks, pipelines, and services.Bloomberg-style helpers in Python, while sessions, authentication, async execution, middleware, and Arrow-native output run on the same Rust engine as @xbbg/core.
Install from PyPI or conda-forge on Python 3.11–3.15, provide the Bloomberg runtime, and check detection with get_sdk_info().
bdp, bdh, bds, intraday bars and ticks, BQL and search, generic requests, subscriptions, and fixed-income workflows.
Narwhals by default, or native Arrow, PyArrow, pandas, Polars, and DuckDB — in long, typed, or field-per-column shapes.
Async helpers, scoped engines, request middleware, B-PIPE/SAPI authentication, TLS, ZFP, failover, SOCKS5, sharding, and SDK logging.
Many Python Bloomberg packages wrap Bloomberg's blpapi Python bindings directly. That is enough for small scripts, but production workflows still have to decide where session lifecycle, event parsing, concurrency, diagnostics, enterprise connectivity, and output conversion live.
xbbg puts those concerns in a native Rust engine on the Bloomberg C++ SDK. The engine manages sessions and worker pools, builds typed Arrow output, shares real-time feeds between subscriptions, and handles enterprise transports — ZFP over leased lines, B-PIPE/SAPI authentication, TLS, failover servers, SOCKS5 — alongside SDK logging, field validation, request diagnostics, and request middleware.
| Family | Helpers | Use when |
|---|---|---|
| Reference, historical, bulk | bdp, bdh, bds, bdib, bdtick (+ async) | Core market-data retrieval |
| Query and search | bql, beqs, bsrch, blkp, bport, bflds, request | Bloomberg services beyond field pulls |
| Streaming | subscribe, asubscribe, stream, astream, vwap, mktbar, depth, chains | Real-time data with shared feeds and diagnostics |
| Fixed income | bqr, bcurves, bgovts, ext.yas, ext.bond_*, ext.corporate_bonds, ext.preferreds | Quotes, curves, government securities, yield and risk analytics |
| Analytics recipes | ext futures, CDX, options, ETF NAV, volatility surfaces, index members, ISINs, dividends, bta | Multi-step Bloomberg workflows |
| Exchange auctions | ext.resolve_venues, ext.auction_snapshot, ext.subscribe_auction | Imbalance and auction data on the right venue |
| Entitlements | delay_status, check_entitlements, seat_type, return_eids=, on_delayed= | Knowing what a session may see and whether it is delayed |
| Operations | configure, Engine, middleware, logging, backends, xbbg.testing | Production setup, observability, and tests |
Middleware receives each request's parameters, an engine snapshot, and the result, so one shared chain can add audit logging, request IDs, metrics, tracing, entitlement checks, policy enforcement, and caching without wrapping every bdp(), bdh(), or bql() call. See Request Middleware.
blpapi is official but low-level: each application builds session startup, service opening, request construction, correlation IDs, event parsing, error mapping, retries, logging, and dataframe conversion itself. xbbg keeps SDK access underneath and adds typed helpers, generic requests, typed errors, async execution, and Arrow output.python>=3.6, pandas required) in the same classic category.import xbbg
prices = xbbg.bdp(
['AAPL US Equity', 'MSFT US Equity'],
['PX_LAST', 'VOLUME'],
)The top-level helpers (xbbg.bdp(...), xbbg.configure(...)) and the module style (from xbbg import blp, then blp.bdp(...)) are the same functions. Analytics helpers live in xbbg.ext.
Install the package and the Bloomberg runtime.
Reference, historical, bulk, intraday, async, streaming, and fixed-income requests.
Every public export of the package.
Subscriptions, shared feeds, current-value boards, and diagnostics.
Curves, government securities, BQR, YAS, corporate bonds, and bond analytics.
The public package page for xbbg.