Bloomberg APIs refdata API

Reference Data Service operations — request/response paradigm

OpenAPI Specification

bloomberg-apis-refdata-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bloomberg API (BLPAPI) apiauth refdata API
  version: '2.54'
  summary: Logical OpenAPI representation of the Bloomberg API (BLPAPI) v3.x
  description: 'The Bloomberg API (BLPAPI) is the official client-side library for accessing

    Bloomberg market data, reference data, news, and analytics services across

    Desktop API, Server API, and B-PIPE delivery models.


    > **Important — protocol shape**: The native BLPAPI is **NOT** an HTTP/REST

    > API. It is a binary, session-oriented, message-passing API delivered over

    > the Bloomberg Network using the BLPAPI client SDK (C, C++, Java, .NET, Python).

    > It uses a request/response paradigm and a subscription paradigm rather than

    > stateless HTTP verbs.

    >

    > This OpenAPI document is a **logical mapping** of the BLPAPI service and

    > schema model into HTTP-shaped operations so that:

    >

    >   - The request and response message shapes for each Bloomberg service

    >     can be discovered, indexed, and reasoned about by tooling that speaks OpenAPI.

    >   - Agents and code-generators can derive typed client wrappers around the

    >     official BLPAPI SDK.

    >   - The Bloomberg services and their operations become discoverable in

    >     APIs.json indexes alongside REST APIs.

    >

    > **It is not a runnable HTTP gateway**. Calls described here must be

    > translated into BLPAPI SDK requests against a Bloomberg session.

    >

    > For Bloomberg''s REST/HTTP products (Bloomberg Data License REST API,

    > Bloomberg HAPI, Enterprise Data Catalog) refer to those products'' own

    > developer portals — they are separate from BLPAPI.


    ## Services


    The BLPAPI exposes services at well-known service names:


    - `//blp/refdata` — Reference Data Service (request/response)

    - `//blp/mktdata` — Market Data Service (subscription)

    - `//blp/mktvwap` — Custom VWAP Service (subscription)

    - `//blp/mktbar` — Market Bar Subscription Service (subscription)

    - `//blp/apiflds` — API Field Information Service (request/response)

    - `//blp/pagedata` — Page Data Service (subscription)

    - `//blp/tasvc` — Technical Analysis Service (request/response)

    - `//blp/apiauth` — API Authorization Service (request/response)

    - `//blp/instruments` — Instruments Service (request/response)


    B-PIPE-only services (`//blp/mktdepthdata`, `//blp/mktlist`, `//blp/srcref`)

    are documented in the BLPAPI Developer''s Guide section 9 and not modeled here.


    ## Identifier formats


    Securities follow the format `[Topic Prefix]/SYMBOLOGY[@Pricing Source][Exchange]`

    with optional Yellow Key (Govt, Corp, Mtge, M-Mkt, Muni, Pfd, Equity, Comdty,

    Index, Curncy, Client). The default Topic Prefix is `ticker`. Other prefixes

    include `cusip`, `isin`, `sedol1`, `sedol2`, `bbgid`, `buid`, `wpk`, `sicovam`,

    `common`, `bsid`, `svm`, `cins`, `cats`.


    Examples: `IBM US Equity`, `/cusip/912828GM6@BGN`, `MSFT@ETPX US Equity`,

    `GBPUSD BAAM Curncy`.


    ## Auth and Permissioning


    BLPAPI uses Entitlement IDs (EIDs), the `//blp/apiauth` service, and Identity

    Objects to gate access to data. Three deployment-specific authorization models

    apply:


    - **Server API** — IP-based authorization

    - **B-PIPE** — Token-based authorization with separate authentication step

    - **Desktop API** — User context derived from the Bloomberg Professional terminal


    See section 6 of the Developer''s Guide for details.

    '
  contact:
    name: Bloomberg Production Support
    url: https://www.bloomberg.com/professional/support/
  license:
    name: Permissive (Bloomberg sample license terms)
  termsOfService: https://www.bloomberg.com/professional/support/api-library/
