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)

"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"Thank God for your Data Feed as the only Zippers I see are on my pants (LOL), and no more 200 pip spikes to mess up charts." - Comment from Spiro via Email
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"You have an excellent feed. Very few spikes for Spot Forex." - 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
Viewing User Profile for: DTN_Gary_Stephen
About Contact
Joined: Jul 3, 2019 11:09 AM
Last Post: Jan 17, 2022 02:52 PM
Last Visit: Jan 17, 2022 04:39 PM
Yahoo IM:
Post Statistics
DTN_Gary_Stephen has contributed to 223 posts out of 20453 total posts (1.09%) in 937 days (0.24 posts per day).

20 Most recent posts:
IQFeed Developer Support » News History Error. Jan 17, 2022 02:52 PM (Total replies: 4)

So two different times? 12:00 on the 16th and 06:00 on the 15th, both NZL time?

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » News History Error. Jan 17, 2022 07:46 AM (Total replies: 4)


The past weekend, what time(s) of day did this error? Was it just at 6 a.m. on Saturday, or at any other times?

We are investigating now, and it would be helpful to know what times and days you encountered the error.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » how many number of connections are supported Jan 10, 2022 10:50 AM (Total replies: 1)

First, are we talking about the number of connections to the iqfeed server, or are you talking about the number of socket connections you can make from one server connection?

Your login ID can make multiple connections to the iqfeed API server, but they must all be from the same machine. If login ID 123456 is connected to the server, and you try to connect it from another computer, the first connection will be severed. It is possible to make one server connection, and then open many different socket connections using it.

It's not clear from your initial message which of these you're trying to do. But in general, both types of multiple connections are allowed, within the limitations that I've previously given. We don't have an upper limit on the number of connections you can have. But the "Maximum Symbols" limit for the number of symbols you can watch (typically 1300 total), and rate-limiting for historical look up requests (50 per second), are per login ID, not per connection. So having two different server or socket connections using the same login ID will not let you request 100 historical lookups.

We don't really recommend a specific number of connections to have; do whatever works best for your app and environment. Having one connection per symbol is probably a little excessive. But many users will split a workload among multiple connections, like having 10 connections and watching 50 symbols on each.

I hope this information is helpful!

Gary Stephen
DTN IQFeed Implementation Support Specialist

If there is, it would be in the trade conditions. These trade conditions codes are each a type of spread trade.

39,SPRD,Spread - Trade in Two Options in the Same Class (a buy and a sell in the same class),
98,SPD_RPT,Spread Reporting,
141,SPRD_LEG,CME spread leg trade,

Remember that the tick record will show Trade correction codes in hexadecimal form. So 39, 98, and 141 will appear in the tick as 27, 62, and 8D respectively.

Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Jan 10, 2022 at 09:37 AM

IQFeed Developer Support » Full options chain command? Jan 3, 2022 01:51 PM (Total replies: 4)

Quote: Currently with IQ Feed I think you have to query the whole chain, then iterate over it, subscribing and unsubscribing to each symbol. Right?

What you can do is request one of the market summary reports. There are three different reports which will give you two different sets of data, for all symbols of a certain type on a certain exchange. You can't limit it to just one root symbol, but you can get a comprehensive report and then pick out the symbols you want. This is a lot faster and more efficient than the process you described it.

5MS, (symbol type), (exchange ID)
EDS, (symbol type), (exchange ID), (date in YYYYMMDD format)

Symbol,Exchange,Type,Last,TradeSize,TradedMarket,TradeDate,TradeTime, Open,High,Low,Close,Bid,BidMarket,BidSize,Ask,AskMarket,AskSize,Volume, PDayVolume,UpVolume,DownVolume,NeutralVolume,TradeCount,UpTrades, DownTrades,NeutralTrades,VWAP,MutualDiv,SevenDayYield,OpenInterest, Settlement,SettlementDate,ExpirationDate,Strike

5MS Is a 5-minute report, while EDS is an end-of-day report. So pick the one that matches the scope you want. There is also an end of day fundamental data report:

FDS, (symbol type), (exchange ID), (date in YYYYMMDD format)

