Broker adapters - lsgro/quantcomponents GitHub Wiki

Writing an adapter to a market data provider and/or a trading broker means implementing two interfaces:

com.quantcomponents.marketdata.IMarketDataManager

The functionalities provided are:

  • Search contract definitions
  • Download historical data
  • Real-time time-series update, both as tick and as price OHLC bars.

com.quantcomponents.algo.IExecutionService

The functionalities provided are:

  • Sending orders, single or bracket-orders
  • Retrieving a trade list
  • Subscribing to order status change information
  • Subscribing to position change information

The two interfaces are independent of each other, even though a broker adapter can implement both of them.

Currently only one broker can be used by the Market Data Provider and the Trading Manager service at a given time. Therefore if a new broker adapter is deployed, the OSGi service configuration must be changed, by substituting the activation of com.quantcomponents.ib with the activation of the new adapter(s).
In the standalone configuration, to do this, a change in the source code is needed: by updating the configuration file standalone_startup_bundles.properties.
This way to change configuration is less than ideal, and it will be improved when the need arises.