servers:
- url: blpapi+session://{session}
  description: 'Logical BLPAPI session endpoint. In production, applications open a

    `Session` against `Session.Options` configured for Desktop API

    (`localhost:8194`), Server API (`<server-host>:8194` with ASID

    authentication), or B-PIPE (multiple BPIPE hosts with token authentication).

    '
  variables:
    session:
      default: localhost
      description: Session identifier — Desktop, Server API ASID, or B-PIPE BPID
security:
- desktopAPI: []
- serverAPI: []
- bpipeToken: []
tags:
- name: refdata
  description: Reference Data Service operations — request/response paradigm
paths:
  /refdata/ReferenceDataRequest:
    post:
      operationId: referenceDataRequest
      tags:
      - refdata
      summary: Request reference data for one or more securities
      description: 'Returns a snapshot of current values for a set of (security, field) pairs.

        Multiple securities and fields per request. Supports overrides,

        entitlements echo, formatted-value mode, UTC timestamps, and forced delay.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `ReferenceDataRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/ReferenceDataRequest'
      responses:
        '200':
          description: ReferenceDataResponse (PARTIAL_RESPONSE or RESPONSE message)
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/ReferenceDataResponse'
  /refdata/HistoricalDataRequest:
    post:
      operationId: historicalDataRequest
      tags:
      - refdata
      summary: Request end-of-day historical data over a date range
      description: 'Retrieves end-of-day data for one or more (security, field) pairs over a

        defined period. Supports daily, weekly, monthly, quarterly, semi-annual,

        and annual periodicity. Adjustments for splits, dividends, abnormal cash

        events, and DPDF settings are configurable.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `HistoricalDataRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/HistoricalDataRequest'
      responses:
        '200':
          description: HistoricalDataResponse — one HistoricalDataTable per security
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/HistoricalDataResponse'
  /refdata/IntradayTickRequest:
    post:
      operationId: intradayTickRequest
      tags:
      - refdata
      summary: Request tick-by-tick history for a single security
      description: 'Returns each tick (TRADE, BID, ASK, BID_BEST, ASK_BEST, MID_PRICE,

        AT_TRADE, BEST_BID, BEST_ASK) over a defined UTC time range for one

        security. Bloomberg keeps 140 days of intraday history.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `IntradayTickRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/IntradayTickRequest'
      responses:
        '200':
          description: IntradayTickResponse with tickData array
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/IntradayTickResponse'
  /refdata/IntradayBarRequest:
    post:
      operationId: intradayBarRequest
      tags:
      - refdata
      summary: Request intraday bar (OHLCV) history for a single security
      description: 'Returns aggregated bars (OPEN/HIGH/LOW/CLOSE/VOLUME/NUMBER_OF_TICKS)

        over a defined UTC time range for a single security and event type.

        Bar interval can be 1 to 1440 minutes.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `IntradayBarRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/IntradayBarRequest'
      responses:
        '200':
          description: IntradayBarResponse with barTickData array
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/IntradayBarResponse'
  /refdata/PortfolioDataRequest:
    post:
      operationId: portfolioDataRequest
      tags:
      - refdata
      summary: Request portfolio positions and member data
      description: 'Retrieves change information and portfolio positions for a portfolio

        identified by Portfolio ID (from `PRTU<GO>`). Supports historical

        retrieval via the REFERENCE_DATE override.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `PortfolioDataRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/PortfolioDataRequest'
      responses:
        '200':
          description: PortfolioDataResponse
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/PortfolioDataResponse'
  /refdata/BeqsRequest:
    post:
      operationId: beqsRequest
      tags:
      - refdata
      summary: Request data for a Bloomberg Equity Screening (EQS) screen
      description: 'Returns the security data for a screen created using `EQS <GO>` on

        the Bloomberg Professional service. Supports private/global screens,

        language selection, group filtering, and PiTDate historical access.


        **BLPAPI service**: `//blp/refdata`

        **Operation**: `BeqsRequest`

        '
      requestBody:
        required: true
        content:
          application/x-blpapi-request:
            schema:
              $ref: '#/components/schemas/BeqsRequest'
      responses:
        '200':
          description: BeqsResponse
          content:
            application/x-blpapi-response:
              schema:
                $ref: '#/components/schemas/BeqsResponse'
