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 »NEW IQFEED FORUMS »IQFeed API Questions »c & s update Message Contents.
Author Topic: c & s update Message Contents. (29 messages, Page 1 of 1)

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 15, 2023 08:18 PM          Msg. 1 of 29
I want to know the settlement price of VIX futures as I'm watching the update steam.
From the documentation:

c - A Close occurred.
s - A Settlement occurred.

So if I am watching VIX futures quotes, will I see an update with the 's' code and the settlement price at the end of the day?

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 17, 2023 03:13 PM          Msg. 2 of 29
So I monitored the quote stream at the EOD and I didn't see anything.
Is this forum even the place to ask questions anymore? Should I direct my questions elsewhere?

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 18, 2023 05:01 PM          Msg. 3 of 29
Futures and futures options have settlement prices, so a settle price should exist on a day where any trading occurred. Do you mean symbols like VIX2315K100?

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 18, 2023 11:18 PM          Msg. 4 of 29
Hi Gary,
I looking specifically at the VIX Mini Futures. So @VXMU23 and so forth.
So the two questions are:
1. Will I see a close and/or a settle.
2. Will this even occur at the close of the market (4 est).

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 19, 2023 01:22 AM          Msg. 5 of 29
To hopefully make things clearer.

I recorded the tick stream today and this is what I saw (I'm not ruling out a problem at my end).
I watch a mixture of stocks and futures. I see close events coming through at the same time as fundamental events. The close events are all for the previous days close (as one would expect).

What I *don't* seem to see are close events around the actual close (4 EST).

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 19, 2023 03:57 PM          Msg. 6 of 29
Craig,

@VXMU23 does have daily Settle prices. You can see them in Time & Sales. They are indicated by "S" in the tick history:

HTX,@VXMU23,5
LH,2023-07-19 16:54:17.016000,17.310,1,1770,17.300,17.310,45526,C,32,01,0,19,
LH,2023-07-19 16:05:34.541000,17.310,1,1769,17.280,17.310,45027,C,32,01,0,19,
LH,2023-07-19 16:03:20.810000,17.320,5,1768,17.320,17.340,44870,C,32,01,0,19,
LH,2023-07-19 16:00:42.810000,17.347,0,1763,17.310,17.340,44759,S,32,01,0,19,
LH,2023-07-19 16:00:32.578000,17.320,11,1763,17.310,17.320,44755,C,32,01,0,19,
!ENDMSG!,

There will not be a settle price if the symbol doesn't trade at all during the day.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 19, 2023 05:20 PM          Msg. 7 of 29
Thanks Gary - how are you issuing those commands?
When I try via telnet my output is swamped with timestamps etc.


Edit more questions:
1. So these events will appear with trade condition 's' in the real-time stream?
2. How do I identify a equities close in real-time?
Edited by Craig on Jul 19, 2023 at 05:28 PM

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 20, 2023 11:45 AM          Msg. 8 of 29
I use PuTTy to test API queries. You have to set Connection Type to Raw, but otherwise the default settings work. Telnet should work too, but you must also set data type to Raw because IQFeed data is not in Telnet format. You can disable timestamps in Level 1 with the command S,TIMESTAMPSOFF. Historical lookups (port 9100) do not send timestamps except as part of requests you to.

1. S is not the Trade Condition. It's the Basis For Last in historical data, and Message Contents in Level 1 dats.

It looks like this in the historical lookup:

LH,2023-07-19 16:00:42.810000,17.347,0,1763,17.310,17.340,44759,S,32,01,0,19,

In Level 1, the field is called Message Contents, and will contain one or more letters. In the default 6.2 message, it is the next-to-last item:

Q,@VXMU23,17.260,2,12:36:30.213000,32,1073,17.270,2,17.300,21,17.440,17.450,17.190,17.347,b,01,

For the settle, this will be a lower-case s. I don't think a settle will ever be something else also, but in other cases it can be:

Q,@VXMU23,17.260,2,12:36:30.213000,32,1073,17.270,2,17.290,2,17.440,17.450,17.190,17.347,ba,01,

2. The close will have a lower case c in the Message Contents. (Upper case C means 'this is a last-qualified trade'.)



Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



Edited by DTN_Gary_Stephen on Jul 20, 2023 at 11:47 AM

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 20, 2023 01:42 PM          Msg. 9 of 29
Sorry to belabour the point - but to make sure I understand.

Equities will have an Q event with a 'c' in the message contents at around 4 est?


(Thanks for the telnet explanation - I think it also helps to connect to the historical port! :))
Edited by Craig on Jul 20, 2023 at 01:42 PM

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 20, 2023 04:16 PM          Msg. 10 of 29
Quote: Equities will have an Q event with a 'c' in the message contents at around 4 est?


