Hello. I am trying to setup an IBridgePy with IB and I get this error.
Try brokerClient IB port=7496
port=7496 is correct and set port to userConfig.brokerClientConfig.IB_CLIENT
Connected to IB is successful using port=7496
IBridgePy version 16.9.13
fileName = example_get_historical_data.py
broker_client_factory.BrokerClient::request_data: EXIT, the following requestRecord failed
{reqId=0;status=Submitted;reqType=reqIds;followUp=True;param={}}
Traceback (most recent call last):
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\RUN_ME.py", line 53, in <module>
run_me(fileName, globals())
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\configuration.py", line 85, in run_me
finally_run(userConfig, LiveBacktest.LIVE)
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\configuration.py", line 223, in finally_run
c.run()
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\IBridgePy\MarketManagerBase.py", line 56, in run
self._run_once()
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\IBridgePy\MarketManagerBase.py", line 52, in _run_once
self.trader.initialize_Function()
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\IBridgePy\Trader.py", line 346, in initialize_Function
self._brokerService.submit_requests(ReqIds())
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\broker_service_factory\BrokerService.py", line 332, in submit_requests
return self._brokerClient.request_data(*args)
File "C:\Users\AngelBenitez\Downloads\IBridgePy_Win_Anaconda38_64 (1)\broker_client_factory\BrokerClient.py", line 351, in request_data
raise RuntimeError('%s server did not respond to the request at all. Hint 1: Other IBridgePy connections were not terminated properly. Please close ALL IBridgePy instances and restart. Hint 2: Maybe the market is closed? Is the brokers server on maintenance? Consider trying it later.' % (self.name, ))
RuntimeError: IB server did not respond to the request at all. Hint 1: Other IBridgePy connections were not terminated properly. Please close ALL IBridgePy instances and restart. Hint 2: Maybe the market is closed? Is the brokers server on maintenance? Consider trying it later.
Hello Angel,
Good to know you are starting your journey into Algorithmic Trading with Interactive Brokers. One of the possible reasons that might be happening with your problem could be that you are trying to run a second time your code without previously restart the kernel.
Every time you run your application, if you don't disconnect your app from the IB server, it stays connected. So in case you didn't disconnect your app from the IB server, you can do the same by restarting your IDE kernel.
Please try to restart your IDE kernel whenever you want to run again your code.
In case you still have the same problem or any other new issue, please contact us again to help you,
Thanks and regards
Jose Carlos
Thank You Jose Carlos. This actually worked. Just needed to restart the kernel.
Thank you