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've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"If someone needs the best quality data and backfill beyond what their broker provides at a rate that is the best in the industry, I highly recommend IQFeed." - Comment from Josh via Public Forum
"Excellent datafeed !!!" - Comment from Arely
"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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"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
"I am keeping IQFeed, much better reliabilty than *******. I may refer a few other people in the office to switch as well." - Comment from Don
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"And by the way, have to say this. I love the IQFeed software. It's rock solid and it has a really nice API." - Comment from Thomas via RT Chat
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: Mon May 6, 2024 12:53 AM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003