xbbg  by alpha-xone

Python API for comprehensive Bloomberg data access

Created 7 years ago
322 stars

Top 84.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

xbbg provides a high-performance, production-ready Python wrapper for the Bloomberg API, designed for quantitative researchers and financial engineers. It addresses the need for an intuitive and comprehensive interface to Bloomberg's extensive financial data services, offering significant advantages in speed, feature coverage, and developer experience over alternative solutions. The library aims to streamline data retrieval and analysis workflows for users familiar with Bloomberg's data ecosystem.

How It Works

The core of xbbg v1 is a Rust-powered asynchronous engine, which handles the heavy lifting of API requests and data processing. This engine is exposed through a clean, Pythonic API, preserving familiar function names and syntax (e.g., bdp, bdh). This hybrid architecture leverages Rust's performance capabilities for speed while maintaining the ease of use and integration of Python, enabling non-blocking operations and concurrent request handling.

Quick Start & Requirements

  • Installation:
    • Core library: pip install xbbg
    • Bloomberg API Python package: pip install blpapi --index-url=https://blpapi.bloomberg.com/repository/releases/python/simple/
  • Prerequisites:
    • Bloomberg C++ SDK (version 3.12.1 or higher)
    • Bloomberg Terminal access
  • Documentation: https://alpha-xone.github.io/xbbg/
  • Community: Discord

Highlighted Details

  • Comprehensive API Coverage: Supports reference data (BDP/BDS), historical time series (BDH), intraday bars (BDIB) with sub-minute precision, real-time subscriptions, BQL, BEQS, BSRCH, and technical analysis (BTA).
  • Production-Grade Features: Includes Parquet caching for intraday bars, robust async/await support, multi-backend output (pandas, Polars, PyArrow, DuckDB), full type hints for IDE integration, and exchange-aware market hours.
  • Developer Experience: Offers an intuitive, Pythonic API, Excel-compatible syntax, extensive documentation with over 100 examples, and active community support.
  • Performance: The Rust-backed engine provides significant performance improvements, especially for high-frequency and concurrent data requests.

Maintenance & Community

The project is actively maintained, with v1 representing a major Rust-powered upgrade. It features a vibrant community on Discord for support and discussion. Links to comprehensive documentation and examples are readily available.

Licensing & Compatibility

  • License: Apache License 2.0.
  • Compatibility: Supports Python 3.10-3.14. The Apache 2.0 license is permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

  • Requires a licensed Bloomberg Terminal and the Bloomberg C++ SDK, representing a significant dependency and setup overhead.
  • Certain advanced real-time features, such as market depth and option/futures chains, necessitate B-PIPE access.
  • The legacy pure-Python behavior is maintained in a separate 0.x release branch.
Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
12
Issues (30d)
22
Star History
13 stars in the last 30 days

Explore Similar Projects

Starred by Adam Wolff Adam Wolff(Claude Code Core; MTS at Anthropic), Samuel Colvin Samuel Colvin(Founder and Author of Pydantic), and
5 more.

anthropic-sdk-python by anthropics

2.4%
3k
Python SDK for Anthropic's REST API
Created 3 years ago
Updated 1 day ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
3 more.

risingwave by risingwavelabs

0%
8k
Stream processing and serving for AI agents and real-time data applications
Created 4 years ago
Updated 1 day ago
Feedback? Help us improve.