Closed tshumay closed 2 years ago
Looks like there is an error in the example. If you remove the what:
data = IBData(host='127.0.0.1', port=7497, clientId=35, name="AAPL", # Data name dataname='AAPL', # Symbol name secType='STK', # SecurityType is STOCK exchange='SMART',# Trading exchange IB's SMART exchange currency='USD', # Currency of SecurityType
rtbar=True, # Request Realtime bars
_debug=True # Set to True to print out debug messagess from IB TWS API
)
Looks like the values that work are "BID", "ASK" and "TRADES".
Ignore the "End Date/Time: The date, time, or time-zone entered is invalid." error as there is no end time for the realtime bars.
Thanks. Will give it a shot.
I'm just getting things up and running here - but it seems like maybe the example code is out of date?
After setting up the environment and testing my connections, executing a python script with the following IBData object:
Results in a stream of 321 errors from the TWS API Client complaining about the 'What to show field':
Should the 'what' field maybe be 'TRADES' instead of 'BID_ASK'?