Re: [TWS API] Problem with Request Market Data - Stale Data?
Thanks, Kurt. It looks like that snapshot feature is pretty useless in this situation. What I've done instead is do the ReqMktData with snapshot false and start a timer. When the timer expires I Purchase. This has been a lot more reliable than trying to use the snapshot. Dave --- In Kurt Bigler wrote: > > I believe when you request market data you will always get one full set of > quotes back immediately (during trading hours). That is normally the > desired behavior. Consider that requesting market data for a symbol is like > adding that symbol on a line in TWS. If you add a symbol, you want to see a > quote. If the price hasn't changed for 8 minutes you still want to see a > quote, rather than nothing. > > You can determine whether you think the quote is stale by looking at the > time stamp. > > I think what you are asking or it to see only new quotes that occurred after > the moment of your submission, like just turning the stream on. But I think > this is a different requirement than the typical one, even if it is > potentially useful. I'd bet you could almost just ignore the first set of > quotes returned by the request, but I suppose there's no guarantees that you > wouldn't miss something that was not stale. So I'd suggest filtering based > on the time stamp, and you can probably get exactly what you want as a > result. > > -Kurt > > > on 4/21/08 9:23 AM, davemabe2000 wrote: > > > > My program gets a signal from an external source, then does a request > > market data using TWS's data feed. > > > > The works fine most of the time. However, when I get signals for the > > same symbol within several minutes, the second request market data > > seems to return some of the data from the first request - it's like > > TWS is caching some of that data and sending it again instead of > > refreshing it. > > > > I'm using a new tick id for the second request and I'm not caching the > > data in my program. Here's an excerpt from my log from this morning. > > The 9 and 10 next to the date is the tick id. These are incoming > > tick data from TWS (for UNS, btw): > > > > 20080421 10:43:01: 9 - HighPrice Price: 27.57 > > 20080421 10:43:01: 9 - LowPrice Price: 26.64 > > 20080421 10:43:01: 9 - ClosePrice Price: 26.81 > > 20080421 10:43:01: 9 - OpenPrice Price: 26.65 > > 20080421 10:43:01: 9 - LastPrice Price: 27.72 > > 20080421 10:43:01: 9 - BidPrice Price: 27.67 > > 20080421 10:43:01: 9 - AskPrice Price: 27.73 > > 20080421 10:51:02: 10 - BidPrice Price: 27.67 > > 20080421 10:51:02: 10 - AskPrice Price: 27.73 > > 20080421 10:51:02: 10 - LastPrice Price: 27.72 > > 20080421 10:51:02: 10 - HighPrice Price: 27.57 > > 20080421 10:51:02: 10 - LowPrice Price: 26.64 > > 20080421 10:51:02: 10 - ClosePrice Price: 26.81 > > 20080421 10:51:02: 10 - OpenPrice Price: 26.65 > > > > Anyway I can tell TWS not to send me cached data? > > > > > > > [Non-text portions of this message have been returnd] > Yahoo! Groups Links To visit your group on the web, go to: Your shop settings: Individual shop | Traditional To change settings online go to: (Yahoo! ID required) To change settings via shop: To Purchase from this group, send an shop to: Your use of Yahoo! Groups is subject to:... Back to listing 39
... Back to article 7660 | SITEMAP | Next to article 7662 ...
We would like to express our gratitude to all those who are kindly providing this unique content, especially to:
office@a3ides.com
olga@bemobile.md
tirlik@brainchildhunter.com
office@bemobile.md
sharuha@causeni.info
info@webconsulting.md
irina.gorea@bemobile.md
office@milieukontakt.nl
igor.romanyuk@bemobile.com.ua
yuri.sekretar@olympia.net.ua
info@tophost.md
webmoldova@yahoo.com
admin@bemobile.md
webmaster@bemobile.md
emil@a3ides.com
olea@bemobile.md
yuri.sekretar@bemobile.com.ua
contact@a3ides.com
info@a3ides.com
vitaliy.lozovskiy@bemobile.md
drugg83@yahoo.com
flaviu.mateevici@gmail.com
flaviu@dataverity.com
rector@usm.md
gaugash@usm.md
acad.rudic@mail.md
acadrudic@yahoo.com
veaceslav.vasilache@gmail.com
s.bakker@milieukontakt.nl
katea.melnicenco@gmail.com
mkoe.moldova@vox.md
musteata@doctor.com
renat.buga@ase.md
s.molenkamp@milieukontakt.nl
si_problemme@mail.ru
willem.tjebbe.oostenbrink@planet.nl
Most popular links:
0, 10:51:02:, 10:43:01:, request, caching, HighPrice, instead, LowPrice, snapshot, AskPrice, settings, BidPrice, LastPrice, ClosePrice, OpenPrice,
Similar listing on:
0, 10:51:02:, 10:43:01:, request, caching, HighPrice, instead, LowPrice, snapshot, AskPrice, settings, BidPrice, LastPrice, ClosePrice, OpenPrice,
Similar listing on:
