Release notes

V 5.6.4 on 20191111
  1. Refactored a few methods
V 5.6.3 on 20191028
  1. Silenced error messages about data farm broken.
  2. Fixed the bug of “timezone in get_datetime”
  3. Fixed the bug of “returning None as orderId in order_with_stoploss_takeprofit”
V 5.6.1 on 20191014
  1. Trading with Robinhood is rolled out!
V 5.5.15 on 20191001
  1. Refactored for Robinhood integration
V 5.5.14 on 20190924
  1. Fixed the bug of ” errorCode=2157 errorMessage=Sec-def data farm connection is broken : secdefnj “. This new errorCode was introduced by IB Gateway new version 977.3c
  2. Added Robinhood services
V 5.5.13 on 20190923
  1. Fixed the bug of ” errorCode=2157 errorMessage=Sec-def data farm connection is broken : secdefnj “. This new errorCode was introduced by IB Gateway new version 977.3c
V 5.5.12 on 20190920
  1. Fixed the bug of ” errorCode=2158 errorMessage=Sec-def data farm connection is OK : secdefnj “. This new errorCode was introduced by IB Gateway new version 977.3c
V 5.5.11 on 20190919
  1. Fixed the bug of “missing BrokerService_Common”
V 5.5.10 on 20190918
  1. Fixed the bug of “last_option_computation = None”
V 5.5.9 on 20190917
  1. Fixed the bug of “cannot handle tickType=last_option_computation”
V 5.5.8 on 20190916
  1. Prepared for Robinhood integration
V 5.5.7 on 20190911
  1. Examples of IBridgePy managing multiple accounts are added.
  2. Fixed the bug of “Local_file.py is missing”
V 5.5.6 on 20190902
  1. Fixed a bug of “superSymbol in TEST_ME.py is missing”
  2. Prepared for integration with Robinhood
V 5.5.5 on 20190820
  1. Fixed a bug related to a secType of CMDTY
V 5.5.4 on 20190819
  1. Prepared to integrate with Robinhood
V 5.5.3 on 20190811
  1. Fixed the bug of “crash after show_real_time_price when the price”
V 5.5.2 on 20190807
  1. Fixed the bug of “context.portfolio.position of IOPT with localSymbol always return 0”
  2. Added the validation of “type of strike == float for SuperSymbol”, which also fixed the issue of incorrect positions.
V 5.4.1 on 20190804
  1. Handle orderId = 0
  2. Add transactionLog and balanceLog in backtesting mode
V 5.3.1 on 20190726
  1. Added the feature of placing order with waitForFeedbackInSeconds
V 5.2.3 on 20190722
  1. Fixed the bug of “OrderId x that needs to be cancelled is not found”

V 5.2.2 on 20190721

  1. Fixed the bug of silence exit when orders exist
V 5.2.1 on 20190720
  1. Added the feature of setting waitForFeedbackInSeconds for request_historical_data
  2. Fixed the bug of existing orders
V 5.1.1 on 20190713
  1. Added the feature of “show_real_time_size”
  2. Changed the serialization method of Security Objects to solve the issues of “positions[symbol].amount = 0”
V 5.0.8 on 20190708
  1. Added features of “do not exit the program due to errors issued when the connection to IB server is lost”.
  2. Refactored the mechanism of requesting data from IB server to be prepared to add more features.
V 5.0.7 on 20190623
  1. Fixed the bug of logLevel = ‘ERROR’
  2. Added error message for “global name ‘startTimePosition’ is not defined”
V 5.0.6 on 20190610
  1. Prepared to integrate with Robinhood
V 5.0.5 on 20190527
  1. Fixed the bug of “unharmful print”
V 5.0.4 on 20190514
  1. Fixed the bug of “showTimeZone not working”
  2. Fixed the bug of “unhashable type: Security”
V 5.0.3 on 20190511
  1. Fixed the bug of “schedule_function week_start does not work”.
  2. Fixed the bug of “showTimeZone does not take effect”
  3. Add equality check for Security objects.
V5.0.2 on 20190505
  1. IBridgePy Backtester is available in Windows versions.
  2. IBridgePy started to support Anaconda python 3.7 on Windows
