IBridgePy update on 7/27/2017

The IBridgePy has been updated on 7/27/2017.

The major updates include:

  1. Added an input parameter of orderRef into the function of order and order_target. orderRef can be used to label and track the orders that are placed by different strategies if user want to implement multiple strategies at the same time. An example will be provided later in a separate blog.
  2. Added a new attribute of performanceTracking in context.portfolio. It is dictionary keyed by orderRef and its values are pandas dataframes to record all position changes. The columns are transaction datetime, action, avgFillPrice, security description and virtualStrategyBalance. The virtualStrategyBalance is a calculated realized profit or loss based on the previous positions. For example, there is a position of SPY 100 shares and the action is to sell 200 share of SPY. After the last transaction, the virtualStrategyBalance will show the profit or loss of the previous 100 share of SPY because the last 200 shares of SPY square off the previous 100 shares of SPY.
  3. Added a new feature of checking connectivity between IBridgePy and IB Gateway/TWS. The default setting is not to check connectivity regularly. When the feature is turned on, IBridgePy will check the connectivity every 30 seconds.
  4. Added a new runMode=run_auto_connection. In this mode, IBridgePy will try to get connected to IB Gateway/TWS three times after it detects disconnectivity. This runMode is not fully tested yet.

Please let us know if you have any questions. We will try our best to fix any bugs as soon as we can.

IBridgePy team

Leave a Comment