Skip to content

Python API surface

Everything exported by xbbg.

This page maps the public Python package surface from py-xbbg/src/xbbg/_exports.py and py-xbbg/src/xbbg/ext/__init__.py so docs stay aligned with the package users install from PyPI.

Core request helpers ​

FamilySyncAsyncNotes
Generic requestsrequestarequestDirect service/operation access using typed request params
Reference databdp, bdsabdp, abdsPoint-in-time and bulk-data helpers
Historical / intradaybdh, bdib, bdtickabdh, abdib, abdtickHistorical bars, intraday bars, and ticks
Query / searchbql, bsrch, beqs, blkp, bportabql, absrch, abeqs, ablkp, abportBQL, Bloomberg search/screening, instrument lookup, portfolio data
Field metadatabflds, bfld, fieldInfo, fieldSearchabflds, abfld, afieldInfo, afieldSearchField info and field search
Curves / governments / quotesbcurves, bgovts, bqrabcurves, abgovts, abqrYield curves, government securities, dealer quote request

Streaming and realtime helpers ​

ServiceSyncAsyncUse when
Market data subscriptionssubscribe, streamasubscribe, astreamRealtime Bloomberg market data
VWAPvwapavwap//blp/mktvwap workflows
Market barsmktbaramktbar//blp/mktbar workflows
Market depthdepthadepthB-PIPE depth data
ChainschainsachainsOption/futures chain subscriptions

Tick and Subscription are part of the public surface for streaming consumers that need explicit lifecycle and diagnostics access.

Configuration, lifecycle, and middleware ​

Configuration

configure, Engine, EngineConfig, set_backend, and get_backend.

Lifecycle

shutdown, reset, and is_connected for process-level engine control.

Middleware

RequestEnvironment, RequestContext, add_middleware, remove_middleware, clear_middleware, get_middleware, and set_middleware.

SDK / logging

get_sdk_info, set_sdk_path, clear_sdk_path, set_log_level, get_log_level, and enable_sdk_logging.

Backends and output format utilities ​

The package exports Backend plus utility functions for checking installed backends and supported format combinations:

  • is_backend_available
  • check_backend
  • get_available_backends
  • print_backend_status
  • is_format_supported
  • get_supported_formats
  • check_format_compatibility
  • validate_backend_format

The service definitions module exports Service, Operation, OutputMode, RequestParams, and ExtractorHint; output shapes are controlled with Format.

Field cache and schema APIs ​

Field cache

resolve_field_types, aresolve_field_types, cache_field_types, get_field_info, get_field_cache_stats, clear_field_cache, FieldInfo, and FieldTypeCache.

Schema lookup

get_schema, aget_schema, get_operation, aget_operation, list_operations, alist_operations, get_enum_values, aget_enum_values, list_valid_elements, and alist_valid_elements.

Stub generation

generate_stubs and configure_ide_stubs generate IDE-facing type information from Bloomberg service schemas.

Schema dataclasses

ServiceSchema, OperationSchema, and ElementInfo.

Extension modules ​

ModuleSync functionsAsync functions
Historicaldividend, earnings, turnover, etf_holdingsadividend, aearnings, aturnover, aetf_holdings
Futures / CDX resolutionfut_ticker, active_futures, cdx_ticker, active_cdxafut_ticker, aactive_futures, acdx_ticker, aactive_cdx
Currencyconvert_ccyaconvert_ccy
Fixed incomeyas, preferreds, corporate_bonds, bqrayas, apreferreds, acorporate_bonds, abqr
Bond analyticsbond_info, bond_risk, bond_spreads, bond_cashflows, bond_key_rates, bond_curveabond_info, abond_risk, abond_spreads, abond_cashflows, abond_key_rates, abond_curve
Options analyticsoption_info, option_greeks, option_pricing, option_chain, option_chain_bql, option_screenaoption_info, aoption_greeks, aoption_pricing, aoption_chain, aoption_chain_bql, aoption_screen
CDX analyticscdx_info, cdx_defaults, cdx_pricing, cdx_risk, cdx_basis, cdx_default_prob, cdx_cashflows, cdx_curveacdx_info, acdx_defaults, acdx_pricing, acdx_risk, acdx_basis, acdx_default_prob, acdx_cashflows, acdx_curve

Extension enums include YieldType, PutCall, ChainPeriodicity, StrikeRef, ExerciseType, and ExpiryMatch.

Markets utilities ​

The xbbg.markets module exports exchange and session helpers:

  • ExchangeInfo
  • fetch_exchange_info / afetch_exchange_info
  • exch_info / market_info / market_timing
  • ccy_pair
  • convert_session_times_to_utc
  • set_exchange_override / get_exchange_override / clear_exchange_override / list_exchange_overrides / has_override
  • SessionWindows / derive_sessions / get_session_windows

Errors ​

BlpError, BlpSessionError, BlpRequestError, BlpSecurityError, BlpFieldError, BlpValidationError, BlpTimeoutError, BlpInternalError, and BlpBPipeError are stable public imports. See Exceptions for details.

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