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; Python also offers synchronous helpers when you want them, on 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 market 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, Python request middleware, ZFP, B-PIPE/SAPI auth, TLS, failover hosts, SOCKS5, and SDK logging.
- Outputs
- Arrow-native results converted once, at the API edge, to pandas, Polars, PyArrow, DuckDB, Narwhals, or JavaScript Arrow tables and 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 async, worker-pool, or multi-backend architecture; enterprise transport and typed errors are limited.
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 market data workflows instead of maintaining separate wrappers. xbbg for Python and @xbbg/core for Node.js are the core 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_method='user',
)import * as xbbg from '@xbbg/core'
xbbg.configure({
host: 'localhost',
port: 8194,
auth: { method: 'user' },
})import io.github.underloam.xbbg.AuthConfig;
import io.github.underloam.xbbg.EngineConfig;
import io.github.underloam.xbbg.Xbbg;
Xbbg.configure(
EngineConfig.builder()
.host("localhost")
.port(8194)
.auth(AuthConfig.user())
.build()
);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.
In Python, 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(
servers=[('bpipe-primary', 8194), ('bpipe-secondary', 8194)],
auth_method='app',
app_name='xbbg-prod',
)import xbbg
xbbg.configure(
zfp_remote='8194',
tls_client_credentials='client.p12',
tls_trust_material='trust.p7',
)Bloomberg data request path
- 01Python / Node request
xbbgand@xbbg/corecall sites - 02Typed request modelDates, fields, overrides, auth, and output shape
- 03Rust session + worker poolShared Rust engine for both core 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 Arrow-native 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.
npm package for services that need the same typed request model and async engine from Node.js.
Java public surfaceio.github.underloam:xbbgMaven artifacts for Java 8+ and Java 17+ (xbbg-jdk17): JNI bindings, CompletableFuture, Flow streams, and Arrow Java.
Sessions, worker pools, Bloomberg C++ SDK integration, and Arrow outputs stay aligned across Python, Node.js, and Java; Python adds request middleware.
Three core surfaces, one engine
Choose Python, Node.js, or Java at the call site; the request model, runtime, and output contract stay the same.
The xbbg project family
More than one tool, same standards
Open-source building blocks for market-data work: typed APIs, Arrow-friendly outputs, and documentation generated from each release.
Python, Node.js, and Java APIs for licensed Bloomberg data on one Rust engine: async requests, streaming, fixed income, and Arrow-native outputs.
pip install xbbgnpm install @xbbg/coreio.github.underloam:xbbg
TypeScript utilities that fetch, parse, and normalize company and topic news, research papers, central-bank publications, and data releases.
npm install @xbbg/xnews
A Rust kdb+/q IPC client for Python and Node.js: Narwhals DataFrames in Python, Arrow tables in Node.js, TLS, subscriptions, and q binary file reads.
pip install xqdbnpm install @xbbg/xqdb


xbbg
Intuitive APIs for market 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.