data structures static List bloombergSecurityNames Ĭonsole.WriteLine( "CASE 1 : create reference data request without overrides >") īloombergSecurityNames.Add( "GOOG US Equity") īloombergSecurityNames.Add( "CSCO US Equity") īloombergSecurityNames.Add( "CCE US Equity") īloombergFieldNames.Add( "GICS_SUB_INDUSTRY_NAME") īloombergFieldNames.Add( "EQY_OPT_AVAIL") īloombergFieldNames.Add( "LATEST_ANN_DT_ANNUAL") īloombergFieldNames.Add( "PX_ROUND_LOT_SIZE") īloombergFieldNames.Add( "MIKE_JUNIPERHILL_SHOE_SIZE")
// CLIENT PROGRAM namespace TesterProgram For further development and testing purposes, you can use the actual Bloomberg terminal or check out Bloomberg API Emulator. Moreover, project must have reference to file. To be able to run tester program, one has to create a new console project and copyPaste the program given below. For the third dimension of the array, index value zero will always store the observation dateĪll relevant examples can be found in tester program presented below along with the wrapper.
Reference data request : result = 2nd security, 2nd field.Client will have an access to constructors of derived classes, in which securities, fields, overrides, dates and all the other optional parameters are given in for wrapper.Ĭlient will create dynamically-typed 3-dimensional array, into which the resulting data will be assigned by ProcessData method of wrapper. After some further woodshedding, I finally decided to create the design, in which the base class is handling all the common functionalities and derived classes (ReferenceDataRequest, HistoricalDataRequest) are handling the specific algorithm implementation for iterating and packing. Only relevant difference is algorithm implementation for iterating BBCOMM response and packing values into result data structure.
#Bloomberg terminal api how to#
However, one of the values what I am trying to add with this wrapper is the one, which is always missing in these otherwise great documentations: how to pack all requested data into data structures to be easily used by the client?Īfter a few design iterations and brainstorming moments, I concluded that the program is actually the same for both reference and historical data requests for the most parts.
Base class is implementing most of the required functionality, such as We have abstract base class BBCOMMDataRequest, which is holding all the required constants, enumerators, BBCOMM objects and data structures. To be better prepared for those program modifications and bug fixes which will be found out in the future, I will sanctify this one blog post for all postings concerning Bloomberg API Wrapper class.Ĭlient program can use this wrapper to execute reference and historical data requests for BBCOMM server. In the past, I have been posting all updates for corresponding VBA wrapper in separate blog posts and I think some people have been finding this procedure to be at least inconvinient. As a starter for the year 2015, I wanted to share the current version of my C# wrapper, which can be used to execute reference and historical data requests for Bloomberg BBCOMM server.