xbbg
Independent client for Bloomberg-connected data workflows
What it is and what it does
xbbg is an independent Bloomberg client that wraps Bloomberg's DAPI/SAPI/ZFP services with a Rust-backed engine, providing Python helpers for common request patterns (reference data, historical data, intraday bars, ticks, BQL, equity screening) plus async support and multiple output backends. It targets workflows that grow beyond simple one-off requests into streaming subscriptions, managed Bloomberg environments, and non-pandas data pipelines.
The package requires you to bring your own authorized Bloomberg access and manages the connection, request parsing, and data movement through a shared Rust engine. It supports sync and async APIs, outputs to Narwhals, native Arrow, PyArrow, pandas, Polars, DuckDB, and related libraries, and includes typed errors, diagnostics, and field lookup helpers. Configuration covers DAPI, SAPI/B-PIPE, ZFP, TLS, failover hosts, and SOCKS5.
Use it for:
- Fetch reference data (prices, fundamentals, identifiers) for multiple securities in a single call with Bloomberg-style overrides.
- Retrieve historical time series and intraday bars/ticks for backtesting or real-time analysis workflows.
- Run BQL queries, equity screens, and constituent lookups for portfolio construction and monitoring.
- Build async worker pools for concurrent Bloomberg requests in high-throughput data pipelines.
- Output Bloomberg data directly to Polars, DuckDB, or Arrow formats without pandas as an intermediate step.
- Configure and connect to managed Bloomberg environments (B-PIPE, ZFP, TLS) with automatic failover and diagnostics.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
xbbg is a Bloomberg client for Python that provides high-level helpers for BDP, BDS, BDH, intraday bars, ticks, BQL, and related analytics, backed by a Rust engine with support for sync and async APIs and multiple output backends.
Yes, if you have Bloomberg access and need more than a basic bdp wrapper. xbbg is actively maintained, has no known vulnerabilities, and is built for workflows that scale from simple requests to streaming, async, and non-pandas data pipelines. The Rust engine and Arrow-shaped output are advantages over pure-Python alternatives. Install friction is moderate due to compiled wheels, but the dependency footprint is lean without blpapi as a hard requirement.
Install
xbbg on PyPI
pip
pip install xbbguv
uv add xbbgpoetry
poetry add xbbgInstalling xbbg
Before you install
Medium install friction due to compiled wheels for multiple Python versions (3.10–3.14) and platforms, but no direct blpapi dependency required. Active maintenance with a release 7 days ago and 759 repository stars.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most financial workflows.
Quickstart
pip install xbbg
from xbbg import blp
prices = blp.bdp(["AAPL US Equity", "MSFT US Equity"], "PX_LAST")
hist = blp.bdh("SPX Index", "PX_LAST", "2024-01-01", "2024-12-31")
Requires authorized Bloomberg environment (Terminal/DAPI, SAPI/B-PIPE, or ZFP) and Bloomberg's shared runtime library (blpapi3_64.dll on Windows, libblpapi3_64.so on macOS/Linux). Linux wheels require glibc ≥ 2.28.
Verify before relying
- Whether the Rust engine's performance advantage over pure-Python alternatives is material for typical workflows
- Whether async worker pools and isolated subscription sessions are production-tested in high-frequency scenarios
- Whether the field cache and testing helpers are documented and stable for integration testing
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — narwhals |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,601/month — #12,409 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xbbg-1.4.6-cp310-cp310-macosx_11_0_universal2.whl; xbbg-1.4.6-cp310-cp310-manylinux_2_28_x86_64.whl; xbbg-1.4.6-cp310-cp310-win_amd64.whl; xbbg-1.4.6-cp311-cp311-macosx_11_0_universal2.whl; xbbg-1.4.6-cp311-cp311-manylinux_2_28_x86_64.whl; xbbg-1.4.6-cp311-cp311-win_amd64.whl; xbbg-1.4.6-cp312-cp312-macosx_11_0_universal2.whl; xbbg-1.4.6-cp312-cp312-manylinux_2_28_x86_64.whl; xbbg-1.4.6-cp312-cp312-win_amd64.whl; xbbg-1.4.6-cp313-cp313-macosx_11_0_universal2.whl; xbbg-1.4.6-cp313-cp313-manylinux_2_28_x86_64.whl; xbbg-1.4.6-cp313-cp313-win_amd64.whl; xbbg-1.4.6-cp314-cp314-macosx_11_0_universal2.whl; xbbg-1.4.6-cp314-cp314-manylinux_2_28_x86_64.whl; xbbg-1.4.6-cp314-cp314-win_amd64.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
lseg-dataClient library for accessing LSEG Data Platform…
permissive · top 15,000 on PyPI
openbb-equityProvides equity market data access through the…
agpl · top 15,000 on PyPI
yahooqueryRetrieves financial data from Yahoo Finance…
permissive · top 15,000 on PyPI
openbb-etfExtends the OpenBB SDK with commands to…
agpl · top 15,000 on PyPI
yfinanceFetches financial and market data from Yahoo…
permissive · top 1,000 on PyPI
databento-dbndatabento-dbn provides Python bindings for…
permissive · top 5,000 on PyPI
efinanceFetches historical and real-time stock, fund,…
permissive · top 15,000 on PyPI
openbbUnified interface to fetch financial market…
agpl · top 15,000 on PyPI
fastexcelReads Excel files (.xlsx, .xls) into Python…
permissive · top 5,000 on PyPI
polars-runtime-64A Rust-based analytical query engine for…
permissive · top 15,000 on PyPI