Keyboard Shortcuts
Likes
Search
OTC
Stuart Cracraft
¿ªÔÆÌåÓýHi, Anyone know what to set the primaryExchange to so that it is general (e.g. would buy from OTC even?) I looked at: but it simply said NASDAQ vs. ISLAND as far as I could see. So maybe it means ¡°ISLAND¡± for the various exchanges? My present code runs fine in the paper trading account for NASDAQ, NYSE, AMEX, OTC trading all, but when switched to the cash account isn¡¯t able to submit the OTC trades. They simply don¡¯t submit. All the other submit fine. Is there some value for contract.PrimaryExchange (or code) I can use which would submit it for NASDAQ / OTC / Amex / NYSE? ? ??def start(self): contract = Contract() ? ? ? ? contract.secType = "STK" contract.exchange = "SMART" ? ? ? ? contract.currency = "USD" ? ? ? ? contract.primaryExchange = "NASDAQ" ? ? ? ? order = Order() |
Do a first to get it Getting contract details is not an option! Forget about guessing, even is ISLAND = NASDAQ? you need to knwo whcih tape you listen to. Avoid this mess do a reqConrtactDetails! You will need it mandatory , not only do you need primary exchange but you will need the vital "conid"! ? |
If you expect multiple answers or wonder what should be specify, use reqMatchingSymbols(211, "xxxxxxx") quick and efficient. That deliver immediately nearly all you need to prepare future request. If you are an adept of guessing, set Exchange = SMART and Primary empty or "ISLAND" for Nasdaq, NYSE for Nyse etc ... But unless misinterpreting your intention you will need "conid" anyway to pass an order and this one you cannot guess it. ? |
¿ªÔÆÌåÓýThat is not true. You don't need conid to place an order. ? For example, to place an order for the ES E-mini future for March 21, all you need is: ? LocalSymbol = "ESH1" SecType = "FUT" Exchange = "GLOBEX" ? Try it yourself! ? ? From: [email protected] <[email protected]> On Behalf Of hymagik via groups.io
Sent: 20 January 2021 18:03 To: [email protected] Subject: Re: [TWS API] OTC ? If you expect multiple answers or wonder what should be specify, use reqMatchingSymbols(211, "xxxxxxx") quick and efficient. That deliver immediately nearly all you need to prepare future request. If you are an adept of guessing, set Exchange = SMART and Primary empty or "ISLAND" for Nasdaq, NYSE for Nyse etc ... But unless misinterpreting your intention you will need "conid" anyway to pass an order and this one you cannot guess it. ? |