Yes, assuming there was an open event that day. if no last-eligible trade occurs for a symbol at all during a trade day, then there is no open and no close. This would never happen to something like MSFT, but some pink sheets can go a day without trading at all.

Again, keep in mind that the message contents field can be more than one character. "ba" (bid update and ask update) and "Cba" (both updates and also a last-eligible trade).

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 20, 2023 05:11 PM          Msg. 11 of 29
I'll not seeing them - but the fault must be on my side.
Thanks for the clarification.

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 21, 2023 03:11 PM          Msg. 12 of 29
I'm just not seeing any 'c' or 's' events in the real-time Q messages around 4 est.
I'm seeing them coming through for the previous day before the market opens, so I know I'm logging them correctly, but nothing at the close.

I see the close in the time & sales trade conditions for equities but not for futures.
I think we're missing each other here - I will be in contact next week.
Edited by Craig on Jul 21, 2023 at 03:14 PM
Edited by Craig on Jul 21, 2023 at 06:01 PM

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 25, 2023 09:00 AM          Msg. 13 of 29
Are we still talking about @VXMU23? I can see C and S ticks in the history:

HTT,@VXMU23,20230724 160000,20230724 160500
LH,2023-07-24 16:04:50.302000,16.690,1,1696,16.680,16.690,20348,C,32,01,0,24,
LH,2023-07-24 16:04:33.783000,16.680,1,1695,16.680,16.690,20346,C,32,01,0,24,
LH,2023-07-24 16:04:29.014000,16.690,1,1694,16.680,16.690,20344,C,32,01,0,24,
LH,2023-07-24 16:04:21.622000,16.690,1,1693,16.680,16.690,20342,O,32,4D,0,24,
LH,2023-07-24 16:04:21.622000,16.690,1,1692,16.680,16.690,20340,O,32,4D,0,24,
LH,2023-07-24 16:04:21.622000,16.690,1,1691,16.680,16.690,20339,O,32,4D,0,24,
LH,2023-07-24 16:02:11.505000,16.690,1,1690,16.680,16.700,20277,O,32,4D,0,24,
LH,2023-07-24 16:01:59.891000,16.690,1,1689,16.690,16.700,20268,C,32,01,0,24,
LH,2023-07-24 16:01:07.120000,16.659,0,1688,16.690,16.710,20221,S,32,01,0,24,
!ENDMSG!,

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 25, 2023 12:36 PM          Msg. 14 of 29
Yes - but this is in the time & sales data right?
I'm pretty sure I'm not seeing them in the realtime Q message stream.

As before - I see c & s messages for the day before, usually with a burst of F messages.
But I see nothing for the current day at around 4 est.

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 25, 2023 01:01 PM          Msg. 15 of 29
Then I'd need to see an example of the data you're collecting. Turn on Logging and make sure "Data" and "Requests" are both active in Diagnostics app/Logging tab. Also, make sure the Message Contents field is enabled in the Q message. In protocol 6.2 it would be part of the message by default, but if you're using S,Select Update Fields to customize the message, it is possible to omit this field.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 26, 2023 02:01 PM          Msg. 16 of 29
I'm running with logging today - the file is huge - I will grep it down to the @VXMQ23 quotes around the close before sending.

BTW - What is the rule for requesting historical futures tick data? How far back can I go with requests on @VXMQ23? How far back can I go with any arbitrary futures symbol.

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 26, 2023 03:11 PM          Msg. 17 of 29
OK - So here is the grepped logging for @VXMQ23 for today. I see no 's' or 'c' in the message contents on a cursory look - but I may be missing something.



File Attached: vx.zip (downloaded 340 times)

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 27, 2023 02:10 PM          Msg. 18 of 29
So they are not there right?
So do you plan to add them or was it all a misunderstanding?

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Jul 28, 2023 10:59 AM          Msg. 19 of 29
No, I don't see the settle price in the log file you sent me. According to the historical lookup, it happened at 16:01:06.129000, and the settle was 15.688. Your log says:

IQConnectLog.txt:73305263:TO CLIENT L1Data 6468 120 2023-07-26 16:01:05 Q,@VXMQ23,14.900,14.890,14.900,1,b,32,3,10,
IQConnectLog.txt:73305268:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73305273:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73305275:TO CLIENT L1Data 6468 120 2023-07-26 16:01:06 Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73305437:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,3,10,
IQConnectLog.txt:73305442:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,3,10,
IQConnectLog.txt:73305446:TO CLIENT L1Data 6468 120 2023-07-26 16:01:06 Q,@VXMQ23,14.900,14.890,14.900,1,b,32,3,10,
IQConnectLog.txt:73305489:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73305499:Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73305503:TO CLIENT L1Data 6468 120 2023-07-26 16:01:06 Q,@VXMQ23,14.900,14.890,14.900,1,b,32,2,10,
IQConnectLog.txt:73306962:TO CLIENT L1Data 6468 108 2023-07-26 16:01:08 Q,@VXMQ23,14.890,14.890,14.900,1,C,32,2,10,