V 5.0.1 on 20190428
  1. IBridgePy Backtester is released in Mac version. The documentation will be published soon. Other version will come soon as well.
V 4.4.2 on 20190414
  1. Refactored to support IBridgePy back tester.
V 4.4.1 on 20190328
  1. Added the feature of specifying tif when placing orders with stoploss and takeprofit.
V4.3.3 on 20190313
  1. Refactored a few to build IBridgePy back tester.
V 4.3.2 on 20190228
  1. Separated sysTimeZone and showTimeZone
  2. Simulated updateAccountValue after an execDetails. Refer to this webpage.
  3. Fixed the bug of portfolio.returns
V 4.3.1 on 20190221
  1. Fixed the bug of “cannot handle dataProviderName”
  2. Added the feature of orderType of TrailStopOrder
V 4.2.14 on 20190220
  1. Fixed the bug of cancel_order( orderId or order )
  2. Fixed the bug of backtester
V 4.2.13 on 20190216
  1. Fixed the bug of before_trading_start running on weekends.
V 4.2.12 on 20190213
  1. Implemented count_positions
V 4.2.11 on 20190212
  1. Fixed the bug of “the return type of get_open_orders are not as same as Quantopian’s function”
  2. Changed the display message of orders in orderStatusBook
V 4.2.9 on 20190206
  1. Added cost_basis to Position object to have backward compatibility to V 3.2.4
  2. Fixed sample codes
V4.2.8 on 20190202
  1. Fixed the bug of “processMessages() missing 1 required positional argument: ‘timeNow’”
V4.2.7 on 20190201
  1. Made Changes to prepare IBridgePy backtester
  2. Fixed the bug of “exit is not defined”
V 4.2.6 on 20190131
  1. Made Changes to prepare IBridgePy backtester
V 4.2.5 on 20190118
  1. Fixed the bug of “for security in context.portfolio.positions”
  2. Fixed the bug of “returned hist ‘s index is not datetime”
V4.2.4 on 20190117
  1. Fixed the bug of “print context.portfolio.positions returns empty dict even if a position exists”
V4.2.3 on 20190116
  1. Fixed a deployment bug
V4.2.2 on 20190115
  1. create_order and place_combination_orders are supported.
V 4.2.1 on 20190111
  1. Fixed a minor bug
  2. Solved the backward compatibility issues: the 1st time of running handle_data with repBarFreq = xx is set at 00 seconds. For example, if repBarFreq = 5, the time of running handle_data will be 0, 5, 10, 15, 20, 25, …55.
V 4.2.0 on 20190110
  1. Support the following code “for stock, position in context.portfolio.positions.items():”
V 4.1.1 on 20190109
  1. Fixed the bug of “context.portfolio.positions[symbol(‘AAPL’)]
  2. Fixed the bug of “schedule_functions are not working”
  3. Fixed the bug of “index of data.history is not in the type of datetime”
  4. Fixed the bug of “showTimeZone is not working”
  5. Fixed the bug of “TrailStopLimitOrder is not defined”
  6. Fixed the bug of “modify_order is not working”
V 4.1.0 on 20190106
  1. Support “context.portfolio.position_values”, “context.portfolio.portfolio_values”, “context.portfolio.position_cash” and “context.portfolio.positions”
  2. Fixed the bug related to “Unable connect as the client id is already in use”
  3. Fixed the bug related to “modify orders”
V 4.0.3 on 20190102
  1. Fixed a bug related to Python 3.x compatibility issue
  2. Fixed a bug related to schedule_functions
V 4.0.2 on 20190101
  1. Fixed a bug related to Python 3.x compatibility issue
V 4.0.1 on 20181231
  1. New backend IBridgePy engine which will power up back-tester later
  2. A few API signatures have been optimized. More details will be updated  in http://www.ibridgepy.com/ibridgepy-documentation/
  3. Please let us know if you have any questions about IBridgePy 4 and we will try our best to fix them as soon as possible.
V 3.2.4 on 20181201
  1. Minor update related to TrailStopLimitOrder
  2. Fixed the bug of placing hidden orders
V 3.2.2 on 20181118
  1. Fixed the bug of Trailing Stop Limit Order
