Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
Home  Search  Register  Login  Blogs Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTN_IQFeed on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »IQFeed Developer »IQFeed Developer Support »Price change updates after market close
Author Topic: Price change updates after market close (3 messages, Page 1 of 1)

sgill
-Interested User-
Posts: 3
Joined: Jun 21, 2013


Posted: May 1, 2018 03:28 PM          Msg. 1 of 3
I'm a new developer working with iQFeed and DTN and the commodity markets in general. We have an application that uses the iQFeed 'Q' Update Format messages to update data in our system. We need the most recent Futures prices to be stored in our application. When the "Message Contents" field contains a 'C' or an 's' we know to update the price, so we will change the price in our application to reflect this trade update. I'm expecting that when we get the 's' this would be the last update we receive for the trading session. The issue we are experiencing though is after we receive a settle price from iQFeed, we are also getting additional 'C' update messages which changes the price in our application away from the actual settle price. Some of our users are using other realtime tools such as DTN ProphetX and notice the last trade price doesn't match.

Here is the FIELDS we request from iQFeed:
Symbol,Last Trade Date,Last TimeMS,Tick,Last,Last Market Center,Settle,Settlement Date,Message Contents

Here is an example logs from our application that shows the iQFeed data:
(notice we are still receiving the 'C' trade update messages after the 's' update which occurred at 13:19:18.159)

2018-04-03 13:16:33.046 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:16:33.139,183,526.2,54,524.8,04/02/2018,C,
2018-04-03 13:17:21.844 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:17:21.919,183,526.2,54,524.8,04/02/2018,C,
2018-04-03 13:17:24.434 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:17:24.527,173,526.4,54,524.8,04/02/2018,C,
2018-04-03 13:17:46.586 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:17:46.687,175,526.2,54,524.8,04/02/2018,C,
2018-04-03 13:17:46.586 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:17:46.687,183,526.2,54,524.8,04/02/2018,C,
2018-04-03 13:19:14.009 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:14.107,173,526.5,54,524.8,04/02/2018,C,
2018-04-03 13:19:16.927 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:17.029,173,526.6,54,524.8,04/02/2018,C,
2018-04-03 13:19:16.927 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:17.029,183,526.6,54,524.8,04/02/2018,C,
2018-04-03 13:19:17.379 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:17.479,183,526.6,54,524.8,04/02/2018,C,
2018-04-03 13:19:18.159 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:17.479,,526.6,54,526.5,04/03/2018,s,
2018-04-03 13:19:18.159 INFO QuoteFeed:140 - P,@RSK18,04/03/2018,14:19:17.479,,526.6,54,526.5,04/03/2018,Cbasohlc,
2018-04-03 13:19:18.159 INFO QuoteFeed:184 - Summary recieved: P,@RSK18,04/03/2018,14:19:17.479,,526.6,54,526.5,04/03/2018,Cbasohlc,
2018-04-03 13:19:18.159 INFO QuoteFeed:140 - F,@RSK18,36,,,537.9,488.0,,,,,,,,,,,,,,,,,,CANOLA MAY 2018,,,,,,,,,,, , ,,0,11,1,,8.72,8,54,07/11/2017,06/23/2017,,,,,,05/14/2018,,,RS,
2018-04-03 13:19:18.159 INFO QuoteFeed:177 - Added symbol metadata for @RSK18
2018-04-03 13:19:43.182 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:43.249,183,526.6,54,526.5,04/03/2018,C,
2018-04-03 13:19:43.182 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:43.249,173,526.7,54,526.5,04/03/2018,C,
2018-04-03 13:19:43.182 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:43.249,183,526.7,54,526.5,04/03/2018,C,
2018-04-03 13:19:43.197 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:43.249,183,526.7,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.107 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,175,526.3,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.122 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,175,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,
2018-04-03 13:19:51.138 INFO QuoteFeed:140 - Q,@RSK18,04/03/2018,14:19:51.223,183,526.2,54,526.5,04/03/2018,C,

My understanding of this is that it's normal to get additional trades enterred for that Future after the market has settled. I see there is a field called Market Open that you can request from iQFeed, but I don't know if this would help since these updates appear to come in prior to this Future market sessions closing time of 13:20 CT.

