Bloomberg.ReferenceData OpenBI
Bloomberg's current values of fields for securities, as Excel's BDP gives them.
Group: Online services. OpenBI’s own: Power Query M has no function of this name.
Syntax
Bloomberg.ReferenceData(securities as any, fields as any, optional options as nullable record) as table
| Parameter | Type | Description |
|---|---|---|
securities | any | A security, or a list of them: "SPX Index", {"SPX Index", "OBX Index"}. |
fields | any | A field, or a list of them: "PX_LAST", {"PX_LAST", "NAME"}. |
options | nullable record optional | Overrides (a record of field = value), Host and Port. |
Returns
table. Security, then a column per field as you named it; a row per security.
Remarks
- A bulk field (several values in one) comes as JSON text. A security Bloomberg doesn't know keeps its row, without values, as Excel's #N/A.
- Overrides take texts, numbers or dates as values.
- It asks a Bloomberg Terminal running on this computer, signed in, through its Desktop API; the computer's Python, with Bloomberg's blpapi and pandas, sends the request. Host and Port in the options point to a Terminal elsewhere, or a B-PIPE server (localhost and 8194 unless you say).
Compared with Power Query
An OpenBI function: Power Query has none like it, so a query that uses it runs in OpenBI only, not in Power BI Desktop or the Power BI service.
Examples
Price and name of two indices
Bloomberg.ReferenceData({"SPX Index", "OBX Index"}, {"PX_LAST", "NAME"})
Result: not shown here: it needs a Bloomberg Terminal, running and signed in.
With an override
Bloomberg.ReferenceData("OBX Index", "PX_LAST", [Overrides = [EQY_FUND_CRNCY = "EUR"]])
Result: not shown here: it needs a Bloomberg Terminal, running and signed in.