V 3.2.1 on 20181116
  1. Fixed the bug of “cannot get volume/size of securities”
  2. Fixed the bug of “placing hidden order to ISLAND”
V 3.1.10 on 20181109
  1. Fixed the bug of “real time price is not tree real time in runMode of run_like_quantopian”
V3.1.9 on 20181106
  1. Modified read_in_hashcode
  2. Removed the error message when open price is not available. User need to check by themselves.
V3.1.6 on 20181030
  1. Fixed a bug
V 3.1.4 on 20181006
  1. Added a new feature of placing hidden order at ISLAND
  2. Fixed a bug of consuming too many resources
V 3.1.2 on 20180930
  1. Fixed a bug
V 3.1.1 on 20180929
  1. Added a new feature in superSymbol to defined “localSymbol”
V 3.0.14 on 20180923
  1. Add a new feature of “modify_order”
V 3.0.11 on 20180918
  1. Fixed the bug of “STK BRK B is missing”
V 3.0.6 on 20180906
  1. Fixed the bug of “real time price does not update”
V3.0.5 on 20180905
  1. Fixed the bug related to barSize in data.history
  2. Fixed the bug of “repBarFreq does not work”
  3. Fixed the bug of waitForFeedbackInSeconds
V3.0.2 on 20180826
  1. New IBridgePy engine
  2. Added trailingPercent to TrailStopLimitOrder
  3. Fixed the bug related to secType of “BOND”
V2.2.12 on 20180812
  1. Added more examples
V2.2.11 on 20180809
  1. Fixed the bug of “No security definition has been found for the request” because of holding positions
V2.2.10 on 20180804
  1. More examples are added.
  2. Fixed the bug related to premium functions.
V2.2.9 on 20180802
  1. Fixed the bug of “scheduled functions do not run as scheduled”
V2.2.8 on 20180730
  1. Fixed the following bug in Win_Anaconda36_64
import pandas_market_calendars as mcal
ModuleNotFoundError: No module named ‘pandas_market_calendars’
V2.2.7 on 20180728
  1. Fixed the following bug
import pandas_market_calendars as mcal
ModuleNotFoundError: No module named ‘pandas_market_calendars’
2. Added Mac_Anaconda27_64 version.

V2.2.6 on 20180726

  1. Fixed a bug related to request_historical_data when disconnection happens
  2. Added a new feature. User can choose a market calendar. handle_data will run according to the chosen market calendar when runMode = ‘run_like_quantopian’

V2.2.5 on 20180707

  1. Fixed the bug of “ask_price = na”

V2.2.4 on 20180704

  1. Fixed the bug of “missing self.setHashConfig” in IBrigePy_python2_64

V2.2.3 on 20180703

  1. Fixed a typo

V2.2.2 on 20180702

  1. Fixed a few bugs in Windows Python 3.6 for incompatibility issues.

V2.2.1 on 20180701

  1. The default time-in-force for LimitOrder and StopOrder is to cancel the open orders by the end of the day. A feature is added to allow traders to designate time-in-force. See details at http://www.ibridgepy.com/ibridgepy-documentation/#order8212_similar_as_order_at_Quantopian
  2. place_order_with_stoploss, place_order_with_stoploss_takeprofit and place_order_with_takeprofit are added to make placing orders much easier than before.
  3. Fixed a bug related to context.portfolio.position[a_security] returning 0 shares when the position is not 0.

V2.1.2 on 20180527

  1. Add a trader property of runScheduledFunctonBeforeHandleData. The scheduled_functions will run before handle_data runs when runScheduledFunctonBeforeHandleData = True. The default setting of Quantopian is to run handle_data before all scheduled functions.

V2.1.1 on 20180526

  1. Improved the performance of searching securities internally.
  2. Add a new function of place_order_with_SL_TP

V2.0.1 on 20180506

  1. Fixed the bug “No security definition when a position was in the account”
  2. Change the version number to semantic version 2.0.1

20180427

  1. Added a new function of get_order_status
  2. Fixed the bug in order_status_monitor, raised by Lamperti

20180324

  1. Added Trailing Stop Limit order

20180227

  1. Fixed a bug about superSymbol when accounts have positions