Symbol,Description,PeRatio,AvgVolume,DivYield,DivAmount,DivRate,PayDate, ExDivDate,CurrentEps,EstEps,SIC,Precision,Display,GrowthPercent,FiscalYearEnd, Volatility,ListedMarket,MaturityDate,OptionRoots,CouponRate,InstitutionalPercent, YearEndClose,Beta,LEAPs,WRAPs,Assets,Liabilities,BalanceSheetDate, LongTermDebt,CommonSharesOutstanding,MarketCap,52WeekHigh, 52WeekHighDate,52WeekLow,52WeekLowDate,CalHigh,CalHighDate,CalLow, CalLowDate,Expiration,LastSplit,LastSplitDate,PrevSplit,PrevSplitDate,NAICS,ShortInterest

I believe all the fields you asked about will be in one of those two reports.

The commands SST and SLM, respectively, will give you a list of all the symbol types and exchange ideas you would want to use. The exchange ID, make sure you use the Group ID, Not the number of the beginning of the line:

1,NGM,Nasdaq Global Market,5,NASDAQ,

For NGM you would use 5, because it's a part of the NASDAQ group of exchanges.

You can also get the symbol type and exchange codes from a specific symbol via the SBF command (note reversed order):

QQQ2216I383,14,2,QQQ SEP 2022 C 383.00,

I hope that helps with your performance. Let me know if this does not answer your question or if you have any other questions on this!

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Realtime feed delayed Dec 2, 2021 04:52 PM (Total replies: 4)

IQFeed has lots of users in Europe and around the world, and we're not aware of any widespread issues associated with any geographic areas.

And are you saying the delay went instantly from nothing to 4 minutes? What time did this happen? I can look further on our end.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Realtime feed delayed Dec 2, 2021 11:15 AM (Total replies: 4)

The "KB Queued" statistic you see in Diagnostics/Client Stats tab measures queueing that happens on the client only. This is data that has already been processed on the IQFeed servers, and is on your local machine, but IQFeed is unable to send to your app. This happens because your app is not reading data fast enough from the feed.

What we're seeing in your case is queueing on the server end. Meaning, the queueing is occurring before the data reaches your machine. This queue will not show up in that KB Queued statistic. When this happens, it suggests possible network degradation between you and our servers, which effectively reduces your available bandwidth. We aren't seeing this delay with other users, and we're aware of any delays in data coming from EUREX, so it is probably unique to your connection.

The best thing you can do is disconnect/reconnect from the IQFeed server, or possibly reboot your machine, and see if you can get a better route to the IQFeed server. That should help alleviate the delay.

Gary Stephen
DTN IQFeed Implementation Support Specialist

The .MDMP file should be in the same folder as the .TXT file in your original post..

It may also be helpful to retrieve the IQConnectlog.txt file. To do this, open the Diagnostics app, and go to the Logging tab. Turn on "all errors" and "debug." The file will be called IQConnectlog.txt and will be saved in the folder listed on that dialog, which is probably .wine/drive_c\Users\[Windows Username]\Documents, in the typical Wine hierarchy.

You may send any logfiles to the support or developer support address and we will review it.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Historical Futures Data Nov 19, 2021 05:05 PM (Total replies: 5)

You can go to ftp:\\ and go to the beta folder. This contains a file called IEOPTIONS.ZIP which is a collection of all historical options symbols, which have been traded at least once. If you enter any of those options symbols into a historical request, you can get interval data for them.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » API questions Nov 9, 2021 01:36 PM (Total replies: 2)

Quote: Does iqfeed listen on all IP addresses or only on the localhost

You would have to make the socket connection to This address is not customizable.

Quote: My trading systems runs on Linux. I don't want to use wine. Can I run iqfeed on a separate machine (under Windows) and connect to its sockets over the LAN?

The IQFeed license agreement has a clause that "data must be received and consumed on the same machine." Make sure your setup wouldn't violate that.

On a side note, we recommend the use of the third-party product Crossover (by Codeweavers) for using IQFeed in a Linux/Mac machines. A free trial is available from, and we will subsidize the cost of this software if it meets your needs.

Quote: In case something bad happens (iqfeed crashes, network disconnects), is it possible to recover the tick-by-tick stream using historical data during the trading hours?

Yes, you can request tick history at any time. And you can request it for any window of time you wish. (Caveat: during trading hours you can only request tick history from the last 8 days.)

Also, IQFeed has a "queueing" mechanism which helps protect you from losing data in situations like you describe.

Quote: Does iqfeed provide some unique tick identifier?

Yes, there is a field called TickID. These IDs aren't exactly unique, because some exchanges send ticks in "bundles" which will have the same TickID. But the TickID, combined with the timestamp, should be adequate for determining whether or not a tick is a duplicate or one you already have.

