You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
Currently trying to set up a call to get prices for multiple stocks at once. currently the client is being passed an inputArray of [[stockID, stockContract], [etc,etc]] where the stock ID is the tickID to be used for the given contract.
code:
def get_IB_market_data(self, inputArray, seconds = 5)
marketData = []
for tickID, contract in inputArray:
self.cb.init_tickdata(tickID)
self.cb.init_error()
for tickID, contract in inputArray:
self.tws.reqMktData(tickID, contract, "", False)
start_time = time.time
finished = False
iserror = False
while not finished andnot iserror:
iserror = self.cb.flagh_iserror
if (time.time() - start_time) > seconds:
finished = True
pass
for tickID, contract in inputArray:
self.tws.cancelMktData(tickID)
marketData.append([tickID, self.cb.data_tickdata[tickID]])
if iserror:
*standard is error*
return marketData
currently when it runs the error is the following:
self.tws.reqMktData(tickID, contract, "", False)
TypeError: in method 'EClientSocketBase_reqMktyData', argument 2 of type 'TickerId'
The text was updated successfully, but these errors were encountered:
Hi all,
Currently trying to set up a call to get prices for multiple stocks at once. currently the client is being passed an inputArray of [[stockID, stockContract], [etc,etc]] where the stock ID is the tickID to be used for the given contract.
code:
def get_IB_market_data(self, inputArray, seconds = 5)
marketData = []
for tickID, contract in inputArray:
self.cb.init_tickdata(tickID)
self.cb.init_error()
currently when it runs the error is the following:
self.tws.reqMktData(tickID, contract, "", False)
TypeError: in method 'EClientSocketBase_reqMktyData', argument 2 of type 'TickerId'
The text was updated successfully, but these errors were encountered: