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)




"If you are serious about your trading I would not rely on IB data for serious daytrading. Took me a while to justify the cost of IQ Feed and in the end, it's just a 2 point stop on ES. Better safe than sorry" - Comment from Public Forum
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"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.
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"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.
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"After all the anxiety I had with my previous data provider it is a relief not to have to worry about data speed and integrity." - Comment from Eamonn
"Excellent datafeed !!!" - Comment from Arely
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: 55
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 Evangelist-
Posts: 141
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 Evangelist-
Posts: 141
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 Evangelist-
Posts: 141
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 Evangelist-
Posts: 141
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 Evangelist-
Posts: 141
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 Evangelist-
Posts: 141
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: Tue September 29, 2020 9:08 AM CFBB v1.2.0 31 ms.
© AderSoftware 2002-2003