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)




"You have an excellent product !!!!!!" - Comment from Arely
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"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
"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
"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 "bracket trade" all major news releases and I have not found one lag or glitch with DTN.IQ feed. I am very comfortable with their feed under all typical news conditions (Fed releases, employment numbers, etc)." - Comment from Public Forum
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"Boy, probably spent a thousand hours trying to get ******* API to work right. And now two hours to have something running with IQFeed. Hmmm, guess I was pretty stupid to fight rather than switch all this time. And have gotten more customer service from you guys already than total from them… in five years." - Comment from Jim
"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
Viewing User Profile for: DTN_Gary_Stephen
About Contact
Joined: Jul 3, 2019 11:09 AM
Last Post: May 20, 2020 08:08 AM
Last Visit: May 22, 2020 04:27 AM
Website:  
Location:
Occupation:
Interests:
Avatar:
Email: gary.stephen@dtn.com
AIM:
ICQ:
MSN IM:
Yahoo IM:
Post Statistics
DTN_Gary_Stephen has contributed to 72 posts out of 19556 total posts (0.37%) in 328 days (0.22 posts per day).

20 Most recent posts:
IQFeed Developer Support » Equity Tickdata has extreme outliers May 20, 2020 08:08 AM (Total replies: 10)

Yeah, that is unusual. I will have our data team investigate, and will post my findings. ETA: I see that my teammate Steve has already given an explanation below.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on May 20, 2020 at 08:34 AM

IQFeed Developer Support » Trade Aggressor always 0 May 18, 2020 09:09 AM (Total replies: 4)

Actually, let me clarify the above answer.

The API will currently show 0 as the trade aggressor for all trades on equity symbols, because the equity exchanges currently do not return Trade Aggressor data. The IQFeed apps do have a "bid/ask at trade" data point, which is based on whether the bid or ask matches the price of the trade.

For exchanges that do provide trade aggressor data, this will be a 1 for the buyer, 2 for the seller, and 3 for neither.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on May 18, 2020 at 09:40 AM

IQFeed Developer Support » Trade Aggressor always 0 May 18, 2020 08:21 AM (Total replies: 4)

Karthik,

Hello, this is Gary Stephen with DTN IQFeed API Support.

The INTC data looks normal to me. Not every trade has an aggressor, but most do. Can you give me an example of a request you did where there were a large number of zeroes in that field?

By the way, make sure you are sending S,SET PROTOCOL 6.1 if you want to see the trade aggressor. All earlier protocols, including the default 4.9, don't even have the Trade Aggressor field.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » Error on Invalid Login May 7, 2020 03:01 PM (Total replies: 2)

Hello, this is Gary from DTN IQFeed API Support.

You are correct that the S,SET LOGIN and S,SET PASSWORD commands in the Admin port don't validate what you send them. Validation is only done if you try to connect with an S,CONNECT command (or connection is set to happen automatically somehow). There is no explicit message associated with connection or failing to connect, however: the S,STATS message will contain either Connected or Not Connected. You could monitor that field to know if you are connected or not.

I hope this is helpful. Let me know if you have any followup questions on this!

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » Time Stamp Data Type Formatting May 5, 2020 02:40 PM (Total replies: 3)

Mike,

First of all, let's talk about the protocol, because that's important to understand. When connecting to the API, you send an S,SET PROTOCOL command to indicate which version of the syntax you want to use. It's a backwards compatibility feature; whenever DTN upgrades the API, it does so in a new protocol number, so existing code may continue to specify the old protocol until they have fully upgraded to it. The most recent protocol is 6.1, so this is the version you should be requesting, by sending S,SET PROTOCOL 6.1 when you initially connect. See http://www.iqfeed.net/dev/api/docs/IQFeedProtocols.cfm for more details.

There are three interval history commands:

HIX - requests a number of intervals
HID - requests all intervals over a range of days
HIT - requests all intervals over a specified date-time range

Based on the presence of num_bars=100, I suspect it is an HIX request. What actually gets sent to the API is:

HIX,[Symbol],60,100

Which return data in the following format:

2020-05-05 15:11:00,300.9800,300.8000,300.8200,300.9100,27132732,35293,0,
2020-05-05 15:10:00,300.9200,300.7600,300.9050,300.8100,27089316,41483,0,
2020-05-05 15:09:00,300.9600,300.8800,300.9122,300.9047,27038363,37991,0,

Getting back to your original question: the date/time already appears to be in the date format Postgres takes. I'm not familiar with Postgres but you may need to convert it to timestamp form to store it:

https://www.postgresqltutorial.com/postgresql-to_timestamp/

Quote: SELECT TO_TIMESTAMP('2017-03-31 9:30:20','YYYY-MM-DD HH:MI:SS');


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » Time Stamp Data Type Formatting Apr 30, 2020 02:10 PM (Total replies: 3)

Mike,

Exactly what command are you sending to the API? No "minute bars" command should be giving you milliseconds, whether it's a history command like HIT, or a BW derivative data command. A tick request could, though, depending upon protocol. Are you specifying a protocol? If so, which one? Let me know the answers to these two questions., and I can give a more specific answer.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



"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



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


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


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


IQFeed Developer Support » Volume Profile Apr 28, 2020 11:46 AM (Total replies: 1)

It's not an explicit data point, but you could calculate this from the data available. If you have a tick history, like:

