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)




"Excellent datafeed !!!" - Comment from Arely
"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
"Everything is working great with the API. I love it." - Comment from Calvin
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"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
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
"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
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"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
"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
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 »Archive (2017 and earlier) »IQFeed Developer Support »Data feed not recovering after internet disuption
Author Topic: Data feed not recovering after internet disuption (3 messages, Page 1 of 1)

bludev
-Interested User-
Posts: 16
Joined: Nov 14, 2012


Posted: Nov 14, 2012 10:02 PM          Msg. 1 of 3
Hi,
I am experiencing an issue where IQFeed level 1 data never recovers after an unexpected internet disruption.

My application detects the initial internet outage and properly closes all port connections (admin, level 1, level 2 and history) and then starts regular attempts at reconnection until it succeeds when the internet connection is restored. But then every so often (could be intermittent) although my connection to level 1 (port 5009) is successful, I do not receive any live tick data at all, but somehow I can retrieve historical data (port 9100) without any problem.

I can confirm that this is not a problem within the application code, because of two observations
1. “Seconds since last update” in the feed status steadily increases indicating no level 1 data is being received by IQFeed
2. The IQConnect test in the diagnostics tool fails for level 1 data.

So my questions are:
1. Is this a known bug?
2. If so, are there any immediate plans to release a fix?
3. Seeing as the client application thinks it is “successfully” connected to level 1 port, is there any way of programmatically detecting the fault? (other than detecting ticks which can be a problem if the market is shut and we trade many markets in many time zones with daylight saving, so this approach can get tedious)
4. Assuming there is some way for the application to know when the IQfeed level 1 data is not working, then is there a workaround other than closing IQfeed completely and restarting again?

I am developing in Windows 7 x64 and have had this same experience with both IQFeed version 4.8 and 4.9.

Thank you in advance.
Edited by bludev on Nov 14, 2012 at 10:03 PM

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Nov 15, 2012 08:47 AM          Msg. 2 of 3
Hello, there are no known bugs pertaining to what you describe. However, any scenario where the feed gets into a state where it thinks it is connected to a server while not being connected is certainly not intended.

In order to help identify the source of this, can you expand on your reconnection logic?

You mention that your app closes all local connections to IQFeed. This should cause the feed to shut down and at that point you would need to re-launch the feed to reconnect (in your case, it sounds like you are repeatedly launching the feed). Is that accurate for how you are handling the scenario?

bludev
-Interested User-
Posts: 16
Joined: Nov 14, 2012


Posted: Nov 25, 2012 09:36 PM          Msg. 3 of 3
Hi,

Thanks for your reply and sorry for my late response:

Here is my attempt at a summary overview of how we use IQFeed

To connect we have an AttemptConnection() routine which roughly speaking does the following...

SocketAdmin_.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9300"))
SocketAdmin_.Send("S,REGISTER CLIENT APP,[productid]," & ID)
SocketLevelI _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"5009"))
SocketLevelI_.Send("S,REQUEST STATS")
listening to receive "REGISTER CLIENT APP COMPLETED"
SocketLevelII _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9200"))
SocketHistoricData _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9100"))

The routine is designed such that any failure or time-out at any of the above steps would return false and we try again by repeating the process at some later point. If every line executes normally then the routine return true and we assume that the connection with IQFeed is established normally and tick data must be coming through.

Any exceptions while attempting to Connect, Send, Receive or ListenForData, will trigger a ConnectionClosed() event. This event’s handler includes the following instructions:

SocketAdmin_.Close()
SocketLevelI_.Close()
SocketLevelII_.Close()
SocketHistoricData_.Close()

to clean everything up. At this stage the IQFeed application is NOT closed and the tray icon persists. We then run AttemptConnection() asynchronously in a timed loop until a connection is established.

As I mentioned before, this often works. But sometimes if the cause of the initial disconnect is unexpected internet outage, then AttemptConnection() returns true giving the impression that everything is ok but then no data is received. So I guess one issue to look at is how to programmatically detect the problem in the first place.

Please let me know if you need me to be more specific about any of the above procedures and provide more information.
Edited by DTN_Jay_Froscheiser on Nov 26, 2012 at 07:44 AM
 

 

Time: Sat May 18, 2024 10:02 AM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003