Hi, still getting some issues when I try to run any of the files in the strategies folder. I get this error :
fileName = example_show_real_time_prices.py
models.KeyedIbridgePyOrders::get_value: KeyError orderId=2011562457
models.KeyedIbridgePyOrders::get_value: DEBUG PRINT self.keyedIbridgePyOrders
I inittially used Versions 3.7 but had a different issue, which got resolve when I started to use 3.6, now I am getting the above issue. See the entire log:
runfile('C:/Users/JPilon/Downloads/Ibridge 36/Strategies/example_show_real_time_prices.py', wdir='C:/Users/JPilon/Downloads/Ibridge 36/Strategies')
Reloaded modules: BasicPyLib, BasicPyLib.MarketCalendarWrapper, BasicPyLib.FakeMarketCalendar, BasicPyLib.MarketCalendar, BasicPyLib.pandas_market_calendars, BasicPyLib.pandas_market_calendars.market_calendar, BasicPyLib.pandas_market_calendars.calendar_utils, BasicPyLib.pandas_market_calendars.exchange_calendar_cfe, BasicPyLib.pandas_market_calendars.us_holidays, BasicPyLib.pandas_market_calendars.exchange_calendar_ice, BasicPyLib.pandas_market_calendars.exchange_calendar_nyse, BasicPyLib.pandas_market_calendars.exchange_calendar_cme, BasicPyLib.pandas_market_calendars.exchange_calendar_bmf, BasicPyLib.pandas_market_calendars.exchange_calendar_lse, BasicPyLib.pandas_market_calendars.exchange_calendar_tsx, BasicPyLib.pandas_market_calendars.exchange_calendar_eurex, IBridgePy, IBridgePy.MarketManagerBase, broker_client_factory, broker_client_factory.broker_client_utils, IBridgePy.constants, BasicPyLib.BasicTools, broker_service_factory, broker_service_factory.BrokerService, broker_client_factory.BrokerClientDefs, models, models.utils, broker_service_factory.BrokerService_utils, data_provider_factory, data_provider_factory.data_provider, IBridgePy.IbridgepyTools, BasicPyLib.Printable, IBridgePy.IBCpp, IBridgePy.quantopian, models.KeyedIbridgePyOrders, Config, Config.util, BasicPyLib.simpleLogger, Config.BrokerClientConfig, Config.BrokerClientConfig.BrokerClientConfig, data_provider_factory.data_provider_utils, IBridgePy.TimeGenerator, models.Traders, models.AccountInfo, models.Positions, models.Data, IBridgePy.TraderExtendedResources, IBridgePy.TraderBasicResources, IBridgePy.TraderBase, IBridgePy.trader_defs, IBridgePy.validator, data_provider_factory.dataProvider_IB, data_provider_factory.data_provider_nonRandom, broker_client_factory.BrokerClient_IB, broker_client_factory.CallBacks, broker_client_factory.BrokerClient, broker_service_factory.BrokerService_IB, broker_service_factory.BrokerService_callback, broker_service_factory.BrokerService_Common
runfile('C:/Users/JPilon/Downloads/Ibridge 36/Strategies/example_show_real_time_prices.py', wdir='C:/Users/JPilon/Downloads/Ibridge 36/Strategies')
runfile('C:/Users/JPilon/Downloads/Ibridge 36/RUN_ME.py', wdir='C:/Users/JPilon/Downloads/Ibridge 36')
IBridgePy version 5.6.4
fileName = example_show_real_time_prices.py
models.KeyedIbridgePyOrders::get_value: KeyError orderId=2011562457
models.KeyedIbridgePyOrders::get_value: DEBUG PRINT self.keyedIbridgePyOrders
{}
An exception has occurred, use %tb to see the full traceback.
SystemExit
C:\Users\JPilon\AppData\Local\Continuum\anaconda3.6\lib\site-packages\IPython\core\interactiveshell.py:2870: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
%tb
Traceback (most recent call last):
File "<ipython-input-9-57343c723253>", line 1, in <module>
runfile('C:/Users/JPilon/Downloads/Ibridge 36/RUN_ME.py', wdir='C:/Users/JPilon/Downloads/Ibridge 36')
File "C:\Users\JPilon\AppData\Local\Continuum\anaconda3.6\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "C:\Users\JPilon\AppData\Local\Continuum\anaconda3.6\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/JPilon/Downloads/Ibridge 36/RUN_ME.py", line 38, in <module>
exec(script)
File "<string>", line 39, in <module>
File "<string>", line 18, in <module>
File "C:\Users\JPilon\Downloads\Ibridge 36\IBridgePy\MarketManagerBase.py", line 75, in run
self.run_once()
File "C:\Users\JPilon\Downloads\Ibridge 36\IBridgePy\MarketManagerBase.py", line 71, in run_once
self.trader.initialize_Function()
File "C:\Users\JPilon\Downloads\Ibridge 36\IBridgePy\TraderBasicResources.py", line 64, in initialize_Function
ReqPositions())
File "C:\Users\JPilon\Downloads\Ibridge 36\broker_service_factory\BrokerService.py", line 58, in submit_requests
return self.brokerClient.request_data(*args)
File "C:\Users\JPilon\Downloads\Ibridge 36\broker_client_factory\BrokerClient.py", line 240, in request_data
self.processMessagesWrapper(None)
File "C:\Users\JPilon\Downloads\Ibridge 36\broker_client_factory\BrokerClient_IB.py", line 108, in processMessagesWrapper
self.processMessages() # IBCpp function
File "C:\Users\JPilon\Downloads\Ibridge 36\broker_client_factory\CallBacks.py", line 310, in orderStatus
accountCode = self.singleTrader.get_accountCode_by_orderId(self.name, permId)
File "C:\Users\JPilon\Downloads\Ibridge 36\models\Traders.py", line 109, in get_accountCode_by_orderId
ibridgePyOrder = self.get_order(brokerName, accountCode, orderId)
File "C:\Users\JPilon\Downloads\Ibridge 36\models\Traders.py", line 90, in get_order
return account.keyedIbridgePyOrders.get_value(orderId, 'IbridgePyOrder')
File "C:\Users\JPilon\Downloads\Ibridge 36\models\KeyedIbridgePyOrders.py", line 109, in get_value
exit()
SystemExit
It seems like it is not able to get the order id. Can you restart the IB TWS/gateway and try again.
If this doesn't work, you can removing IBridgePy and installing a fresh one.
Let us know if this works.