Is it possible to somehow trigger on this settle price update and ignore the additional trade updates?

Is there some kind of logic that I can apply to my application so that these additional trades don't change my settle price?

Has anyone else run into this and how did you address it?

Thanks, any help you can provide would be great.

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006


Posted: May 2, 2018 06:59 AM          Msg. 2 of 3
Good morning,

I think you have the fields that you need for this already. I would probably just have some code that says

if TradeDate != SettleDate
use LastPrice
else
use SettlePrice

This way as soon as the current day's settle comes in, your code will just toggle over to the fields that you want and inherently ignore the additional regular trades.

But, many things do trade overnight as well, and if you want to start reading in C trades again later the same day, the logic above will miss that. So alternatively,

if (TradeDate != SettleDate) || (DateTimeOfCurrentDay > DateTimeOfNextOpen)
use LastPrice
else
use SettlePrice

We do not have the market hours in our API feed, so you would want to get the market hours from the contract specs or from these pages where we have compiled some of that info for you.

CME: http://www.iqfeed.net/symbolguide/display.cfm?eight=0800A96A.cfm&six=06000429&title=DTN%20-%20CME%20GROUP%20TRADING%20HOURS
NYMEX/COMEX: http://www.iqfeed.net/symbolguide/display.cfm?eight=0800A970.cfm&six=06000429&title=DTN%20-%20NYMEX%2FCOMEX%20TRADING%20HOURS

Hopefully, one of those scenarios will match your need, but let me know if you have any questions.

Tim

sgill
-Interested User-
Posts: 3
Joined: Jun 21, 2013


Posted: May 2, 2018 10:28 AM          Msg. 3 of 3
Hi Tim,

Thanks for your prompt reply. Your first logic example as you said doesn't apply since many of the symbols we look at do have over night trading. As an alternative to your second example, would we be able to only process update messages where the "Market Open" field = 1? This would greatly simplify our logic if it works.

Here is a Futures commodity where I noticed we get a Q Update Message with a second 's' when the market is closed.

2018-04-30 13:30:10.654 INFO QuoteFeed:140 - Q,@RSK18,04/30/2018,09:59:23.224,,527.0,54,530.1,04/30/2018,s,1,
2018-04-30 13:30:10.657 INFO QuoteFeed:140 - P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,530.1,04/30/2018,,0,
2018-04-30 13:30:10.657 INFO QuoteFeed:184 - Summary recieved: P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,530.1,04/30/2018,,0,
2018-04-30 13:30:10.657 INFO QuoteFeed:140 - P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,530.1,04/30/2018,Cbasohlc,0,
2018-04-30 13:30:10.657 INFO QuoteFeed:184 - Summary recieved: P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,530.1,04/30/2018,Cbasohlc,0,
2018-04-30 13:30:10.657 INFO QuoteFeed:140 - F,@RSK18,36,,,541.7,488.0,,,,,,,,,,,,,,,,,,CANOLA MAY 2018,,,,,,,,,,, , ,,0,11,1,,9.28,8,54,04/25/2018,06/23/2017,,,,,,05/14/2018,,,RS,
2018-04-30 13:30:10.657 INFO QuoteFeed:177 - Added symbol metadata for @RSK18
2018-04-30 13:42:48.708 INFO QuoteFeed:140 - Q,@RSK18,04/30/2018,09:59:23.224,,527.0,54,531.3,04/30/2018,s,0,
2018-04-30 13:42:48.708 INFO QuoteFeed:140 - P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,531.3,04/30/2018,,0,
2018-04-30 13:42:48.708 INFO QuoteFeed:184 - Summary recieved: P,@RSK18,04/30/2018,09:59:23.224,,527.0,54,531.3,04/30/2018,,0,

When I looked on the ICE exchange it shows that the settle price on 4/30/2018 was 530.1 which matches the first 's' when the market is open, not the second 's' which has the settle as 531.3

So this logic would be roughly this:

if MarketOpen = 1
if MessageContents contains 's'
use SettlePrice
else
use LastPrice
end if
else
don't update price
end if

Thanks.
 

 

Time: Sun October 21, 2018 9:38 AM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003