20180226

  1. Fixed the bug about printing positions.
  2. Added a feature of placing orders outside regular trading hours.
  3. Matched a feature to Quantopian. context.portfolio.portfolio_value is the actual value in the function of initialize.
  4. Fixed the bug about ending cash balances, reported by timma.
  5. Fixed the bug about handle_data running at unexpected times, reported by timma.
  6. Added displaying message when market is closed.

20180210

  1. Fixed the bug about “cannot find index in self.end__check__list” by recording all request data.
  2. Changed version number to string.
  3. Print out fileName.
  4. Exit the code after tried to request data for 3 times and failed.
  5. Fixed the bug about “cannot get real time price because of “No security is found” when init is holding the positions
  6. Changed the logic to search exchange and primaryExchange from stockList
  7. Moved some functions to better locations

20180131

  1. Fixed the bug of “Error processing request:-‘bm’ : cause – Duplicate ticker ID for xxx”
  2. Added a method in data, data.can_trade( ). It always returns True at the moment. It will be extended later.

20180101

  1. Fixed the bug of “missing handle_data”. The handle_data function is not required in IBridgePy.

20171227

  1. Changed default values of open, high, low, close, size to NaN, following Quantopian’s style
  2. The function of show_real_time_price ( ) returns the current values without extra checking even if the values are NaN. However, show_real_time_price ( ) will guarantee that the bid price and ask price of stocks are positive and the last_traded of indexes are positive.
  3. Fixed the bug of “duplicated orderId” when re-sending request data

20171203

  1. Fixed the bug of AttributeError: ‘float’ object has no attribute ‘param’ when requesting real time prices
  2. Fixed the bug related to Ubuntu version and Mac version about file path

20171128

  1. errorCode = 2148 becomes a warning, not a critical error anymore.
  2. Fixed the bug of getting real time prices of secType = ‘IND’, for example, IND, VIX, USD
  3. Fixed the bug in Mac and Ubuntu version

20171109

  1. Fixed the bug of repBarFreq = 60
  2. Fixed the bug of before_tradng_start ( )

20171104

  1. Changed: show_real_time_price will not show any negative number anymore. However, the code will stop if the real time prices are not available for any reasons.
  2. Fixed the bug of the log file path in Linux.
  3. Fixed the bug in handle calendar, for example 2017.11.30
  4. Changed: errorCode = 2105 is a warning message and not a critical error any more.
  5. Fixed the bug of handle_data in run_like_quantopian mode. It won’t run when the market is close.

20171016

  1. Fixed a print versionNumber when exit with error message.
  2. Fixed IBridgePy for Ubuntu errorCode = 509

20171013

  1. Fixed the print bug in windows Python 3_64 version

20171012

  1. Added order_value ( ), order_target_percent ( ), order_target_value ( ) and record ( ) , same as in Quantopian.
  2. Deleted positions from context.portfolio.positions when the quantity of the security is 0. Now it matches what Quantopian does.
  3. Fixed the example_get_historical_data.py because request_data is deprecated from version 2.20171004.
  4. Added showing versionNumber when IBridgePy terminates with error messages.
  5. Fixed the bug in showing latest_profit when printing out positions. It always showed “NA” in the previous versions
  6. Separated IBridgePy log with the log created by users using the function of record ( ).

20171004

  1. Fixed the bug in get_open_order
  2. Fixed check_date_rules overnight issue
  3. Changed to the code related to error messages and terminate the code when needed.
  4. Added “show sizes” to the function of show_real_time_price

20170926

  1. handle_data is not required anymore. It is optional.
  2. Changed the default exchange of stock to SMART. The problem related to XIV positions are solved because of the change.

20170920

  1. Started to support order_percent ( ) .
  2. The bug related to schedule_function is fixed.
  3. The bug related to handle_calendar is fixed.

20170913

  1. Fixed the bug of print in quantopian.py in python 3.x version

20170912

  1. Changed all_US_Stocks.csv to security_info.csv
  2. Allowed users to add the security details to security_info.csvt
  3. The issues related to order_target( ) and positions are fixed because of the above changes.

20170905

  1. Added versionNumber for IBridgePy. The current versionNumber is 1.20170905
  2. Fixed a bug related to positions[symbol(‘xxx’)].amount, which has impacts on order_target ( )