{"id":50453195,"url":"https://github.com/xbbg-org/xbbg","last_synced_at":"2026-06-01T01:02:50.048Z","repository":{"id":33503130,"uuid":"157477269","full_name":"xbbg-org/xbbg","owner":"xbbg-org","description":"Intuitive Data Workflows","archived":false,"fork":false,"pushed_at":"2026-05-30T04:46:59.000Z","size":19242,"stargazers_count":741,"open_issues_count":2,"forks_count":65,"subscribers_count":36,"default_branch":"main","last_synced_at":"2026-05-30T22:10:38.248Z","etag":null,"topics":["apache-arrow","blpapi","finance","financial-data","fintech","market-data","napi-rs","nodejs","pandas","polars","pyo3","python","quantitative-finance","rust","streaming","timeseries"],"latest_commit_sha":null,"homepage":"https://xbbg-org.github.io/xbbg/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xbbg-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-14T02:19:24.000Z","updated_at":"2026-05-30T18:45:37.000Z","dependencies_parsed_at":"2025-11-14T05:03:10.291Z","dependency_job_id":null,"html_url":"https://github.com/xbbg-org/xbbg","commit_stats":{"total_commits":432,"total_committers":10,"mean_commits":43.2,"dds":"0.10185185185185186","last_synced_commit":"2d4b50322b9eb9c4f44e06dc006a0abf31d5c9dd"},"previous_names":["xbbg-org/xbbg","alpha-xone/xbbg"],"tags_count":130,"template":false,"template_full_name":null,"purl":"pkg:github/xbbg-org/xbbg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbbg-org%2Fxbbg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbbg-org%2Fxbbg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbbg-org%2Fxbbg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbbg-org%2Fxbbg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbbg-org","download_url":"https://codeload.github.com/xbbg-org/xbbg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbbg-org%2Fxbbg/sbom","scorecard":{"id":186535,"data":{"date":"2025-08-11","repo":{"name":"github.com/alpha-xone/xbbg","commit":"266d68a53bda61745191e1a86b0f1f32b33ae082"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto_ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/pypi_upload.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto_ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/auto_ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto_ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/auto_ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi_upload.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/pypi_upload.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi_upload.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/alpha-xone/xbbg/pypi_upload.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/auto_ci.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/auto_ci.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/auto_ci.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/pypi_upload.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/pypi_upload.yml:21","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2023-238 / GHSA-5wvp-7f3h-6wmm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T19:54:09.003Z","repository_id":33503130,"created_at":"2025-08-16T19:54:09.003Z","updated_at":"2025-08-16T19:54:09.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33755371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-arrow","blpapi","finance","financial-data","fintech","market-data","napi-rs","nodejs","pandas","polars","pyo3","python","quantitative-finance","rust","streaming","timeseries"],"created_at":"2026-06-01T01:02:49.330Z","updated_at":"2026-06-01T01:02:50.032Z","avatar_url":"https://github.com/xbbg-org.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD013 MD031 MD032 MD033 MD041 MD051 --\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://xbbg.org/python/quickstart\"\u003e\n    \u003cimg src=\".github/assets/readme-hero-flat.svg\" alt=\"xbbg banner\" width=\"100%\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[![PyPI version](https://img.shields.io/pypi/v/xbbg.svg)](https://pypi.org/project/xbbg/)\n[![Python versions](https://img.shields.io/pypi/pyversions/xbbg.svg)](https://pypi.org/project/xbbg/)\n[![Conda version](https://anaconda.org/conda-forge/xbbg/badges/version.svg)](https://anaconda.org/conda-forge/xbbg)\n[![Downloads](https://pepy.tech/badge/xbbg)](https://pepy.tech/project/xbbg)\n[![CI](https://github.com/xbbg-org/xbbg/actions/workflows/ci-rust.yml/badge.svg)](https://github.com/xbbg-org/xbbg/actions/workflows/ci-rust.yml)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord\u0026logoColor=white)](https://discord.gg/P34uMwgCjC)\n\n**Links:** [Documentation](https://xbbg.org/) · [Quickstart](#quickstart) · [Configuration](#configuration-and-engines) · [Examples notebook](py-xbbg/examples/xbbg_jupyter_examples.ipynb) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)\n\n\u003c/div\u003e\n\n---\n\n\u003c!-- xbbg:latest-release-start --\u003e\nLatest release: xbbg==1.2.6 (release: [notes](https://github.com/xbbg-org/xbbg/releases/tag/v1.2.6))\n\u003c!-- xbbg:latest-release-end --\u003e\n\n\u003e This `main` branch is the Rust-powered v1 release. For the legacy pure-Python line, use [`release/0.x`](https://github.com/xbbg-org/xbbg/tree/release/0.x).\n\n\u003e **Important:** xbbg is an independent open-source project. It is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P. or its affiliates. Bloomberg, Bloomberg Terminal, B-PIPE, BQL, and related names are trademarks or service marks of their respective owners. xbbg does not grant access to Bloomberg services, data, software, licenses, credentials, or entitlements; users must obtain and use those separately under their own Bloomberg agreements and applicable policies.\n\n## Contents\n\n- [What is xbbg?](#what-is-xbbg)\n- [Why xbbg?](#why-xbbg)\n- [Installation](#installation)\n- [Quickstart](#quickstart)\n- [JavaScript and Node](#javascript-and-node)\n- [Configuration and engines](#configuration-and-engines)\n- [Common API surface](#common-api-surface)\n- [Output backends](#output-backends)\n- [Async usage](#async-usage)\n- [Subscriptions: raw, tick mode, and all fields](#subscriptions-raw-tick-mode-and-all-fields)\n- [MCP server](#mcp-server)\n- [Troubleshooting](#troubleshooting)\n- [Development](#development)\n- [Project links](#project-links)\n\n## What is xbbg?\n\nxbbg is a Bloomberg client with Python as the primary surface and companion JavaScript/Node bindings, all backed by a shared Rust engine for request execution, response parsing, Arrow-shaped data movement, async workers, typed errors, and diagnostics.\n\nUse xbbg when you already have Bloomberg access and want higher-level helpers for common request patterns, plus an escape hatch for lower-level Bloomberg service requests.\n\nCore scope:\n\n- request helpers for BDP, BDS, BDH, intraday bars, ticks, BQL, BEQS, BSRCH, BQR, BTA, YAS, and related analytics\n- local Bloomberg Desktop API / DAPI by default\n- configuration for managed Bloomberg environments, including B-PIPE/SAPI, ZFP leased lines, TLS, failover hosts, SOCKS5, and SDK logging\n- sync and async Python APIs backed by the same engine\n- output as Narwhals, native xbbg Arrow carriers, PyArrow, pandas, Polars, DuckDB, and other optional Narwhals-backed libraries\n- JavaScript/Node bindings in [`js-xbbg`](js-xbbg/README.md)\n\n## Why xbbg?\n\nxbbg's project goal is direct: be the most complete, technically advanced, and performance-focused open-source Bloomberg client for Python workflows, while staying independent of Bloomberg and requiring users to bring their own authorized Bloomberg access.\n\nThe short version: if all you need is a tiny one-off `bdp()` wrapper, several packages can work. xbbg is built for the path where that notebook later grows into intraday data, BQL, streaming, B-PIPE/SAPI, ZFP, async services, typed errors, diagnostics, and non-pandas data pipelines.\n\n| Capability | xbbg | raw `blpapi` | pdblp / blp | bbg-fetch | polars-bloomberg |\n| --- | --- | --- | --- | --- | --- |\n| BDP/BDS/BDH helpers | yes | manual SDK code | yes | yes | partial |\n| Intraday bars and ticks | yes | manual SDK code | limited / no | no | partial |\n| Streaming subscriptions | yes | manual SDK code | no | no | no |\n| BQL, BEQS, BSRCH, BQR, YAS, BTA | broad helper coverage | manual SDK code | limited | limited | partial |\n| DAPI, SAPI/B-PIPE, ZFP, TLS, failover, SOCKS5 | configurable engine support | manual SDK code | limited | limited | limited |\n| Async worker pools and isolated subscription sessions | yes | application-owned | no | no | no |\n| Rust request/parsing engine with Arrow-shaped output | yes | no | no | no | no |\n| Output backends beyond pandas | Narwhals, native, PyArrow, pandas, Polars, DuckDB | application-owned | pandas-first | pandas-first | Polars-first |\n| Typed errors, diagnostics, field cache, testing helpers | yes | application-owned | limited | limited | limited |\n| Usable install footprint (Windows x64, Python 3.14) | xbbg 1.2.2 + narwhals 2.21.0 + blpapi 3.26.3.1 = 22.076 MiB | blpapi 3.26.3.1 = 13.653 MiB | pdblp 0.1.8 + pandas 3.0.3 + blpapi 3.26.3.1 = 88.139 MiB / blp 0.0.4 + pandas 3.0.3 + blpapi 3.26.3.1 = 88.246 MiB | bbg-fetch 2.0.2 + numpy 2.4.4 + pandas 3.0.3 + blpapi 3.26.3.1 = 88.156 MiB | polars-bloomberg 0.5.4 + polars 1.40.1 + blpapi 3.26.3.1 = 191.547 MiB |\n\nInstall footprints were measured in clean target directories on this workstation with the usable install recipe for each column: `xbbg + blpapi`, raw `blpapi`, `pdblp + pandas + blpapi`, `blp + pandas + blpapi`, `bbg-fetch + blpapi`, and `polars-bloomberg` (which pulls `blpapi` transitively).\nThat makes xbbg the best fit in this comparison for teams that want one Bloomberg-connected Python client that can start with simple BDP/BDH calls and scale into institutional transport, async, streaming, diagnostics, and multi-backend data workflows.\n\n## Installation\n\n```cmd\npip install xbbg\n```\n\nConda users can install the conda-forge build:\n\n```cmd\nconda install -c conda-forge xbbg\n```\n\nMost users should also install Bloomberg's official Python package so xbbg can locate the Bloomberg SDK/runtime:\n\n```cmd\npip install blpapi --index-url=https://blpapi.bloomberg.com/repository/releases/python/simple/\n```\n\nSupported Python versions: **3.10 through 3.14**.\n\nRequirements and notes:\n\n- You need an authorized Bloomberg environment: local Terminal/DAPI, SAPI/B-PIPE, or ZFP, depending on your setup.\n- If you build from source, stage the Bloomberg C++ SDK with `bash ./scripts/sdktool.sh` on macOS/Linux or `.\\\\scripts\\\\sdktool.ps1` on Windows PowerShell.\n- If you manage the SDK yourself, set `BLPAPI_ROOT` or use `xbbg.set_sdk_path(...)`.\n- Optional dataframe conversions are installed separately: `xbbg[pyarrow]`, `xbbg[pandas]`, `xbbg[polars]`, or `xbbg[duckdb]`.\n\nVerify the install:\n\n```python\nimport xbbg\n\nprint(xbbg.__version__)\nprint(xbbg.get_sdk_info())\n```\n\n## Quickstart\n\n```python\nfrom xbbg import blp\n\n# Reference data\nprices = blp.bdp([\"AAPL US Equity\", \"MSFT US Equity\"], \"PX_LAST\")\n\n# Historical data\nhist = blp.bdh(\"SPX Index\", \"PX_LAST\", \"2024-01-01\", \"2024-12-31\")\n\n# Intraday bars\nbars = blp.bdib(\"TSLA US Equity\", dt=\"2024-01-15\", interval=5)\n```\n\nCommon request patterns:\n\n```python\nfrom xbbg import blp\n\n# Multiple fields\ninfo = blp.bdp(\"NVDA US Equity\", [\"Security_Name\", \"GICS_Sector_Name\", \"PX_LAST\"])\n\n# Bloomberg-style overrides\nvwap = blp.bdp(\"AAPL US Equity\", \"Eqy_Weighted_Avg_Px\", VWAP_Dt=\"20240115\")\n\n# Bulk data\nholders = blp.bds(\"AAPL US Equity\", \"DVD_Hist_All\", DVD_Start_Dt=\"20240101\")\n\n# BQL\nresult = blp.bql(\"get(px_last) for('AAPL US Equity')\")\n\n# Field lookup\nfields = blp.bflds(search_spec=\"vwap\")\n\n# Equity screening and constituents\nscreen = blp.beqs(screen=\"MyScreen\", asof=\"2024-01-01\")\nmembers = blp.index_members(\"SPX Index\", asof=\"2024-01-02\")\n\n# Workflow helpers\nactive = blp.active_futures(\"ESA Index\", \"2024-01-15\")\nsurface = blp.vol_surface(\"SPX Index\", start_date=\"2024-01-02\", end_date=\"2024-01-05\")\nresolved = blp.resolve_isins([\"US0378331005\", \"INVALIDISIN000\"])\n```\n\nFor longer walkthroughs and example output shapes, use the [examples notebook](py-xbbg/examples/xbbg_jupyter_examples.ipynb) or [xbbg.org](https://xbbg.org/).\n\n## JavaScript and Node\n\nxbbg also ships experimental Node bindings in [`@xbbg/core`](js-xbbg/README.md). The JS layer uses the same Rust engine through a native N-API addon, so Node can use the same Bloomberg connection modes and request surfaces as Python.\n\n```bash\nnpm install @xbbg/core\n# or\nbun add @xbbg/core\n```\n\nPackaged native addons are currently provided for macOS arm64, Linux x64, and Windows x64. You still need Bloomberg access plus Bloomberg SDK runtime libraries on the target system.\n\n```ts\nimport * as xbbg from '@xbbg/core';\n\nxbbg.configure({ host: 'localhost', port: 8194 });\n\nconst hist = await xbbg.blp.abdh(['AAPL US Equity'], ['PX_LAST'], '2024-01-01', '2024-12-31');\nconst ref = await xbbg.blp.abdp(['AAPL US Equity'], ['PX_LAST', 'SECURITY_NAME']);\n```\n\nSee [`js-xbbg/README.md`](js-xbbg/README.md) for platform packaging, runtime prerequisites, and the current alpha API surface.\n\nFor LangChain and LangGraph agents, use [`@xbbg/langgraph`](js-xbbg-langgraph/README.md). It exposes reusable server-side Bloomberg tools backed by `@xbbg/core` without making MCP, a chat app, or a browser integration the core path:\n\n```bash\nnpm install @xbbg/langgraph @xbbg/core @langchain/core\n```\n\n```ts\nimport { createAllBloombergTools, BLOOMBERG_TOOL_INSTRUCTIONS } from '@xbbg/langgraph';\n\nconst tools = createAllBloombergTools({ maxSecurities: 10, maxFields: 10 });\n```\n\nUse the existing [`apps/xbbg-mcp`](apps/xbbg-mcp/README.md) package only when you specifically need MCP.\n\n## Configuration and engines\n\nBy default, xbbg starts a Rust-backed engine and connects to local Bloomberg Desktop API / DAPI on `localhost:8194`. Configure the engine before the first request when you need a different transport, authentication mode, worker count, timeout policy, field cache, or logging behavior.\n\n```python\nfrom xbbg import blp, configure\n\n# Equivalent to the default local Terminal / DAPI path\nconfigure(host=\"localhost\", port=8194)\n\nprint(blp.bdp(\"AAPL US Equity\", \"PX_LAST\"))\n```\n\nCommon environments:\n\n| Environment | Use when | Configuration shape |\n| --- | --- | --- |\n| Desktop API / DAPI | Local Bloomberg Terminal session | no config, or `configure(host=\"localhost\", port=8194)` |\n| Direct server / SAPI | Firm-managed Bloomberg server | `configure(host=\"bpipe-host\", port=8194, auth_method=\"app\", app_name=\"...\")` |\n| B-PIPE | Enterprise Bloomberg feed infrastructure | direct host/failover config plus the auth/TLS settings your Bloomberg setup requires |\n| ZFP leased line | Bloomberg zero-footprint leased-line path | `configure(zfp_remote=\"8194\", tls_client_credentials=\"...\", tls_trust_material=\"...\")` |\n\nExample B-PIPE/SAPI-style configuration:\n\n```python\nfrom xbbg import configure\n\nconfigure(\n    host=\"bpipe-host\",\n    port=8194,\n    auth_method=\"app\",\n    app_name=\"my-app\",\n    request_pool_size=4,\n    subscription_pool_size=2,\n    num_start_attempts=5,\n)\n```\n\nExample ZFP leased-line configuration:\n\n```python\nfrom xbbg import configure\n\nconfigure(\n    zfp_remote=\"8194\",\n    tls_client_credentials=\"/path/to/client.p12\",\n    tls_client_credentials_password=\"\u003cload from your secret store\u003e\",\n    tls_trust_material=\"/path/to/trust.pem\",\n)\n```\n\nThe engine uses separate worker pools for request/response calls and subscriptions:\n\n- request workers hold independent Bloomberg sessions and dispatch BDP/BDH/BDS/BQL-style calls across the pool\n- subscription sessions are isolated from request workers, so live streams do not share a single blocking session with batch requests\n- field validation, field-type caching, SDK logging, retry policy, keep-alive, slow-consumer thresholds, TLS, SOCKS5, and failover servers are configuration options rather than per-call ad hoc code\n\nUse `Engine(...)` when an application needs a scoped engine with its own connection settings instead of mutating global configuration.\n\n## Common API surface\n\n| Area | Functions |\n| --- | --- |\n| Reference and bulk data | `bdp`, `bds`, `bflds`, `fieldInfo`, `fieldSearch`, `blkp`, `bport` |\n| Historical data | `bdh`, `dividend`, `earnings`, `turnover`, `dividend_yield` |\n| Intraday data | `bdib`, `bdtick` |\n| Query and screening | `bql`, `beqs`, `bsrch`, `bqr`, `bcurves`, `bgovts`, `etf_holdings`, `index_members` |\n| Analytics and utilities | `yas`, `bta`, `ta_studies`, `ta_study_params`, `convert_ccy`, `fut_ticker`, `active_futures`, `futures_curve`, `vol_surface`, `resolve_isins`, `issuer_isins`, `cdx_ticker`, `active_cdx` |\n| Real-time data | `subscribe`, `stream`, `vwap`, `mktbar`, `depth`, `chains` |\n| Generic requests | `request`, `Service`, `Operation`, `RequestParams`, `OutputMode` |\n| Schema and diagnostics | `bops`, `bschema`, `get_sdk_info`, `enable_sdk_logging`, `print_backend_status` |\n| Testing helpers | `xbbg.testing.create_mock_response`, `xbbg.testing.mock_engine` |\n\nMost sync helpers have async counterparts with an `a` prefix: `bdp` → `abdp`, `bdh` → `abdh`, `bdib` → `abdib`, `request` → `arequest`.\n\n## Output backends\n\nxbbg defaults to a Narwhals DataFrame. When PyArrow is installed, the Narwhals frame is backed by a real `pyarrow.Table`; otherwise xbbg falls back through available dataframe libraries and finally to its native Arrow carrier.\n\n```python\nfrom xbbg import Backend, blp\n\n# Default Narwhals output\nframe = blp.bdh(\"SPX Index\", \"PX_LAST\", \"2024-01-01\", \"2024-12-31\")\n\n# Explicit native xbbg Arrow carrier\ntable = blp.bdp(\"AAPL US Equity\", \"PX_LAST\", backend=\"native\")\n\n# Optional conversions\nas_pyarrow = blp.bdp(\"IBM US Equity\", \"PX_LAST\", backend=Backend.PYARROW)\nas_pandas = blp.bdp(\"MSFT US Equity\", \"PX_LAST\", backend=Backend.PANDAS)\nas_polars = blp.bdp(\"AAPL US Equity\", \"PX_LAST\", backend=Backend.POLARS)\nas_duckdb = blp.bdh(\"SPX Index\", \"PX_LAST\", \"2024-01-01\", \"2024-12-31\", backend=Backend.DUCKDB)\n```\n\nOutput shape is controlled with `format=`, including `long`, `long_typed`, `long_metadata`, and `semi_long`.\n\n## Async usage\n\nUse async helpers directly in async applications:\n\n```python\nimport asyncio\nfrom xbbg import blp\n\nasync def main():\n    aapl, msft = await asyncio.gather(\n        blp.abdp(\"AAPL US Equity\", \"PX_LAST\"),\n        blp.abdp(\"MSFT US Equity\", \"PX_LAST\"),\n    )\n    return aapl, msft\n\nresult = asyncio.run(main())\n```\n\nIn Jupyter and VS Code Interactive, one-shot sync calls such as `blp.bdp(...)` and `blp.bdh(...)` use a notebook-only bridge when an IPykernel event loop is already running. Generic async applications such as FastAPI or ASGI services should still use the async APIs directly.\n\n## Subscriptions: raw, tick mode, and all fields\n\nUse `asubscribe()` when you need dynamic add/remove, explicit unsubscribe, raw Arrow batches, or subscription health diagnostics. Use `stream()` when you only want the simple async-iterator wrapper.\n\n```python\nfrom xbbg import asubscribe\n\nsub = await asubscribe(\n    [\"AAPL US Equity\"],\n    [\"LAST_PRICE\", \"BID\", \"ASK\"],\n    tick_mode=True,\n    all_fields=True,\n    conflate=True,\n)\n\nasync for tick in sub:\n    print(tick)       # dict ticks in tick_mode\n    print(sub.stats)  # messages_received, dropped_batches, data_loss_events, ...\n    break\n\nawait sub.unsubscribe()\n```\n\n```python\nraw_sub = await asubscribe([\"AAPL US Equity\"], [\"LAST_PRICE\"], raw=True)\n\nasync for batch in raw_sub:\n    print(batch.to_table())  # raw xbbg ArrowRecordBatch -\u003e ArrowTable\n    break\n\nawait raw_sub.unsubscribe()\n```\n\nKey behaviors:\n\n- `raw=True` or `output=\"record_batch\"` yields raw xbbg `ArrowRecordBatch` values for max-performance consumers\n- default iteration without `raw=True` returns the configured backend output instead of raw record batches\n- `tick_mode=True` or `output=\"dict\"` returns native dict ticks and implies raw subscription mode\n- `all_fields=True` exposes all top-level scalar Bloomberg subscription fields\n- filtered mode keeps requested fields plus `MKTDATA_EVENT_TYPE` and `MKTDATA_EVENT_SUBTYPE`\n- `conflate=True` requests Bloomberg-conflated quote updates on `//blp/mktdata`; trades are still delivered as received\n- `sub.add(...)`, `sub.remove(...)`, `sub.status`, `sub.events`, `sub.failed_tickers`, and `sub.stats` expose runtime control and diagnostics\n\nIn Node, pass `{ allFields: true }` to `stream()` / `subscribe()` helpers for the same top-level field expansion. JS subscriptions use a native zero-copy Arrow path for supported schemas and fail fast with column-level diagnostics when a schema cannot use that path.\n\n## MCP server\n\nThe repository also includes a local MCP server for coding-agent workflows. It wraps selected xbbg request/response operations and returns bounded JSON results with schema metadata.\n\nSee [`apps/xbbg-mcp/README.md`](apps/xbbg-mcp/README.md) for installation, supported environment variables, and release asset notes. The MCP release assets do not include Bloomberg SDK files or runtime components.\n\n## Troubleshooting\n\nEmpty results usually mean one of the inputs or entitlements is wrong rather than that the Python call failed:\n\n```python\nfrom xbbg import blp\n\n# Check security lookup and field discovery\nprint(blp.blkp(\"Apple\", yellowkey=\"eqty\"))\nprint(blp.fieldSearch(\"vwap\"))\n```\n\nConnection failures:\n\n- confirm Bloomberg Terminal is running and logged in for local DAPI usage\n- confirm the host, port, auth method, TLS files, and entitlements for SAPI/B-PIPE/ZFP environments\n- run `print(xbbg.get_sdk_info())` to see how the SDK/runtime was detected\n- enable SDK logging before the first session when debugging low-level connection problems\n\nTimeouts and large responses:\n\n- increase per-request timeout where appropriate\n- split large historical/tick requests into smaller date ranges\n- tune `request_pool_size`, `subscription_pool_size`, queue sizes, and keep-alive settings for managed infrastructure\n\nWhen reporting issues, include:\n\n1. xbbg version: `import xbbg; print(xbbg.__version__)`\n2. Python version and operating system\n3. Bloomberg connection mode: DAPI, SAPI/B-PIPE, ZFP, or other\n4. minimal code to reproduce\n5. full traceback or error message\n\n## Development\n\nSet up the development environment with [pixi](https://pixi.sh/):\n\n```bash\n# Stage an authorized Bloomberg SDK locally under vendor/blpapi-sdk/\nbash ./scripts/sdktool.sh               # macOS/Linux\n# .\\scripts\\sdktool.ps1                # Windows PowerShell\n\n# Install the environment and compile the Rust extension\npixi install\npixi run install\n```\n\nCommon checks:\n\n```bash\npixi run test\npixi run lint\npixi run ci\n```\n\nFor non-live tests, use `xbbg.testing`:\n\n```python\nfrom xbbg import blp\nfrom xbbg.testing import create_mock_response, mock_engine\n\nresponse = create_mock_response(\n    service=\"//blp/refdata\",\n    operation=\"ReferenceDataRequest\",\n    data={\"AAPL US Equity\": {\"PX_LAST\": 101.23}},\n)\n\nwith mock_engine([response]):\n    df = blp.bdp(\"AAPL US Equity\", \"PX_LAST\")\n```\n\nPublishing is handled through GitHub Actions and PyPI Trusted Publishing.\n\n## Project links\n\n- Documentation: [xbbg.org](https://xbbg.org/)\n- JavaScript/Node bindings: [js-xbbg/README.md](js-xbbg/README.md)\n- LangChain/LangGraph tools: [js-xbbg-langgraph/README.md](js-xbbg-langgraph/README.md)\n- PyPI: [pypi.org/project/xbbg](https://pypi.org/project/xbbg/)\n- Source: [github.com/xbbg-org/xbbg](https://github.com/xbbg-org/xbbg)\n- Issues: [GitHub Issues](https://github.com/xbbg-org/xbbg/issues)\n- Discord: [Join the community](https://discord.gg/P34uMwgCjC)\n- Changelog: [CHANGELOG.md](CHANGELOG.md)\n- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)\n- Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)\n- Security: [SECURITY.md](SECURITY.md)\n- License: [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbbg-org%2Fxbbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbbg-org%2Fxbbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbbg-org%2Fxbbg/lists"}