Our Principle
Design for Humans
xbbg keeps request plumbing, event loops, and concurrency details out of your notebooks, pipelines, and services so your code can say what licensed data it needs.
Async-first helpers are available in Python and Node.js, with synchronous ergonomics when you want them and the same engine underneath.
APIs that feel natural across Python and Node.js while sharing one licensed-data runtime.
import xbbg
xbbg.configure(host='localhost', port=8194)
prices = xbbg.bdp(
['AAPL US Equity', 'MSFT US Equity'],
['PX_LAST', 'VOLUME'],
)
history = xbbg.bdh(
'AAPL US Equity',
['PX_LAST', 'VOLUME'],
start_date='2024-01-01',
end_date='2024-01-31',
)Package comparison
Comprehensive Bloomberg service coverage
The xbbg README competitor set, condensed into the feature gaps that matter for production teams: service coverage, enterprise transport, true async execution, output backends, and a matching Node.js package on the shared Rust/Arrow core.
One async-first market-data platform: Python and Node.js APIs for licensed Bloomberg data workflows backed by a high-performance Rust/Arrow engine that integrates with the Bloomberg C++ SDK and keeps parsing and Arrow handoff out of Python.
- Coverage
- BDP/BDS/BDH/BDIB/BDTICK, streaming, BQL, BEQS, BSRCH, BQR, BTA, YAS, generic requests, fields, portfolios, curves, and fixed-income workflows.
- Infrastructure
- True async worker pools, reusable sessions, request middleware, ZFP, B-PIPE/SAPI auth, TLS, failover hosts, SOCKS5, and SDK logging.
- Outputs
- Zero-copy Arrow-native handoff to pandas, Polars, PyArrow, DuckDB, Narwhals, and JavaScript objects without maintaining parallel wrappers.
Official low-level SDK bindings.
- Strength
- Full SDK power and direct protocol control.
- Tradeoff
- Each app owns sessions, requests, correlation IDs, events, retries, and dataframe conversion.
- Gap
- No built-in dataframe/backend layer, reusable multi-engine worker pool, or xbbg-style Arrow output path; each application must decide where parsing, concurrency, and backend conversion live.
Python pandas helper package.
- Strength
- Prices, fundamentals, curves, and analytics helpers.
- Gap
- No broad BQL/BEQS/BSRCH/BQR/BTA/YAS/streaming surface or enterprise transport model.
Legacy pandas-era wrapper.
- Strength
- Existing BDP/BDH/BDS-style scripts can stay stable.
- Gap
- No modern async, worker-pool, enterprise transport, typed-error, or multi-backend architecture.
Python interface around Bloomberg Open API concepts.
- Strength
- Cleaner than pdblp for Python-only Open API usage.
- Gap
- Still a classic Python/pandas wrapper rather than a shared Rust/Arrow engine.
Polars-focused Bloomberg package.
- Strength
- Useful when Polars is the chosen dataframe layer.
- Gap
- Partial service surface; xbbg keeps Polars as one backend alongside pandas, PyArrow, DuckDB, Narwhals, and Node.js.
Fixed income support
Bonds, curves, quotes, and yield analytics
Fixed-income workflows are first-class in xbbg: discover instruments, request dealer quotes, run yield/risk analytics, and send the results through the same Python and Node.js surfaces.
Find bonds, curves, and preferreds
Use BSRCH, BGOVTS, BCURVES, corporate bond, and preferred workflows to discover instruments before analysis.
- bsrch
- bgovts
- bcurves
- corporate_bonds
- preferreds
Yield, risk, spreads, and cashflows
YAS and bond helpers cover yield analysis, duration, convexity, DV01, spread measures, key-rate risk, and cashflow schedules.
- yas
- bond_risk
- bond_spreads
- bond_cashflows
- bond_key_rates
Dealer quotes and credit workflows
BQR quote requests, broker attribution, spread/yield fields, and CDX helpers sit beside the same async request model.
- bqr
- abqr
- broker codes
- include_yield
- cdx
Same Arrow-native outputs
Fixed-income results use the same backend choices as the rest of xbbg: pandas, Polars, PyArrow, DuckDB, Narwhals, or Node.js objects.
- pandas
- Polars
- PyArrow
- DuckDB
- Node.js
It's all about
One Engine
Python and Node.js hook into the same high-performance Rust core, so notebooks, services, and trading tools share one request model for licensed Bloomberg data workflows instead of maintaining separate wrappers. `xbbg` for Python and `@xbbg/core` for Node.js are the public surfaces; the native engine does the heavy lifting underneath.
Bloomberg data request helpers
Use BDP, BDH, and BDS helpers at the call site while xbbg handles session lifecycle, request construction, event parsing, and output conversion underneath.
import xbbg
snapshot = xbbg.bdp(
['AAPL US Equity', 'MSFT US Equity'],
['PX_LAST', 'NAME', 'VOLUME'],
backend='polars',
)Configuration belongs in one place
Local Terminal, B-PIPE, auth, TLS, ZFP, SOCKS5, and failover are connection concerns. Configure them once and keep request code focused on market data.
import xbbg
xbbg.configure(
host='localhost',
port=8194,
auth='OS_LOGON',
)import * as xbbg from '@xbbg/core'
xbbg.configure({
host: 'localhost',
port: 8194,
auth: 'OS_LOGON',
})Node.js API surface
`@xbbg/core` exposes the same session and request model in a Node.js-friendly shape, backed by the same high-performance Rust core as the Python package.
import * as xbbg from '@xbbg/core'
xbbg.configure({ host: 'localhost', port: 8194 })
const history = await xbbg.blp.abdh(
['AAPL US Equity'],
['PX_LAST'],
'2024-01-01',
'2024-01-31',
)Clear outputs for downstream systems
Return pandas, Polars, PyArrow, DuckDB, or Narwhals from Python while preserving Bloomberg field labels and typed Arrow handoff underneath.
import xbbg
xbbg.set_backend('pyarrow')
table = xbbg.bds(
'SPX Index',
'INDX_MEMBERS',
)
Request shapes that stay readable
Bloomberg options without mystery glue
xbbg keeps Bloomberg-style arguments visible at the call site while normalizing dates, overrides, output direction, and backend selection through the shared engine.
Use the concise helpers for common workflows and drop to configuration or service-level APIs when enterprise connectivity requires it.
from datetime import date
import xbbg
weekly = xbbg.bdh(
'AAPL US Equity',
'PX_LAST',
start_date=date(2024, 1, 1),
end_date=date(2024, 3, 31),
Per='W', # periodicitySelection='WEEKLY'
Fill='P', # nonTradingDayFillMethod='PREVIOUS_VALUE'
Direction='V', # vertical / long output shape
)Connection truth, not hidden state
Terminal, B-PIPE, SAPI, TLS, and ZFP belong in explicit configuration.
xbbg treats Bloomberg connectivity as a system-level concern. Host lists, authentication, failover, TLS material, and ZFP settings are named instead of smuggled into request helpers.
Request middleware gives teams one place for tracing, metrics, audit tags, policy checks, and other production controls.
import xbbg
xbbg.configure(host='localhost', port=8194)
quote = xbbg.bdp('AAPL US Equity', 'PX_LAST')import xbbg
xbbg.configure(
hosts=['bpipe-primary', 'bpipe-secondary'],
port=8194,
auth='APPLICATION_ONLY',
app_name='xbbg-prod',
)import xbbg
xbbg.configure(
zfp_remote='host:8194',
tls_client_credentials='client.p12',
tls_trust_material='root.pem',
)Bloomberg data request path
- 01Python / Node request`xbbg` and `@xbbg/core` call sites
- 02Typed request modelDates, fields, overrides, auth, and output shape
- 03Rust session + worker poolShared Rust engine for both public packages
- 04Bloomberg C++ SDK integrationTerminal, B-PIPE, ZFP, TLS, and entitlement paths
- 05Arrow-native outputPandas, Polars, PyArrow, DuckDB, Narwhals, or JS objects
For operators
Observable architecture
The flow makes the handoff explicit: public package call sites become typed requests, the shared Rust engine owns true async workers and sessions, the C++ SDK integration handles licensed connectivity, and zero-copy Arrow output carries the result forward without a Python GIL bottleneck.
For application teams
True async and streaming without switching stacks
Use sync helpers when convenient. When concurrency matters, async helpers, reusable sessions, worker pools, and streaming subscriptions all run through the same non-blocking Rust engine.
Same API shape, real concurrency
Blocking helpers for scripts, true async helpers for services.
Use regular helpers in notebooks and scripts. Use `a`-prefixed helpers when licensed Bloomberg data requests should overlap without blocking application code.
Rust owns worker pools, reusable sessions, event handling, parsing, and Arrow handoff; Python receives ready-to-use results without doing the heavy lifting under the GIL.
import asyncio
import xbbg
async def main():
apple, microsoft = await asyncio.gather(
xbbg.abdp('AAPL US Equity', 'PX_LAST'),
xbbg.abdp('MSFT US Equity', 'PX_LAST'),
)
return apple, microsoft
results = asyncio.run(main())PyPI package for notebooks, pipelines, and Python services: sync ergonomics, `a`-prefixed async helpers, one Rust/Arrow engine.
Node.js public surface@xbbg/corenpm package for services that need the same typed request model and async engine from Node.js.
One shared engineRust / Arrow coreSessions, worker pools, request middleware, Bloomberg C++ SDK integration, and Arrow outputs stay aligned across both runtimes.
Two public packages, one engine
Choose Python or Node.js at the call site; the request model, runtime, and output contract stay the same.


xbbg
Intuitive APIs for Bloomberg data
xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P. Bloomberg and related marks are trademarks or service marks of Bloomberg Finance L.P. or its affiliates. Use of Bloomberg data, APIs, and SDKs requires appropriate Bloomberg licenses and entitlements.