components:
  schemas:
    FieldData:
      type: object
      description: A single returned (field, value) datum.
      properties:
        '*':
          oneOf:
          - type: string
          - type: number
          - type: integer
          - type: boolean
          description: 'The field name is a property name (e.g. `PX_LAST`, `LAST_PRICE`),

            and the value is the typed data point. When `returnFormattedValue`

            is true on the request, all values are returned as strings.

            '
    BeqsResponse:
      $ref: '#/components/schemas/ReferenceDataResponse'
    HistoricalDataRequest:
      type: object
      required:
      - securities
      - fields
      - startDate
      properties:
        securities:
          type: array
          items:
            $ref: '#/components/schemas/Security'
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
        startDate:
          type: string
          description: Start date in YYYYMMDD format (or BLPAPI Relative Date syntax).
          example: '20100101'
        endDate:
          type: string
          description: End date in YYYYMMDD format. Defaults to current day if omitted.
          example: '20101231'
        periodicityAdjustment:
          type: string
          enum:
          - ACTUAL
          - CALENDAR
          - FISCAL
          default: CALENDAR
        periodicitySelection:
          type: string
          enum:
          - DAILY
          - WEEKLY
          - MONTHLY
          - QUARTERLY
          - SEMI_ANNUALLY
          - YEARLY
          default: DAILY
        currency:
          type: string
          description: 3-letter ISO currency code. View `WCV<GO>` for list.
          example: USD
        overrideOption:
          type: string
          enum:
          - OVERRIDE_OPTION_CLOSE
          - OVERRIDE_OPTION_GPA
        pricingOption:
          type: string
          enum:
          - PRICING_OPTION_PRICE
          - PRICING_OPTION_YIELD
        nonTradingDayFillOption:
          type: string
          enum:
          - NON_TRADING_WEEKDAYS
          - ALL_CALENDAR_DAYS
          - ACTIVE_DAYS_ONLY
          default: NON_TRADING_WEEKDAYS
        nonTradingDayFillMethod:
          type: string
          enum:
          - PREVIOUS_VALUE
          - NIL_VALUE
        maxDataPoints:
          type: integer
          description: 'Maximum number of data points to return. If the original set is

            larger, the most-recent N are returned.

            '
          minimum: 1
        returnEids:
          type: boolean
          default: false
        returnRelativeDate:
          type: boolean
          default: false
        adjustmentNormal:
          type: boolean
          description: Adjust for change-on-day cash dividends.
          default: false
        adjustmentAbnormal:
          type: boolean
          description: Adjust for abnormal cash dividends.
          default: false
        adjustmentSplit:
          type: boolean
          description: Adjust for capital changes (splits, spin-offs, rights).
          default: false
        adjustmentFollowDPDF:
          type: boolean
          description: Follow `DPDF<GO>` settings for adjustments.
          default: true
        calendarCodeOverride:
          type: string
          description: Two-character calendar code from `CDR<GO>`. Daily requests only.
        calendarOverridesInfo:
          type: object
          properties:
            calendarOverrides:
              type: array
              items:
                type: string
            calendarOverridesOperation:
              type: string
              enum:
              - CDR_AND
              - CDR_OR
              default: CDR_AND
        overrides:
          type: array
          items:
            $ref: '#/components/schemas/Override'
    IntradayBarRequest:
      type: object
      required:
      - security
      - eventType
      - startDateTime
      - endDateTime
      - interval
      properties:
        security:
          $ref: '#/components/schemas/Security'
        eventType:
          type: string
          enum:
          - TRADE
          - BID
          - ASK
          - BID_BEST
          - ASK_BEST
          - BEST_BID
          - BEST_ASK
        startDateTime:
          type: string
          format: date-time
        endDateTime:
          type: string
          format: date-time
        interval:
          type: integer
          minimum: 1
          maximum: 1440
          description: Bar length in minutes (1 = one-minute bars, 1440 = daily).
        gapFillInitialBar:
          type: boolean
          description: Fill an empty bar with previous values.
          default: false
        returnEids:
          type: boolean
          default: false
        adjustmentNormal:
          type: boolean
          default: false
        adjustmentAbnormal:
          type: boolean
          default: false
        adjustmentSplit:
          type: boolean
          default: false
        adjustmentFollowDPDF:
          type: boolean
          default: true
    ReferenceDataRequest:
      type: object
      required:
      - securities
      - fields
      properties:
        securities:
          type: array
          items:
            $ref: '#/components/schemas/Security'
          description: One or more Bloomberg securities.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
          description: One or more Bloomberg field mnemonics or CALCRT ids.
        overrides:
          type: array
          items:
            $ref: '#/components/schemas/Override'
          description: Up to 100 overrides applied to derived field calculations.
          maxItems: 100
        returnEids:
          type: boolean
          description: Populate fieldData with EID date entries.
          default: false
        returnFormattedValue:
          type: boolean
          description: Force all values to be returned as strings.
          default: false
        useUTCTime:
          type: boolean
          description: Return date/time values in UTC. Default follows TZDF<GO> setting.
          default: false
        forcedDelay:
          type: boolean
          description: Return data delayed by the exchange's delay period (typically 15 min).
          default: false
    Field:
      type: string
      description: 'Bloomberg field mnemonic (e.g. `PX_LAST`, `LAST_PRICE`, `BID`, `ASK`)

        or alpha-numeric CALCRT id (e.g. `pq005`).

        '
      examples:
      - PX_LAST
      - LAST_PRICE
      - BID
      - ASK
      - VOLUME
    IntradayBarResponse:
      type: object
      properties:
        responseError:
          $ref: '#/components/schemas/ErrorInfo'
        barData:
          type: object
          properties:
            barTickData:
              type: array
              items:
                type: object
                properties:
                  time:
                    type: string
                    format: date-time
                  open:
                    type: number
                  high:
                    type: number
                  low:
                    type: number
                  close:
                    type: number
                  volume:
                    type: integer
                    format: int64
                  numEvents:
                    type: integer
                  value:
                    type: number
        eidData:
          type: array
          items:
            $ref: '#/components/schemas/EidData'
    EidData:
      type: object
      description: Entitlement Identifier(s) attached to a security or user.
      properties:
        entitlementId:
          type: integer
        eids:
          type: array
          items:
            type: integer
        status:
          type: integer
          description: 0 = success; non-zero indicates failure.
        sequenceNumber:
          type: integer
    IntradayTickRequest:
      type: object
      required:
      - security
      - eventTypes
      - startDateTime
      - endDateTime
      properties:
        security:
          $ref: '#/components/schemas/Security'
          description: Single security only.
        eventTypes:
          type: array
          items:
            type: string
            enum:
            - TRADE
            - BID
            - ASK
            - BID_BEST
            - ASK_BEST
            - MID_PRICE
            - AT_TRADE
            - BEST_BID
            - BEST_ASK
        startDateTime:
          type: string
          format: date-time
          description: Start time in UTC, format `YYYY-MM-DDTHH:MM:SS`.
        endDateTime:
          type: string
          format: date-time
        includeConditionCodes:
          type: boolean
          default: false
        includeNonPlottableEvents:
          type: boolean
          default: false
        includeExchangeCodes:
          type: boolean
          default: false
        returnEids:
          type: boolean
          default: false
        includeBrokerCodes:
          type: boolean
          description: Canadian, Finnish, Mexican, Philippine, Swedish equities only.
          default: false
        includeRpsCodes:
          type: boolean
          description: Reporting Party Side codes.
          default: false
        includeBicMicCodes:
          type: boolean
          description: Bank Identifier Code / Market Identifier Code.
          default: false
    Security:
      type: string
      description: 'Bloomberg security identifier in the form

        `[Topic Prefix]/SYMBOLOGY[@Pricing Source][Exchange]` with optional Yellow Key.

        Default Topic Prefix is `ticker`. Examples: `IBM US Equity`,

        `/cusip/912828GM6@BGN`, `MSFT@ETPX US Equity`.

        '
      examples:
      - IBM US Equity
      - VOD LN Equity
      - /cusip/912828GM6@BGN
      - MSFT@ETPX US Equity
      - GBPUSD BAAM Curncy
    ReferenceDataResponse:
      type: object
      properties:
        responseError:
          $ref: '#/components/schemas/ErrorInfo'
        securityData:
          type: array
          items:
            $ref: '#/components/schemas/SecurityData'
    ErrorInfo:
      type: object
      description: Standard error envelope used in BLPAPI responses.
      required:
      - source
      - code
      - category
      - message
      properties:
        source:
          type: string
          description: Bloomberg internal error source (e.g. `bbdbl1.r1.kgw`).
        code:
          type: integer
          description: Bloomberg internal error code.
        category:
          type: string
          description: General classification of the failure.
          examples:
          - BAD_SEC
          - BAD_FLD
          - INVALID_REQUEST
          - NO_AUTH
        message:
          type: string
          description: Human-readable description of the failure.
        subcategory:
          type: string
          description: (Optional) more specific classification of the failure.
    BeqsRequest:
      type: object
      required:
      - screenName
      properties:
        screenName:
          type: string
          description: Name of the EQS screen to execute.
          example: Global Volume Surges
        screenType:
          type: string
          enum:
          - PRIVATE
          - GLOBAL
          description: PRIVATE = user-defined; GLOBAL = Bloomberg EQS.
        languageId:
          type: string
          enum:
          - ENGLISH
          - KANJI
          - FRENCH
          - GERMAN
          - SPANISH
          - PORTUGUESE
          - ITALIAN
          - CHINESE_TRA
          - KOREAN
          - CHINESE_SIM
          - THAI
          - SWED
          - FINNISH
          - DUTCH
          - MALAY
          - RUSSIAN
          - GREEK
          - POLISH
          - DANISH
          - FLEMISH
          - ESTONIAN
          - TURKISH
          - NORWEGIAN
          - LATVIAN
          - LITHUANIAN
          - INDONESIAN
        Group:
          type: string
          description: Screen folder name as defined in `EQS<GO>`.
        overrides:
          type: array
          items:
            $ref: '#/components/schemas/Override'
          description: Use PiTDate override for historical access.
    PortfolioDataResponse:
      $ref: '#/components/schemas/ReferenceDataResponse'
    IntradayTickResponse:
      type: object
      properties:
        responseError:
          $ref: '#/components/schemas/ErrorInfo'
        tickData:
          type: object
          properties:
            tickData:
              type: array
              items:
                type: object
                properties:
                  time:
                    type: string
                    format: date-time
                  type:
                    type: string
                    enum:
                    - TRADE
                    - BID
                    - ASK
                    - BID_BEST
                    - ASK_BEST
                    - MID_PRICE
                    - AT_TRADE
                    - BEST_BID
                    - BEST_ASK
                  value:
                    type: number
                  size:
                    type: integer
                  conditionCode:
                    type: string
                  exchangeCode:
                    type: string
                  micCode:
                    type: string
                  brokerBuyCode:
                    type: string
                  brokerSellCode:
                    type: string
                  rpsCode:
                    type: string
                    enum:
                    - B
                    - S
                    - D
        eidData:
          type: array
          items:
            $ref: '#/components/schemas/EidData'
    HistoricalDataResponse:
      type: object
      properties:
        responseError:
          $ref: '#/components/schemas/ErrorInfo'
        securityData:
          $ref: '#/components/schemas/SecurityData'
    PortfolioDataRequest:
      type: object
      required:
      - securities
      - fields
      properties:
        securities:
          type: array
          items:
            type: string
            description: Portfolio ID from `PRTU<GO>` (e.g. `UXXXXXXX-X Client`).
        fields:
          type: array
          items:
            type: string
            enum:
            - PORTFOLIO_MEMBER
            - PORTFOLIO_MPOSITION
            - PORTFOLIO_MWEIGHT
            - PORTFOLIO_DATA
        overrides:
          type: array
          items:
            $ref: '#/components/schemas/Override'
          description: Use REFERENCE_DATE override for historical lookup.
    FieldException:
      type: object
      description: Indicates a field could not be returned for a security.
      required:
      - fieldId
      - errorInfo
      properties:
        fieldId:
          type: string
        errorInfo:
          $ref: '#/components/schemas/ErrorInfo'
    SecurityData:
      type: object
      description: Per-security data block in a Reference / Historical / BEQS response.
      required:
      - security
      properties:
        security:
          $ref: '#/components/schemas/Security'
        sequenceNumber:
          type: integer
          description: Position of the security in the original request.
        fieldData:
          oneOf:
          - $ref: '#/components/schemas/FieldData'
          - type: array
            items:
              $ref: '#/components/schemas/FieldData'
          description: 'Reference responses return a single fieldData object per security.

            Historical responses return an array of fieldData rows (one per

            interval) — each row may include `relativeDate` and `date` keys

            in addition to field values.

            '
        fieldExceptions:
          type: array
          items:
            $ref: '#/components/schemas/FieldException'
        securityError:
          $ref: '#/components/schemas/ErrorInfo'
    Override:
      type: object
      description: A name/value override applied to a derived field calculation.
      required:
      - fieldId
      - value
      properties:
        fieldId:
          type: string
          description: Field mnemonic / alpha-numeric (e.g. `PRICING_SOURCE`, `PR092`).
        value:
          type: string
          description: 'Override value as a string. Dates use `YYYYMMDD`. Decimals always

            use `.` as the decimal separator regardless of locale.

            '
      examples:
      - fieldId: PRICING_SOURCE
        value: BGN
      - fieldId: BEST_DATA_SOURCE_OVERRIDE
        value: BLI
  securitySchemes:
    desktopAPI:
      type: apiKey
      in: header
      name: X-BLPAPI-Session
      description: 'Desktop API authorization is handled by the local Bloomberg Professional

        terminal. Applications open a session against `localhost:8194` and the

        terminal context is the authorization. No token is presented over the wire.

        '
    serverAPI:
      type: apiKey
      in: header
      name: X-BLPAPI-ASID
      description: 'Server API authorization is by ASID and registered IP address.

        The application''s IP must be entitled in the Bloomberg Anywhere

        permissioning system; an `AuthorizationRequest` with `ipAddress`

        validates the user''s identity at that location.

        '
    bpipeToken:
      type: http
      scheme: bearer
      bearerFormat: BLPAPI-Token
      description: 'B-PIPE applications acquire a token via the

        `AuthorizationTokenRequest` operation, then submit the token in an

        `AuthorizationRequest` to obtain an Identity object. The Identity

        object is then attached to subsequent service requests.

        '
externalDocs:
  description: Bloomberg API Developer's Guide v2.54 (June 30, 2014)
  url: https://www.bloomberg.com/professional/support/api-library/