This project has moved. For the latest updates, please go here.

Bloomberg API Emulator (.Net, Java, C++)

In the spirit of Bloomberg's Open Market Data Initiative meant to "foster open solutions for the financial services industry", I submit the Bloomberg API Emulator. In early 2012, Bloomberg released its Bloomberg API with an MIT-style license in an effort to be more open to developers of financial services solutions. Developers can download the Bloomberg API and the API documentation (pdf link); however, developers cannot run a program written for the Bloomberg API without a Bloomberg account. I wrote the Bloomberg API Emulator to address this gap.

If you want to learn to write code that interacts with the Bloomberg API, you ordinarily need to have a Bloomberg account which could be prohibitively expensive for your purposes. If you need to write Bloomberg API code (e.g., subscribing to market data), but don't have a Bloomberg account, you can use this Bloomberg API Emulator. The Bloomberg API Emulator allows you to:

  • Learn to write Bloomberg code without a Bloomberg account, and
  • Test out your Bloomberg API calls without affecting your existing Bloomberg data caps.

Code written for the Bloomberg API Emulator works seamlessly with the actual Bloomberg API. If you have a project written for the Bloomberg API Emulator and you want it to instead use the actual Bloomberg API (available here), you will perform these two simple steps:

  1. Remove your project's reference to BEmu and replace it with a reference to the Bloomberg API (Bloomberglp.Blapi). In C++, replace the project's reference to BEmu_cpp.dll with a reference to blpapiX_XX.dll.
  2. In your .Net code, replace using BEmu; with using Bloomberglp.Blpapi;. In your Java code, replace the reference to BEmu.jar with a reference to blpapi_XXX.jar.  In your C++ code, simply include the blpapi_*.h headers instead of the BloombergTypes/*.h headers (see a simple example in Examples_cpp/headers/api_selector.h using a #define)

That's it. Your code will work as you'd expect. My project emulates:

  • Intraday tick data requests and responses (.Net, Java, C++),
  • Intraday bar data requests and responses (.Net, Java, C++),
  • Reference data requests and responses (.Net, Java, C++),
  • Historical data requests and responses (.Net, Java, C++), and
  • Market data subscription events (.Net, Java, C++)

If you like this project please consider making a donation to the developer.  A Bloomberg account costs almost $2,000 a month, so this project could potentially save you a lot of money.

PayPal Donation

Please note that while I emulate the Bloomberg API calls, I do not make any attempt to return any real data. If, for example, you request the BID price for AAPL US EQUITY, the Bloomberg API Emulator will respond with a random number between 1 and 100 (which is far below the current price). These responses are only meant to show what an actual Bloomberg API response would look like. The data in the responses is completely fabricated. Do not use the responses from the Bloomerg API Emulator to make any actual trading or investment decisions.

Last edited May 8, 2014 at 9:12 PM by Robinson664, version 22