How to fix this attribute error in Interactive Brokers Python API?

38 views Asked by At

I use ib_insync package for Interactive Brokers TWS. The following commands are used to get market data.

contract = Stock("TSLA", "SMART", "USD")
contract = ib.qualifyContracts(contract)
data1 = ib.reqMktData(contract)

This gives the following error message

AttributeError: 'list' object has no attribute 'secType'

How to fix this?

I do not know how to correct this.

0

There are 0 answers