Skip to content
Prev 14629 / 15274 Next

problem with reqMktData

On Do, 18 Okt 2018, Stephen Choularton writes:
I don't think you can request market data for
continuous contracts. As the IB docs say:

,----
| Continuous futures are available from the API with TWS
| v971 and higher. Continuous futures cannot be used with
| real time data or to place orders, but only for
| historical data.
`----

If I understand you correctly, you want data for
the soybeans Nov-18 future?

,----
| library("IBrokers")
| tws <- twsConnect()
| contract1 <- twsContract(
|     local = "ZS   NOV 18",
|     sectype = "FUT", 
|     exch = "ECBOT",
|     currency = "USD",
|     include_expired = "1",
|     conId = "", symbol = "",
|     primary = "", expiry = "", 
|     strike = "", right = "",
|     multiplier = "", combo_legs_desc = "", 
|     comboleg = "", secIdType = "", secId = "")
| reqMktData(tws, contract1)
`----

See the description for the contract specification here:
https://github.com/enricoschumann/IButils#finding-the-contract-specification
Message-ID: <87tvljcwwb.fsf@enricoschumann.net>
In-Reply-To: <a2d7f554-2369-022f-76bd-26a10796903a@organicfoodmarkets.com.au> (Stephen Choularton's message of "Thu, 18 Oct 2018 21:51:04 +1100")