I hope this information helps! Let me know if you have any other questions.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Possible problem under Wine? Nov 9, 2021 09:20 AM (Total replies: 3)

There are a lot of different factors to discuss here.

First, the protocol you set in an S,SET PROTOCOL command should make no difference. Do you mean the version number of the iqfeed client software? That could be a factor, because version 6.2 is 64-bit, while prior versions were 32-bit. Detais like Windows registry keys (which are simulated under Wine) work differently behind the scenes, and this could cause problems. Especially if you upgraded from 6.1 to 6.2 as opposed to installing 6.2 freshly.

There is no "recommended" way to start IQ connect under Wine, because I've found that it can differ in different setups. In a Windows environment, it doesn't matter what order you do things in. When attempting to run IQFeed under Wine, sometimes it does matter. This just means that you must start IQFeed first; must launch it manually instead of using your third-party app's "launch my feed" feature to launch it, and so forth. And even this isn't consistent. My best advice is to find which order works best, and always perform tasks in that order each time.

"IQFeed still thinks it's connected to a client" shouldn't be a problem, because IQfeed allows multiple connections at the same time to the same computer. So even if that were happening, IQFeed wouldn't prevent you from doing anything. I would need more information to comment further. An iqconnect log file would help.

Finally, DTN recommends the third-party product CrossOver by Codeweavers, for our customers who want to run or develop IQFeed under Linux or Mac environments. It's inexpensive, easy to work with, doesn't require a lot of technical knowledge, and runs IQFeed successfully. They offer free trials at And if you decide to purchase it, DTN will even reimburse you for the cost of their software. Depending on the nature of your project, it may be an option for you to consider.

That's everything I can think of to tell you. If you can provide an iqconnect log file via the usual support channels, I may be able to give more specific advice.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Data providers in API Nov 8, 2021 10:24 AM (Total replies: 2)

EURUSD.FXCM is probably the symbol you want.

I say "probably" because FXCM is the data provider that the "Forex - Basic" data subscription includes. If you have the "Forex - Premium" data package, this will include the Tenfore providers. which have their own contributor codes like .ABBA, .BNPF, etc. See for a list of how these codes work.

If you built the indicator yourself in NinjaTrader, you should get the same results outside of it as long as you use the same symbol (include the same .FXCM contributor code) and the same other factors. Beyond that, I'd need to look at the indicator more closely to try and suss out the difference.

Gary Stephen
DTN IQFeed Implementation Support Specialist

First, the BW command will always have the label at the end. This means that the bar called 9:00 represents 8:59 to 9:00, not 9:00 to 9:01. Third-party software, and even the historical lookup commands within the IQFeed API, let you customize whether you want the label at the beginning or end.

If NinjaTrader is showing more frequent ticks than IQFeed is, this may be because NinjaTrader is including things that aren't included in the IQFeed interval bars calculation. This can be either (a) non-last-eligible trades, which are ignored in a bar calculation because they cannot set a high/low/open/close, or (b) bid/ask updates only, which can be ignored in Level 1 watches. (Extended/FormT trades are not ignored, so that BW can continue to create bars for after-hours trading).

On a lesser note, it is possible for streaming interval bars to be updated. If a trade correction occurs (because a tick was initially reported incorrectly), then the interval bar it effects will re-calculated to reflect the changed totals. This will appear as a message starting with BU. This is pretty infrequent, though.

I hope this information helps. Beyond that, I'd need to know more of the mismatched details.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Question regarding streaming Oct 8, 2021 08:01 AM (Total replies: 3)

If a trade does not occur during a bar, IQFeed API will always omit that bar. There isn't an option to force it to send "placeholder bars" or anything like that. This is just the way IQFeed data works.

Gary Stephen
DTN IQFeed Implementation Support Specialist

Yes, "send failed to clilent" means it failed to send to your application, not to IQConnect.exe itself.

There isn't any documentation that further explains the IQConnectLog.txt file, but most of it is straightforward. The important thing is to turn on the right details for the kind of problem you are trying to solve. On the Logging tab of the Diagnostics app, you can select a combation of Level 1, Level 2, and Lookup information as appropriate to what process(es) you want to make a log of. Within each of those groups, "Requests" will log your requests to the API; "Data" will log the API's responses. These will appear in "FROM CLIENT" or "TO CLIENT" messages, respectively. Like this:

