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'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"For anyone considering using DTN.IQ for a data feed, my experience with the quality of data and the tech support has been very positive." - Comment from Public Forum
"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
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"Everything is working great with the API. I love it." - Comment from Calvin
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"As a past ******* customer(and not a happy one), IQ Feed by DTN is a much better and cheaper product with great customer support. I have had no problems at all since switching over." - Comment from Public Forum
"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
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 »IQFeed Developer »IQFeed Developer Support »Is trade data provided on the same level 1 message update
Author Topic: Is trade data provided on the same level 1 message update (14 messages, Page 1 of 1)

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 27, 2020 11:05 PM          Msg. 1 of 14
Couple of questions on:

http://www.iqfeed.net/dev/api/docs//Level1UpdateSummaryMessage.cfm

1. How do I distinguish trade data from level 1 book updates?
2. is the book always provided on a trade update?
3. Is the VWAP for CME calculated in iqconnect.exe or calculated by your server or exchange?
4. What is TickID? Is that a sequence which gets incremented for each quote update? Or is it increment for each trade?
5. If two trades happen at the same price and same time, do you sum them and send them in one message?
6. What about numtrades?

If iqconnects shuts crashes and is not connected for some time, when it reconects will the fields it calculates be correct (in other words) does it fill gaps?

DTN Todd
-Interested User-
Posts: 72
Joined: Mar 24, 2010


Posted: Apr 27, 2020 11:27 PM          Msg. 2 of 14
Hello Trader2012

I will have our Developer support team look into your inquiries.

Thanks
Todd

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


Posted: Apr 28, 2020 09:00 AM          Msg. 3 of 14
Quote: Couple of questions on:

http://www.iqfeed.net/dev/api/docs//Level1UpdateSummaryMessage.cfm

1. How do I distinguish trade data from level 1 book updates?
2. is the book always provided on a trade update?
3. Is the VWAP for CME calculated in iqconnect.exe or calculated by your server or exchange?
4. What is TickID? Is that a sequence which gets incremented for each quote update? Or is it increment for each trade?
5. If two trades happen at the same price and same time, do you sum them and send them in one message?
6. What about numtrades?

If iqconnects shuts crashes and is not connected for some time, when it reconects will the fields it calculates be correct (in other words) does it fill gaps?
--- Original message by trader2021 on Apr 27, 2020 11:05 PM
1. I'm not sure what you mean by "Level 1 book updates." Level 1 (port 5009 by default) delivers only tick data, nothing related to market depth. All market depth information comes from the Level 2 port, Port 9200.

2. You will receive one message for each current market maker (Nasdaq Level 2 if watching equities) or Level of Market Depth (if watching Futures). Again, this comes from the Level 2 port.

3. It could actually be either. If the exchange does not report it, DTN calculates it. Otherwise DTN sends what the exchange reports.

4. A TickID is a unique numeric identifier for that tick. TickIDs don't necessarily increment; they are only guaranteed to be unique by symbol/traded market. Forex symbols don't have a TickID; the Volume is incremented by 1 with each tick.

5. On the Level 1 port, each tick has its own message.

6. Historical requests have a Number of Trades field where appropriate. For example, if you request historical data in 5-minute intervals, each record will contain a field that tells you how many trades make up that 5-minute interval. This would apply to the HIX, HID, and HIT commands.

7. Not if it's disconnected for a long time. The IQFeed API has some functionality that can bridge short disconnections, but not a long one.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 28, 2020 09:29 AM          Msg. 4 of 14
Thank you for your reply. Comments/questions below:

1. Ok, so 5009 only does trades (is that what you call a tick?)
2. Do I have to subscribe to market depth or is that included?
3. How do I know what comes from the exchange and what from dtn and most importantly what is calculated from iqconnect on my computer.
4. I don't understand "TickIDs don't necessarily increment" if they get incremented for each tick? for a non forex symbol it should increment with each message?

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


Posted: Apr 28, 2020 11:17 AM          Msg. 5 of 14
Quote: Thank you for your reply. Comments/questions below:

