Skip to main content

Bloomberg

Overview

The Bloomberg Terminal has built-in functions which execute various kinds of data analyses on markets or securities. The Bloomberg Adapter API allows you to control the behavior of the Bloomberg Terminal panels by invoking Bloomberg functions with a custom set of arguments.

To invoke a Bloomberg function in a specific panel, use the "T42.BBG.RunFunction" method. It will execute the specified Bloomberg function mnemonic in the designated panel for the given securities.

The "T42.BBG.RunFunction" method accepts as an argument an object with the following properties:

Property Type Description
mnemonic string Required. The Bloomberg function mnemonic (e.g., "DVD", "DES", "GP").
panel string The Bloomberg panel in which to execute the function. Possible values are "ZERO", "ONE", "TWO", "THREE".
properties string[] Additional properties that can be specified when running the function.
securities string[] The securities for which to execute the function.
tails string Optional parameters passed to the function to tailor the panel output.

The "T42.BBG.RunFunction" method returns a string indicating the status of the operation. Possible values are "RanToCompletion" (the function executed successfully), "Faulted" (the function failed), or "Canceled" (the function was canceled).

Example:

The following example invokes a Bloomberg function named "DVD" via the io.Connect JavaScript Interop API. The function will be executed in panel "TWO" of the Bloomberg Terminal for the "IBM US Equity" security:

const invocationArgs = {
    mnemonic: "DVD",
    panel: "TWO",
    securities: ["IBM US Equity"]
};

const result = await io.interop.invoke("T42.BBG.RunFunction", invocationArgs);