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)




"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"There is no doubt that IQFeed is the best data provider. I am very satisfied with your services. And IQFeed is the only one that I would recommend to my friends. Now, most of them are using your product in China." - Comment from Zhezhe
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"It’s so nice to be working with real professionals!" - Comment from Len
"Excellent datafeed !!!" - Comment from Arely
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"I was on the phone with a friend who uses CQG and right after the Fed announcement, CQG was as much as 30 seconds behind DTN.IQ. Some quotes were off by as much as 15-18 cents. Your feed never missed a beat." - Comment from Roger
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »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: Wed May 1, 2024 9:21 PM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003