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 will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"You are much better than lawyers or the phone company because you answer the phone when I call! I just love your customer service." - Comment from Isreal
"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 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
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"I have to tell you though that using the IQFeed API is about the easiest and cleanest I have seen for some time." - Comment from Jim
"This is an excellent value, the system is generous (allowing for 500 stocks) and stable (and really is tick-by-tick), and the support is fantastic." - Comment from Shirin via Email
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: Dec 2, 2021 04:52 PM
Last Visit: Dec 2, 2021 04:52 PM
Website:  
Location:
Occupation:
Interests:
Avatar:
Email: gary.stephen@dtn.com
AIM:
ICQ:
MSN IM:
Yahoo IM:
Post Statistics
DTN_Gary_Stephen has contributed to 219 posts out of 20421 total posts (1.07%) in 888 days (0.25 posts per day).

20 Most recent posts:
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.

Sincerely,
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.

Sincerely,
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.

Sincerely,
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:\\www.dtniq.com 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.

Sincerely,
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 127.0.0.1. 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 codeweavers.com, 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.

Sincerely,
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 https://www.codeweavers.com/crossover. 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.

Sincerely,
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 http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=guide&guide=forex&symbolguide=guide&type=TENFORE 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.

Sincerely,
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.

Sincerely,
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.

Sincerely,
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,
...etc...
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).,
!ENDMSG!,

The page https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2 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!

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



Stargrazer,

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:

FDS,2,14,20210901
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
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)
ZZZ2221M7.5,,,,,,,,,,,,2,12,,,,14,,,,,,,,,,,,,,,,20210830,,20210830,,,,,,,,,,,
!ENDMSG!,

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!

Sincerely,
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.



Sincerely,
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
Q,MSFT,301.7400,10,10:49:42.839858,19,5676548,301.7400,300,301.7600,200,304.3000,304.5900,301.1200,302.6200,ba,87,
Q,MSFT,301.7400,10,10:49:42.839858,19,5676548,301.7400,300,301.7600,100,304.3000,304.5900,301.1200,302.6200,ba,87,

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,
...etc...
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.



Sincerely,
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:

S,WATCHES,@ES#,AAPL,MSFT,TSLA

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.

Sincerely,
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 http://www.iqfeed.net/dev/api/docs/AdminSystemMessages.cfm 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.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


IQFeed Developer Support » 50007,No file available. why ? Aug 2, 2021 03:22 PM (Total replies: 11)

The 5MS report should now display these values correctly. Take a look, and let me know if you still see any issues.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


System Status Announcements » Dow Jones not currently updating Jul 21, 2021 09:57 AM (Total replies: 1)

Dow Jones newswires are updating once again, Our engineers are investigating the matter further.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


System Status Announcements » Dow Jones not currently updating Jul 21, 2021 09:36 AM (Total replies: 1)

DTN is aware of an issue where the Dow Jones data has not updated since about 1:30 AM this morning. Our engineers are working to resolve it now.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Jul 21, 2021 at 09:46 AM

System Status Announcements » Live Online Chat Is Currently Unavailable Jul 21, 2021 09:33 AM (Total replies: 1)

Online chat is now working normally.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist


System Status Announcements » Live Online Chat Is Currently Unavailable Jul 20, 2021 08:40 AM (Total replies: 1)

The online chat for both IQFeed and IQFeed Developers is currently having issues. Support is available via support@iqfeed.net or 1-(800) 779-7299.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist



Time: Mon December 6, 2021 5:01 AM CFBB v1.2.0 15 ms.
© AderSoftware 2002-2003