Timestamp,Last,Last Size,Total Volume,Bid,Ask,TickID,Basis For Last,Trade Market ID,Trade Conditions,Trade Aggressor,Day
2020-04-28 12:44:42.994659,281.0699,20,15466795,281.0400,281.0700,41554,O,19,87,0,28,
2020-04-28 12:44:42.612113,281.0699,1,15466775,281.0400,281.0700,18416,O,24,87,0,28,
2020-04-28 12:44:42.244402,281.0500,13,15466774,281.0400,281.0700,48319,O,5,87,0,28,
2020-04-28 12:44:42.244360,281.0500,5,15466761,281.0400,281.0700,48318,O,5,87,0,28,
2020-04-28 12:44:42.093158,281.0400,5,15466756,281.0400,281.0700,7694,O,25,87,0,28,
2020-04-28 12:44:42.061564,281.0700,23,15466751,281.0400,281.0700,41553,O,19,87,0,28,
2020-04-28 12:44:42.035009,281.0401,3,15466728,281.0400,281.0700,18415,O,24,87,0,28,

You can group the ticks by time and by price level and execute a formula on it.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



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



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


IQFeed Developer Support » C Today. Apr 20, 2020 12:22 PM (Total replies: 10)

Unfortunately, there's not really a way for us to know what happened after the fact. However, to help track down the problem, there are a few fields you could add to your request going forward, which will be helpful if it happens again:

One field is called Delay. This tells you if the symbol's data is being delayed, for reasons of not being subscribed to the realtime data. This should always be 0 for your symbols, because you appear to have all the necessary subscriptions. If it isn't, let us know right away.

You can also add the Most Recent Trade time field as well along with the Bid/Ask Time fields. This information will help us determine the exact nature of the delay problem.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » C Today. Apr 16, 2020 03:24 PM (Total replies: 10)

Yes, I would be curious to know what other symbols were affected, to see if there's any pattern to it all.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Apr 17, 2020 at 07:01 AM

IQFeed Developer Support » C Today. Apr 16, 2020 08:34 AM (Total replies: 10)

Craig,

I got a reply from our data team. First, there wasn't any problem with the feed that morning, nor any corrections made to the symbol C. It appears your being data was delayed. The times on your chart appear to be 15 minutes behind what our historical data shows for that morning:

Time Last
9:20:00 $47.98
9:25:00 $47.90
9:30:00 $47.51 (9:45 on your chart)
9:35:00 $46.59 (9:50 on your chart)
9:40:00 $46.27 (9:55 on your chart)
9:45:00 $45.76 (10:00 on your chart)
9:50:00 $45.47
9:55:00 $46.05

The same is true if we look at the Bid and Ask:

Time Bid Ask
9:15:00 $47.43 $47.84 (9:30 on your chart)
9:20:00 $47.62 $47.99 (9:35 on your chart)
9:25:00 $47.71 $47.96 (9:40 on your chart)
9:30:00 $47.50 $47.65 (9:45 on your chart)

It's normal for the Bid/Ask gap to be wider before the market actually opens, because these are all non-regular trades, many of which are for small lots.

So why was this data delayed? First, C is an NYSE symbol. Are you subscribed to live data from the NYSE exchange? If you're not sure, double-click the blue IQConnect logo, and then the "Authorizations" dropdown. "NYSE" will be present if you are. (Keep in mind that if you have more than one IQFeed login, each login can have its own subscriptions.)

If you are subscribed to NYSE, were any other symbols delayed in the same way? There are some known causes data feed can be delayed, but generally they would affect all symbols, not just one. And, the delays wouldn't be quite as regular as this.

Let me know the answers to these two and I can investigate further as needed.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » C Today. Apr 15, 2020 04:18 PM (Total replies: 10)

If I'm reading this correctly: Blue is the ask, Red is the bid, and Green is that last, which only starts appearing at 9:45. And C, Citigroup, is the symbol. That chart does vary significantly from the past data that is visible in Time and Sales, which looks pretty normal. There are ticks before 9:45, and the Bid/Ask vary normally. You retrieved this data as it came in via a watch (wC) command, correct? Did you customize the fields at all with an S,SELECT UPDATE FIELDS command?

I'll ask our data team if there were any corrections made to that symbol's data, or problems that morning.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » IQFeed on Linux throws ICMP error Apr 15, 2020 03:26 PM (Total replies: 3)

Are you using Wine to run IQConnect.exe? That type of error is usually a Wine error. Let me know, and we may have you turn on some logging, to see what the program is doing behind the scenes.

Sincerely,
Gary Stephen
DTN IQFeed API Support

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » C Today. Apr 15, 2020 02:25 PM (Total replies: 10)

Craig,

I apologize for not responding to your message until now. That's my fault.

I'm not aware of any data or system issues that happened on Monday morning. If you can provide some examples of the mismatched data, I can investigate what happened. If you wish, feel free to send it to me directly at the developer support email address.

Sincerely,
Gary Stephen
DTN IQFeed API Support


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Steve_S on Apr 15, 2020 at 05:00 PM

General Product Announcements » Good Friday exchange closures. Apr 9, 2020 10:42 AM (Total replies: 0)

All exchanges are closed tomorrow for Good Friday. There are a number of international exchanges that are also closed on Monday. Domestically everything opens normally Sunday evening for trade date of Monday with the exception of Sugar No. 11, Coffee, and Cocoa: Late open, 6:30 a.m.

DTN will be open regular hours.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



Time: Mon May 25, 2020 9:16 PM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003