1. Ok, so 5009 only does trades (is that what you call a tick?)
2. Do I have to subscribe to market depth or is that included?
3. How do I know what comes from the exchange and what from dtn and most importantly what is calculated from iqconnect on my computer.
4. I don't understand "TickIDs don't necessarily increment" if they get incremented for each tick? for a non forex symbol it should increment with each message?
--- Original message by trader2021 on Apr 28, 2020 09:29 AM
1. I've been using the term 'tick' a little broadly here. A more precise phrasing would be "Level 1 data contains all trades and NBBO (national best bid and offer) quotes." We do not bundle trades/NBBO quotes in any way on the live feed.

2. It is additional. Market Depth is one of the many additional data sources (like other exchanges) you can subscribe to via myaccount.dtn.com.

3. The "origin of data" column at http://www.iqfeed.net/dev/api/docs/Level1UpdateSummaryMessage.cfm tells you how each data point is determined. If you're asking about individual cases where a data point can came from more than one source ("Provided by the exchange or 3rd party data provider") there's no field that identifies the exact source for each data point.

4. What I mean is, TickIDs don't necessarily increase by 1 every time. They're not necessarily sequential. The only guarantee is that a TickID will be unique for that symbol and that exchange... and even that has a caveat, because of the way the CME sends data (see https://www.cmegroup.com/confluence/display/EPICSANDBOX/CME+MDP+3.0+Market+Data ). CME sometimes sends records in bulk, but we split them back out into single records, with the same TickID. That is an exception to that rule.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 29, 2020 12:13 PM          Msg. 6 of 14
Sorry, I'm still confused. If I wanted to only top of the book quotes and updates. Is that included in the standard package? Or are the top of book quotes an added package? I see that on each tick I get the best bid ask offer? ( i only trade futures so it's only one exchange).

Will the tick updates also get updated when the best bid/ask changes and there is no trade?

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 29, 2020 12:29 PM          Msg. 7 of 14
Also, thanks for the clarification on the tickid and where the tickid might be the same for all trades grouped together by CME.

1. If the same update messages groups quote updates and tick updates. How will I know if the update message is for a top of book level 1 update or a tick trade. I can't use tickid since tickid can be the same for new trades as well)

I need a way to know that this is only a quote update/or a trade update or both.

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


Posted: Apr 29, 2020 02:51 PM          Msg. 8 of 14
Quote: If I wanted to only top of the book quotes and updates. Is that included in the standard package?

I see that on each tick I get the best bid ask offer?


Yes and yes.

Quote: If the same update messages groups quote updates and tick updates. How will I know if the update message is for a top of book level 1 update or a tick trade.


Each trade has a "trade conditions" data point that will tell you the circumstances of that trade. The API command STC will give you a list of all the possible codes. A trade may have more than one of these codes.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 29, 2020 04:32 PM          Msg. 9 of 14
Maybe I was not not clear. Let's assume the market has no trade in a 5 minute interval and the bid/ask move 5 times in that interval.

Will I see 5 update messages? What will be in the most recent trade column? How will I know that that these 5 updates were for only book updates and no trades happened in these 5 update messages?

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


Posted: Apr 30, 2020 10:24 AM          Msg. 10 of 14
Let me illustrate with an example:

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

Q,@CZ20336.250,1,10:10:58.663156,111,19737,336.000,126,336.250,33,333.500,337.000,331.250,333.500,b,01,

Look at the next-to-last item, in Green. That is the Message Contents. That tells you what happened in this record:

C - Last Qualified Trade.
E - Extended Trade = Form T trade.
O - Other Trade = Any trade not accounted for by C or E.
b - A bid update occurred.
a - An ask update occurred.
o - An Open occurred.
h - A High occurred.
l - A Low occurred.
c - A Close occurred.
s - A Settlement occurred.
v - A volume update occurred.

In this example, it's "b", which means the bid changed. C appears if this record is a qualified trade. E or O would mean other types of trades. There can also be more than one of these letters, e.g. "ba" is an update where both a bid update and ask update occurred.