FROM CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 HIT,QNG#C,60,20201223 105200,20201223 235959,,,,1

This is a historical API lookup command sent by the user. A response would look like:

TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 2020-12-23 10:53:00,2.698,2.695,2.695,2.695,36869,34,
2020-12-23 10:54:00,2.698,2.696,2.696,2.698,36944,46,
2020-12-23 10:55:00,2.699,2.694,2.698,2.694,37273,87,
TO CLIENT LookupRequest 6312 16 2020-12-23 17:42:50 !ENDMSG!,
TO CLIENT LookupData 6312 16 2020-12-23 17:42:50 !ENDMSG!,

This is good for troubleshooting situations where you are getting unexpected results.

"Error" will include any error messages, and it's advisable to include that if you are troubleshooting.

Searching the log file for "error" will turn up any errors that IQFeed detected. A typical one is:

TO CLIENT LookupError 3896 32 2020-12-23 17:54:07 E,Socket Error: 10038 (WSAENOTSOCK).,

The page lists all these socket error codes and what they mean. "WSAENOTSOCK" is a common one that means "a socket operation was attempted on something that is not a socket." Which in turn means that the socket wasn't active or wasn't initialized correctly.

"Debug" usually isn't necessary for troubleshooting purposes, unless directed by support. "System" includes internal system messages, which are often helpful but very detailed.

You don't want to log everything willy-nilly, because the file can become very large, and it can consume system resources. It is wise to only enable logging when you are tracking a problem. IQFeed support can also advise you on which elements to include, and can review a log for you.

I hope this is helpful! Let me know if you have any other questions!

Gary Stephen
DTN IQFeed Implementation Support Specialist


An FDS report for the commodity type/exchange you are interested in will include, among other things, an explicit expiration date. To use the example you gave:

GLD2127H185 is an IEOPTION (symbol type 2) on the OPRA exhange (exchange code 14). So you can send this command:

A2115J100,"A OCT 2021 C 100.00",,,,,,,,,,,4,12,,,,14,,,,,,,,,,,,,,,,,,,,,,,20211015,,,,,,
A2115J105,"A OCT 2021 C 105.00",,,,,,,,,,,4,12,,,,14,,,,,,,,,,,,,,,,,,,,,,,20211015,,,,,,
A2115J110,"A OCT 2021 C 110.00",,,,,,,,,,,4,12,,,,14,,,,,,,,,,,,,,,,,,,,,,,20211015,,,,,,
(many symbols skipped)
AA2119W40,"AA NOV 2021 P 40.00",,,,,,,,,,,4,12,,,,14,,,,,,,,,,,,,,,9.9,20210719,2.4,20210830,,,,,20211119,,,,,,
(many symbols skipped)
GLD2127H185,"GLD AUG 2021 C 185.00",,,,,,,,,,,4,12,,,,14,,,,,,,,,,,,,,,0.39,20210715,0.01,20210824,,,,,20210827,,,,,,
(many symbols skipped)

You can see the expiration date near the end of each records, as well as other datapoints you may be interested in. You can use the Lookup commands SLM and SST to get the lists of market and symbol type codes you need. SBF,s,(symbol) will tell you the market and symbol type for a symbol. The FCS report can be run back until about May 2018.

I hope this helps!

Gary Stephen
DTN IQFeed Implementation Support Specialist

That is a classic "queueing" situation.

Error 10035 is socket error WSAEWOULDBLOCK, which basically means that the port is blocked when nothing is instructed to block it. This happens whenever the socket receive block is full, and IQFeed cannot send any more data to it. When this happens, IQFeed will hold onto the data and keep trying to re-send it, until it is able to do so, or until there is such a backlog of data that the IQConnect.exe app crashes.

The message "First 256 bytes of data H_0000000000,2021-06-14 04:09:00,16.300,16.250,16.250,16.250,3015,97,0," is what IQFeed was trying to send at the time.

So to answer your question, yes, IQFeed will hold onto any missed data and re-send it as long as it is able to do so. To minimize this, we recommend the following best practices, in no particular oder:

  • Use multi-threading. There should be different threads in your app to receive the data, parse it, and then act on it.

  • Make messages as efficient as possible. Use the SELECT UPDATE FIELDS command on Level 1 to get only the fields you need. Use tSYMBOL instead of wSYMBOL if you don't need bid/ask updates.

  • Having multiple simultaneous connections to IQFeed can help.

  • Increasing the size of the socket receive buffer can help.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Framing update messages by 5 min candles Aug 25, 2021 03:14 PM (Total replies: 7)