There's no record of the settle price. There won't be a Close price for this kind of symbol, because the Settle also serves as the close. (I should have said that earlier.) I'll watch the symbol today and try to locate the settle.

It looks like some thing are missing from this log; the numbers like 73305275 and 73305437 suggest some records are missing. Make sure you're not filtering the settle out somehow. You're doing the correct kind of watch, and the Message Contents are present.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Jul 28, 2023 at 11:00 AM

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 28, 2023 01:54 PM          Msg. 20 of 29
This is simply a grep of the log on the pattern 'Q,@VXMQ23'.
So unless the 'missing' events have a different form, they should be here.
Aren't the missing gaps in the numbers because of the other symbols I'm watching?

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Jul 31, 2023 07:43 PM          Msg. 21 of 29
Are we going any further with this or not?

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Aug 1, 2023 01:12 PM          Msg. 22 of 29
So far I haven't been able to capture the Settle message from the live watch either, but that may have been my mistake. I'm trying again today. I'll post an update.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Aug 1, 2023 03:53 PM          Msg. 23 of 29
You're right, I'm not seeing the Settle message on the live Level 1 feed where it should be. I'm investigating further.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Aug 2, 2023 01:21 AM          Msg. 24 of 29
Thanks Gary, let me know what happens.

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Aug 8, 2023 03:41 PM          Msg. 25 of 29
I've finally figured out the problem:

When the Settle price is sent, it only contains the settle price, settle date, and TickID. If you don't have any of those fields in your message, you won't get the message. (IQFeed does not send Q messages if nothing changed in that message, in any of the fields you view.) To get the Settle message with the s Basis For Last, I have to have at least one of those three fields in my message. So I added them to the default fields:

S,SELECT UPDATE FIELDS,Symbol,Most Recent Trade,Most Recent Trade Size,Most Recent Trade Time,Most Recent Trade Market Center,Total Volume,Bid,Bid Size,Ask,Ask Size,Open,High,Low,Close,Message Contents,Most Recent Trade Conditions,Settle,Settlement Date,TickID,

Then when I watch the future option symbol, the s message is sent:

Q,@VXMQ23,16.530,1,16:00:45.043000,32,10456,16.510,4,16.530,1,16.220,18.510,16.190,16.294,a,01,16.294,08/07/2023,612454,
Q,@VXMQ23,16.530,1,16:00:45.043000,32,10456,16.510,4,16.540,3,16.220,18.510,16.190,16.294,a,01,16.294,08/07/2023,612454,
Q,@VXMQ23,16.530,1,16:00:45.043000,32,10456,16.510,4,16.540,3,16.220,18.510,16.190,16.294,s,01,16.496,08/08/2023,612470,
Q,@VXMQ23,16.530,1,16:00:45.043000,32,10456,16.510,4,16.530,1,16.220,18.510,16.190,16.294,a,01,16.496,08/08/2023,612470,

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Aug 8, 2023 10:43 PM          Msg. 26 of 29
Hi Gary,

This is good to know!
So does the same situation apply to close prices in equities (i.e one must have the Close field).

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Aug 11, 2023 01:55 PM          Msg. 27 of 29
Hi Gary - it would be good if I could have an answer to my question so I can continue development.

Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010


Posted: Aug 21, 2023 01:31 PM          Msg. 28 of 29
Sigh....a development project which I thought would take days has now stretched to months...
What does it take to get a response?
Edited by Craig on Aug 22, 2023 at 12:34 AM

DTN_Gary_Stephen
-DTN Guru-
Posts: 403
Joined: Jul 3, 2019


Posted: Aug 22, 2023 02:42 PM          Msg. 29 of 29
Craig,

The close "c" message doesn't necessarily happen immediately when the close happens. It varies by exchange, but in most cases it is sent later.

The best way to know the close price as soon as possible in iqfeed is to use an HDX historical lookup command:

HDX,symbol,1,,,0

The ,,,,0 sets Include Partial Datapoint to "no." The command itself returns 1 day of daily data, and it today's close has happened, it'll be today's data. If I run it now (at 3:40 PM Eastern time) I get:

HDX,AAL,1,,,,0
LH,2023-08-21,15.2000,14.9500,15.0600,15.1600,23656300,0,
!ENDMSG!,

But after the close happens, it'll give me the record for 2023-08-22. And, IQFeed returning it when I have Include Partial Datapoint set to no implies that today's close has happened.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist
 

 

Time: Thu December 5, 2024 1:24 AM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003