jonnyb has contributed to 122 posts out of 21251 total posts
(0.57%) in 4,498 days (0.03 posts per day).
20 Most recent posts:
I inserted this after the ProcessBuilder line and it seems to do the job. Perhaps, it's a slight improvement over simply pausing the thread. Maybe it'll help someone else in the future. Anyway, thanks for offering to look into to it further but not sure it's worthwhile investing more time (of course, that assumes the problem doesn't come back). Thanks again.
Socket sockAdmin = null; int retryCounter = 0, threshold = 15; while (retryCounter < threshold && sockAdmin == null) { try { retryCounter++; // connect to the admin port (9300). sockAdmin = new Socket(InetAddress.getByName("localhost"), 9300); } catch (ConnectException e)//host and port combination not valid { e.printStackTrace(); ThreadUtils.pause(2500); } }
Good morning, Gary.
I've had a chance to play around with this little and nothing gets returned for the netstat call on 9300. Given that and the fact that the issue goes away if I delay a few seconds after starting iqconnect.exe, it seems that the connection is getting refused because there's nothing at 9300 yet (until iqconnect.exe fully loads).
Can that be what's going on? If so, it's very odd that a timing issue would suddenly arise after years of running the same code. Also, the DTN samples are written without a thread delay, so seems unlikely that this behavior would be possible.
Anyhow, I do have a workaround, but I'd really like to understand the behavior of what's happening, if possible. Appreciate any further input. Edited by jonnyb on May 2, 2022 at 08:30 AM
Thank you, Gary! I will work through this on Monday. The odd thing for me is that pausing the thread for a few seconds makes the issue go away...I'll have to be nimble with my command prompts.
Hello,
After using the same code to connect for many years, I'm suddenly having an issue with connecting to the socket admin port (connection refused socket exception). I can resolve the issue by pausing the thread for a few seconds, but I'm curious why this is now necessary. Appreciate any input on what might have changed. Here's the code below with some notes on what's different:
Process process = new ProcessBuilder("iqconnect.exe", "my login stuff").start();
ThreadUtils.pause(5000); //<-------------------------------THIS WAS NOT NECESSARY IN THE PAST
System.out.println("Verifying if IQConnect is connected to the server"); // verify everything is ready to send commands. boolean bConnected = false; // connect to the admin port (9300). Socket sockAdmin = new Socket(InetAddress.getByName("localhost"), 9300);//<---------------------------CONNECTION REFUSED ERROR THROWN AT THIS LINE
BufferedReader bufreadAdmin = new BufferedReader(new InputStreamReader(sockAdmin.getInputStream())); BufferedWriter bufwriteAdmin = new BufferedWriter(new OutputStreamWriter(sockAdmin.getOutputStream())); String strAdminLine = ""; // loop while we are still connected to the admin port or until we are connected while (((strAdminLine = bufreadAdmin.readLine()) != null) && !bConnected) { System.out.println(strAdminLine);
if (strAdminLine.indexOf(",Connected,") > -1) { System.out.println("IQConnect is connected to the server."); bConnected = true; } else if (strAdminLine.indexOf(",Not Connected,") > -1) { System.out.println("IQConnect is Not Connected.\r\nSending connect command."); bufwriteAdmin.write("S,CONNECT\r\n"); bufwriteAdmin.flush(); } }
Mark / Stephen,
Appreciate the follow up here as well as the color as to what happened. That said, I have to echo the earlier sentiment that it would be A LOT more helpful if you guys abandoned chat/phone/email support as necessary to provide status updates early and often when system wide issues occur (an alert email would be ideal but really any sort of status report would be fine). That would go a long way in helping users manage these situations appropriately. Thanks.
I just spoke with Kevin on the technical support chat and was told that updates would be posted on the forum here. I didn't see an existing thread, so thought I would start one (please delete if I missed an existing thread).
Would appreciate updates from the staff on what is going on and when a fix is anticipated. Thank you.
Just following up...if anyone from DTN could let me know one way or the other I'd appreciate it. Thanks.
Thanks Stephen. Just shot you an email.
Any update on this? Thanks.
Hello, is there a an api call that allows access to the benzinga earnings calendar? Any other earnings calendar would be fine too. Thanks.
"We normally send emails for anything that will impact price, but all of these channels are good to have to ensure you are getting the most out of your IQFeed service."
Jay- was there a price increase in the annual API fee? Thanks.
If I update the iqfeed client to 6.0.0.4 and keep all of my existing code running on protocol 5.2 nothing should break, is that correct?
Curious why LabelAtBeginning became the default option for historical interval data? Seems like leaving LabelAtEnd as the default would have been less disruptive and prevented the need for digging through old code to add a field.
I never did get around to this and now I've forgotten how to even begin. Is there an example somewhere showing VBA and historical data pulls? Thanks.
Ok, figured it was trades only but thought I'd check. Thanks Tim.
Is the historical option data for trades or bid/ask?
Apologies and please disregard the above. Looks like you can subscribe to forums as well. Thanks Jay.
Thanks. So, the forum email subscriptions are topic specific only? I don't think that would deliver future price changes (e.g. a new topic posted for the 2019 new year).
Can you please post a link for the account management portal? I'm not getting any price change emails, so I must have something off in there.
(Also, I'm an old dude and stay as far away as possible from twitterbook) Edited by jonnyb on Mar 14, 2018 at 01:36 PM Edited by jonnyb on Mar 14, 2018 at 01:36 PM
Hello,
I've just noticed the addition of "Extended Fundamental Data" to my bill. My understanding is that this is for dividend data. A few questions:
1) Is this historical dividend data or forward looking? If historical, how far back does it go?
2) While on the topic of historical fundamental data, is there a way to pull historical shares outstanding (or market cap) from the API?
3) Is it possible to subscribe to emails to anything posted in the products announcements forum (or wherever price increases are announced)? I feel like I'm always the last to know
Wow, this thread is nearly four years old!?! I'll never understand why splits and divs weren't made available via two new API calls. They're coming soon anyway (presumably) and would allow the whiners (ME) to create daily bars from the intraday data and adjust however they see fit. It would shut some of us up at least!
That's great...didn't realize this was available. Thanks Tim
|