Hello Askrali, I have answers for your questions:

Quote: what time stamp should be used?
Most recent time or time stamp in T messages?

The "T" messages are provided by the IQFeed server. The timestamps messages within each tick are provided by the change, and they reflect the time the tick actually happened. For example:

T,20210825 10:49:43

These ticks occurred at 10:49:42.839858, but were not sent out as API messages until after the local server time was 10:49:43. Ticks take some time to travel through the internet, and the synchronization may not be exact.

You probably want to use the timestamps in the tick messages, because these reflect the actual time the tick occurred.

Quote: To form 5 min candles from update message

By the way, yhe IQFeed API has a command that will build 5-minute intervals for you. You can connect to port 9400 and send a command like:

BW,TSLA,300,20210825 090000

300 is the number of seconds in the bar, so 5 minutes. This will give you historical bars as far back as you specify, and will built live ones for you. The response will be like:

BH,TSLA,2021-08-25 09:05:00,706.9800,707.2000,706.9800,707.2000,75526,1792,0,
BH,TSLA,2021-08-25 09:10:00,707.0100,707.5000,707.0100,707.0500,78801,1480,0,
BH,TSLA,2021-08-25 09:15:00,707.1500,707.5100,707.1500,707.2500,83120,2551,0,
BC,TSLA,2021-08-25 11:25:00,709.8100,710.3944,709.2500,709.9600,5425296,41704,,
BC,TSLA,2021-08-25 11:30:00,709.9900,710.7500,709.7500,710.5000,5487078,38044,,

"BH" means the message was built from historical data, while "BC" means the message was built from live data. "BU" means a past bar has been updated.

Quote: To create the timeframes, would it be good to use local time in EST time-zone?

All IQFeed timestamps for all exchanges use the US Eastern time zone. This includes exchanges that are not based in that time zone.

Quote: But there are fields “Last” and “Most Recent Trade” for price.
Which one can be used as a close price?

The difference between the "Last" and "Most Recent Trade" fields is this: "Last" includes only "last-eligible" trades. This means trades for more than 100 units. Such trades are allowed to set a high, low, open, or close.

"Most Recent" includes non-eligible trades. They may be for less than 100 units. Such trades cannot set an official high, low, open, or close. If the current High is $8.00 and I buy 99 units for $8.01, the High does not change to $8.01.

You can whichever of the two you want, just understand the difference. If your close price you calculate must match the offical close price, then use Last. If you want to calculate your own close price, and you want it to include all trades, use Most Recent. By the way, these are two different fields in Level 1 and you can watch both of them.

Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Aug 25, 2021 at 04:43 PM

IQFeed Developer Support » Number of subscibed symbols Aug 5, 2021 08:40 AM (Total replies: 4)

You could also send the command S,REQUEST WATCHES to the Level 1 port. This will give you a list of all symbols you are currently watching, in this format:


This command doesn't tell you the total number of watches, but it tells you each symbol and you can determine the total count from that. Another advantage of this approach is that you can request it on the Level 1 port, and don't need to connect to the Admin port if you're not otherwise using it.

Gary Stephen
DTN IQFeed Implementation Support Specialist

IQFeed Developer Support » Number of subscibed symbols Aug 4, 2021 10:29 AM (Total replies: 4)

You regularly follow 26 symbols, and about once a year, you only receive Level 1 data for 16 of them? That is strange. I have never heard of behavior like this. My best guess is that some of the watch commands didn't get sent properly. It is also possible for a symbol not to have any trades in a day, but having that happen to 10 symbols one day a year seems extremely unlikely.

There is a way to know how many symbols you are following. If you connect to port 9300 (the admin port), you can request client stats. This will give you messages like:

S,CLIENTSTATS,1,5,putty.exe,20210804 085658,6,0,0.58,47746.46,0.00,

The 6 is the number of symbols I'm currently following. If you have multiple connections working, each will have its own S,CLIENTSTATS record every second. This information is used to build the Feed Stats screen in IQFeed.

The bottom of page lists what each item in the message means. Remember to send S,SET PROTOCOL to port 9300 as you normally would, to get the current version of the message.

Gary Stephen
DTN IQFeed Implementation Support Specialist

Time: Mon January 24, 2022 4:08 PM CFBB v1.2.0 0 ms.
© AderSoftware 2002-2003