开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: TWS API returns "Error: 0 200 No security definition has been found for the request" in reqMktData() for INDEX


 

开云体育

You can't use SMART for indexes. The exchange for the ES index is GLOBEX.

?

From: [email protected] <[email protected]> On Behalf Of Tareq Naushad
Sent: 08 March 2022 10:57
To: [email protected]
Subject: [TWS API] TWS API returns "Error: 0 200 No security definition has been found for the request" in reqMktData() for INDEX

?

Hi,
I am trying to pull real-time data for some INDEX in a Python based project, I write the following code to pull the data:??
```
contract = Contract()
contract.symbol = "ES"
contract.secType = "IND"
contract.exchange = "SMART"
contract.currency = "USD"
reqMarketDataType(1)
reqMktData(2, contract, "", False, False, [])
```

But it always returns?"Error:? 0? ?200? ?No security definition has been found for the request".

Does anyone know what's wrong with my code?

- Thanks
Tareq

Join [email protected] to automatically receive all group messages.