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 am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"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.
"Everything is working great with the API. I love it." - Comment from Calvin
"Just a quick one to say I'm very impressed so far :) The documentation for developers is excellent and I've quickly managed to get an app written to do historical downloads. The system is very robust and pretty quick considering the extent of data that's available. The support guys have been very helpful too, in combination with the forums it's been plain sailing so far!" - Comment from Adam
"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 just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"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
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
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: 49
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
-Interested User-
Posts: 73
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
-Interested User-
Posts: 73
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
-Interested User-
Posts: 73
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
-Interested User-
Posts: 73
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
-Interested User-
Posts: 73
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
-Interested User-
Posts: 73
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: Sat May 30, 2020 12:37 PM CFBB v1.2.0 0 ms.
© AderSoftware 2002-2003