Bloomberg API Emulator (.Net, Java)
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:
- Remove your project's reference to BEmu and replace it with a reference to the Bloomberg API (Bloomberglp.Blapi)
- In your .Net code, replace using BEmu; with using Bloomberglp.Blpapi;. In your Java code, replace import BEmu.*; with import com.bloomberglp.blpapi.*;
That's it. Your code will work as you'd expect. My project emulates:
- Intraday tick data requests and responses (.Net, Java),
- Intraday bar data requests and responses (.Net, Java),
- Reference data requests and responses (.Net, Java coming soon),
- Historical data requests and responses (.Net, Java coming soon), and
- Market data subscription events (.Net, Java coming soon)
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.