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)

"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 am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"I am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"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
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"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
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"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
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 »IQFeed Developer »IQFeed Developer Support »BufferedReader.readLine hangs for history lookup
Author Topic: BufferedReader.readLine hangs for history lookup (3 messages, Page 1 of 1)

-Interested User-
Posts: 5
Joined: Apr 16, 2014

Posted: May 18, 2016 10:29 AM          Msg. 1 of 3
I am trying to get historical tick data using the Java API (IQFeed version 5.2.1). Here is the code snippet:

String command = "HTX,IBM,5,,testid,\r\n\n";
// String line;

while ((line = C_LookupIQFeed_Socket.brBufferedReader.readLine()) != null) {
logger.debug("HistoryRecord={}", line);

It prints the output till the last record ("!ENDMSG!,"), but hangs at the readLine() thereafter i.e. the readLine() is never returning null after the last record. I have tested this on the samples provided, same thing happens. Any idea? Is it possible that the server is not sending a new line after the last message. Is there any other way to handle this?


DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006

Posted: May 18, 2016 12:39 PM          Msg. 2 of 3
Once the ENDMSG is received the data for that request has completed (a null is not sent), Just stop reading the socket at that time, at least until you have requested more data, and I think that will alleviate your issue.


-Interested User-
Posts: 5
Joined: Apr 16, 2014

Posted: May 19, 2016 01:33 PM          Msg. 3 of 3
Thanks Tim.


Time: Mon July 15, 2019 3:15 PM CFBB v1.2.0 31 ms.
© AderSoftware 2002-2003