Skip to content
xbbg logo

Bloomberg Data Workflows Built for Humans

Async-first APIs for licensed Bloomberg data workflows in Python and Node.js, with enterprise-grade connectivity, zero-copy Arrow handoff, and no Python GIL bottleneck.
Powered by Magic.

Get Started
pip install xbbg

See why quants, traders, and developers love xbbg.

A modern API framework for licensed Bloomberg data workflows

  • Async-first
  • Python package
  • Node package
  • Rust engine
  • Arrow-native
  • SDK integration

One Bloomberg data engine exposed through first-class Python and Node.js packages.

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.

python
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',
)

BDP / BDH / BDS

Reference, historical, and bulk data helpers.

Backend choice

pandas, Polars, PyArrow, DuckDB, or Narwhals.

Async-first

Concurrent requests are first-class; sync helpers stay ergonomic.

Streaming data

Subscription workflows share the same engine.

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.

xbbg

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.
Bloomberg blpapi

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.
bbg-fetch / BloombergFetch

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.
pdblp

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.
blp

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-bloomberg

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.

Discovery

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
Analytics

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
Markets

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
Outputs

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.

python
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.

python
import xbbg

xbbg.configure(
    host='localhost',
    port=8194,
    auth='OS_LOGON',
)
ts
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.

ts
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.

python
import xbbg

xbbg.set_backend('pyarrow')

table = xbbg.bds(
    'SPX Index',
    'INDX_MEMBERS',
)
xbbg product card

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.

python
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.

python
import xbbg

xbbg.configure(host='localhost', port=8194)

quote = xbbg.bdp('AAPL US Equity', 'PX_LAST')
python
import xbbg

xbbg.configure(
    hosts=['bpipe-primary', 'bpipe-secondary'],
    port=8194,
    auth='APPLICATION_ONLY',
    app_name='xbbg-prod',
)
python
import xbbg

xbbg.configure(
    zfp_remote='host:8194',
    tls_client_credentials='client.p12',
    tls_trust_material='root.pem',
)

Bloomberg data request path

  1. 01Python / Node request`xbbg` and `@xbbg/core` call sites
  2. 02Typed request modelDates, fields, overrides, auth, and output shape
  3. 03Rust session + worker poolShared Rust engine for both public packages
  4. 04Bloomberg C++ SDK integrationTerminal, B-PIPE, ZFP, TLS, and entitlement paths
  5. 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.

Sync helpersBDP, BDH, BDS, BQL, and service requests for scripts and notebooks.
True async APIsa-prefixed helpers run concurrent licensed data workloads without blocking application code.
StreamingSubscriptions share the same session model and diagnostics.
Zero-copy outputsArrow handoff to pandas, Polars, PyArrow, DuckDB, Narwhals, or JS objects avoids Python object churn.
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.

python
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())

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 logo
xbbg logo

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.

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.