Skip to content

Exceptions

Bloomberg API exceptions.

Canonical exception classes are defined by the Rust extension module (xbbg._core) and re-exported here for a stable Python import path.

Python-only exceptions should be additive and inherit from the Rust base.

class BlpRequestError(_core.BlpRequestError)

Bloomberg request-level error with extended request context attributes.

class BlpSecurityError(BlpRequestError)

Bloomberg security-level error (request failed for a specific security).

class BlpFieldError(BlpRequestError)

Bloomberg field-level error (request failed for a specific field).

class BlpBPipeError(BlpError)

B-PIPE license required for this operation.

Raised when attempting to use features that require Bloomberg B-PIPE license but only a standard Terminal connection is available.

B-PIPE features include: - Level 2 market depth data (depth/adepth) - Option and futures chains (chains/achains)

class BlpValidationError(_core.BlpValidationError)

Bloomberg validation error with element and suggestion metadata.

@classmethod
def from_rust_error(cls, message: str) -> BlpValidationError

Construct a BlpValidationError by parsing metadata from a Rust error message.