开云体育

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

Re: IBAPI - Contract details for micro contracts MYM


 

开云体育

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,

I'm new at this, and would like some help with Contract Definitions for the ECBOT exchange contracts.

Using the provided Python sample Program.py and am able to obtain snapshot data for GLOBEX and NYMEX, however with ECBOT I am not able to obtain any snapshot information unless I provide a conId, as per the contract definition:

contract = Contract()
contract.conId =
428519925
contract.secType = "FUT"
contract.exchange = "ECBOT"
contract.currency = "USD"
contract.localSymbol = "MYMM1"


However when the conId is omitted, as I do in all other contracts, I receive the dreaded 200 error message.

ERROR 1005 200 No security definition has been found for the request.


Is someone able to help me with the correct way of defining these contracts: MYM, YC, YK and YW?

Thanks,
KH

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