(I previously called this Trade Conditions, but the correct term is Message Contents. Trade Conditions tell you the nature of the trade. Also, Trade Aggressor tells you whether the buyer or seller initiated the trade.)

The Most Recent Trade Column will be the amount of the most recent trade. If an update is for bid/ask, or otherwise not a trade, this will stay the same:

Q,@CZ20,336.250,1,10:10:58.663156,111,19737,336.000,203,336.250,3,333.500,337.000,331.250,333.500,a,01,
Q,@CZ20,336.250,1,10:10:58.663156,111,19737,336.000,203,336.250,2,333.500,337.000,331.250,333.500,a,01,
Q,@CZ20,336.250,1,10:10:58.663156,111,19737,336.000,218,336.250,2,333.500,337.000,331.250,333.500,b,01,
Q,@CZ20,336.250,1,10:10:58.663156,111,19737,336.000,233,336.250,2,333.500,337.000,331.250,333.500,b,01,
Q,@CZ20,336.250,1,10:10:58.663156,111,19737,336.000,253,336.250,2,333.500,337.000,331.250,333.500,b,01,
Q,@CZ20,336.250,1,10:11:09.917008,111,19738,336.000,253,336.250,2,333.500,337.000,331.250,333.500,C,01,

You can see several updates to the bid (b) or ask (a), and then a trade (C). The amount happens not to have changed in this case, but it was a trade, so it gets a record. Notice that the Most Recent Trade Time changes.

In your example, yes, you will see 5 update messages. The Most Recent Trade column will contain the amount of the most recent trade; it will stay the same when an update is not a trade. The Message Contents field will tell you what is updated in each record.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Apr 30, 2020 at 10:49 AM

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 30, 2020 10:29 AM          Msg. 11 of 14
Thank you so much for the detaled explanation. I understand it much better now. Couple of followup questions:

1. Can a trade and quote update be combined? So will I see Cab or some combination of that?
2. Can you give me examples of what C trades types are and what E or O are? In particular, I'm looking for trades which are current and happen on the current book. Don't want to process trades that are not done in the market at the current time.

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


Posted: Apr 30, 2020 11:03 AM          Msg. 12 of 14
1. I don't believe so, but I'll double check. (ETA: It varies by exchange, as the different exchanges have different ways of doing things. Our general advice to programmers is to assume that all combinations are possible.)

2. The Trade Conditions field (the last field) goes into more detail about each trade. Usually this is 01, which means REGULAR,Normal Trade. You can get a list of all these codes and what they mean by sending STC to the History port (9100). Also, you have to convert this number from hex to decimal. For example, a common Trade Condition other than 01 is 87. 87 in hex is 135 in decimal, and in the STC list 135 means ODDLOT,Odd lot trade. Again, it's possible for a trade to have more than one of these condition codes.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Apr 30, 2020 at 01:49 PM

trader2021
-Interested User-
Posts: 8
Joined: Apr 27, 2020


Posted: Apr 30, 2020 11:06 AM          Msg. 13 of 14
Are the trade conditions on some web page or text file? I'm not setup currently to be able to get commands over the STC?

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


Posted: Apr 30, 2020 01:51 PM          Msg. 14 of 14
"STC" is the API command. You connect to the History port (9100) and send "STC", followed by "/n/r" as you would any other command. The response will be a list like this:

1,REGULAR,Normal Trade,
2,ACQ,Acquisition,
3,CASHM,Cash Only Market,
4,BUNCHED,Bunched Trade,
5,AVGPRI,Average Price Trade,
..etc...
153,LATE,LSE - Late trade,
154,STRAT,LSE - Strategy vs. Strategy Trade trade,
155,INDICATIVE_AUCT,LSE - Indicative Auction Uncrossing Data,

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist
 

 

Time: Sun August 14, 2022 7:41 AM CFBB v1.2.0 47 ms.
© AderSoftware 2002-2003