开云体育For most futures, you can get the contract by specifying just the sectype, the local symbol and the exchange (for example E-Mini futures on Globex). For some futures, which only trade on a single exchange, you only need the sectype and the local symbol (for example FTSE Futures and DTB futures). ? And MYM is one of the latter: all you need is sectype="FUT" and localsymbol="MYM? JUN 21" ? Note that the localsymbol for ECBOT contracts is a different pattern from many other exchanges, so it's not "MYMM1" as you reasonably guessed. The DTB exchange also uses this format. ? Another ECBOT contract is ZB?? JUN 21 (there are three spaces after ZB), but in this case you have to supply the exchange as well because it also trades on QBALGO. ? What would be handy would be a nice little program that would allow you to try various different contract requests and show you what you get back. Oh wait – I wrote one! It's called the Contract Inspector, it's free and open source, and you can acquire it from here: ? ? I find it really useful for resolving this sort of problem. ? Note: there's a gotcha – this program is currently Windows only, and it uses Microsoft's OneClick technology to keep itself up to date, but at the moment there is a serious problem with OneClick in that it only works via Internet Explorer in Windows 10 20H2 or later (yes, really, Internet Explorer!...). So if you go to the website above with IE the install will work fine, but with any other browser you just get a dumb page of XML displayed. Microsoft are aware of this problem but they seem to be flummoxed by it… ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of Kevin
Sent: 12 May 2021 10:15 To: [email protected] Subject: [TWS API] IBAPI - Contract details for micro contracts MYM ? Hello, contract = Contract()
|