开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date
Can't finde "PURE" exchange on the list of validExchanges from a Contract object.
Hello. I'm trying to request contracts and other types of data for the stocks listed under PURE inside the TWS exchange listings (please see this link so you can get see the full list of securities:
By Aquiles Páez <aquilesjlp300@...> · #47210 ·
Re: Pulling reqMktData for multiple tickers
Excellent Patrick - I'm happy it's working for you now!
By @ScottBrian · #47209 ·
Re: Pulling reqMktData for multiple tickers
The code worked Scott! Once I get a little breather from the markets today, I'll sit down and dig through the code so I can mentally understand how it all went together. This is a good lesson right
By Patrick C · #47208 ·
Re: Submit orders to TWS via API
Hi Artyom Thanks for your reply... Suggestion (1) resolved the issue thanks all.. for your inputs regards ed wrote:
By Ed Bell · #47207 ·
Re: Pulling reqMktData for multiple tickers
Hi Patrick, Ooops, my bad with the tickerId - I was trying to get the first tickerId to be 1 and to also use it as the index to the tickers list, but I failed to subtract 1 from the tickerId when
By @ScottBrian · #47206 ·
Re: Pulling reqMktData for multiple tickers
So leaving the +1 in: for tickerId in range(1, len(tickers) +1 ): was giving me an IndexError: list index out of range So I removed the +1 and this is what I get. I get 3 threads running. But I'm
By Patrick C · #47205 ·
Re: Pulling reqMktData for multiple tickers
You guys are rock stars, all of you guys! I'm gunna sit down and read through everything here a second time, and also test the code snip from Scott. I really really appreciate everyone trying to help
By Patrick C · #47202 ·
Re: Pulling reqMktData for multiple tickers
Hi Ray, No ouch from me I hope. I thought your reply was very excellent and explained a lot about threading. I also think your advice to not use threading is sound for this current case of getting
By @ScottBrian · #47201 ·
Re: Submit orders to TWS via API
two cents from my side, consider these steps: 1. bringing TWS connect disconnect outside of infinite loop 2. implement filesystem watchdog observer, for example:
By Artyom T. · #47200 ·
Re: Submit orders to TWS via API
Hi Bruce, many thanks for your reply please see response inline order is placed there is no confirmation from TWS of success or failure... no messages....but will check logs as suggested i am also
By Ed Bell · #47199 ·
Re: Pulling reqMktData for multiple tickers
Ouch. So my reply was more damaging then helpful. To follow up. As some pointed out there is the IBK 2-Thread and 3-Thread model that is explaned in the iBK doc really well. I conflated the
By Ray Racine · #47198 ·
Re: Submit orders to TWS via API
Ed, Here is the key line from you: "However when connected to live mode it does not execute successfully" If you detail what you mean by "successfully" your problem will be solved. This is a
By Bruce B · #47197 ·
Re: Submit orders to TWS via API
Hi Scott Thanks for reply.. Read-Only box is unchecked I need to mention that when i run the version of the program which is single execution it works... however the version i shared which runs
By Ed Bell · #47196 ·
Re: Submit orders to TWS via API
Hi Ed, Just a wild guess - check to ensure the "Read-Only API" setting in the TWS API Settings dialog is NOT checked. Cheers, Scott
By @ScottBrian · #47195 ·
Re: Pulling reqMktData for multiple tickers
Hi Patrick, Have you considered using input to get the symbols? That way, no need to change any code with cut and paste. And, you can loop for as many symbols as you need, each day having a different
By @ScottBrian · #47194 ·
Re: Pulling reqMktData for multiple tickers
Victems of Python? Regarding this discussion, I recalled, how `IB-Ruby` does it: # define symbos # put into a file-database => IB::Symbols::W20 # call threaded market-price method and wait for all
By Hartmut Bischoff · #47193 ·
Re: Pulling reqMktData for multiple tickers
Ray, that's a pretty good description of why you use a threadpool. For reference, here is how the Java API works (different from what Ray described which I suspect is how it works in Python).?
By Hunter C Payne · #47192 ·
Re: Pulling reqMktData for multiple tickers
So lets step back a bit. Conceptually any regular old program you wirte wiith the standard IBK client library (there are other ways to do it) has two (2) threads of execution. The first is the main
By Ray Racine · #47191 ·
Re: Pulling reqMktData for multiple tickers
Oops.? Sorry for the second post. Make that 'a callback for each ticker' and register said callback using reqMktData (or whichever API call you are using).? Basically, don't use threads unless you
By Hunter C Payne · #47190 ·
Re: Pulling reqMktData for multiple tickers
I'm not a Python programmer.? I would hope that Python has some stock threadpool library for you to use.? Perhaps some of the Python folks could recommend one to you.? Concurrent programming is
By Hunter C Payne · #47189 ·