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)




"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"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
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"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
"You have an excellent product !!!!!!" - Comment from Arely
"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
"Previously I was using *******. IQFeed is WAY more economical, and for my charting needs is just as good, if not better." - Comment from Public Forum Post
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
Home  Search  Register  Login  Blogs Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTN_IQFeed on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »IQFeed Developer »IQFeed Developer Support »Consuming IQFeed APIs via C++ on Linux
Author Topic: Consuming IQFeed APIs via C++ on Linux (9 messages, Page 1 of 1)

Jaro1337
-Interested User-
Posts: 4
Joined: Aug 2, 2018


Posted: Aug 2, 2018 09:51 AM          Msg. 1 of 9
Hi,

There are very few posts here about anything Linux related and I haven't seen anything relating specifically to using C++ under Linux to consume the IQFeed APIs.

The sample C++ code that can be downloaded from http://www.iqfeed.net/dev/api.cfm is for Windows (plus I actually had to install MFC support and Windows XP support to my Visual Studio 2017). The page doesn't mention anything about target operating systems but I guess that Windows is silently assumed.

I have seen one other thread where someone mentioned that people use WINE to run the Windows IQFeed binary on Linux. That doesn't seem to be ideal. Does anyone have a better solution?

Thanks

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


Posted: Aug 2, 2018 09:57 AM          Msg. 2 of 9
Not sure what other users have done, but yes, the only way I have seen to run our application on Linux is with a Wine solution, but if anyone has another I would be happy to hear it as well.

Tim

taa_dtn
-DTN Evangelist-
Posts: 117
Joined: May 7, 2004


Posted: Aug 13, 2018 11:14 AM          Msg. 3 of 9
Apologies for the late reply; I've been on vacation.

I've been running IQFeed with Wine on Linux for years. Only once (back in 2015) have I had a significant problem, and Tim worked closely with me to solve it.

Jaro1337
-Interested User-
Posts: 4
Joined: Aug 2, 2018


Posted: Nov 12, 2018 02:49 AM          Msg. 4 of 9
Hi @taa_dtn,

I have finally got to play around with IQFeed on my headless Linux box through Wine. I am able to start it, connect to it and get some messages back (like the periodic timestamps). However, I am having the following problem:

After disconnecting my client, I get (within a couple of seconds) an error that says: "err:winediag: IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions." and the IQFeed client terminates. I was thinking about running the process as a superuser (i.e. instead of "wine iqconnect.exe ..." as "sudo wine iqconnect.exe ...") but I have seen people saying that calline wine as a superuser messes up the file permissions so I don't want to do that. Do you remember dealing with this issue?

Thanks
Jaroslav
Edited by Jaro1337 on Nov 12, 2018 at 03:02 AM

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


Posted: Nov 12, 2018 06:49 AM          Msg. 5 of 9
This sounds like the intended behavior of the feed. The client app on your machine is designed to disconnect and shut down if it isn't in use and it does an ICMP ping to the servers as part of it's shutdown process. As a result, the ICMP failure error message isn't the cause of the shutdown.

If you want to keep the app running, you have to maintain a connection to it.

Jaro1337
-Interested User-
Posts: 4
Joined: Aug 2, 2018


Posted: Nov 12, 2018 11:11 AM          Msg. 6 of 9
Oh, OK, I wasn't aware of that. Thanks for the explanation!
J.

taa_dtn
-DTN Evangelist-
Posts: 117
Joined: May 7, 2004


Posted: Nov 12, 2018 11:51 AM          Msg. 7 of 9
I haven't captured the Wine log file in a while, so at the moment I can't check for that. I've enabled logging to see if it crops up when my app exits later today.

That said, I expect Steve is right and this is just a consequence of the normal shutdown procedure when there are no clients.

I run my client with regular user privileges; there's no need to run as root.

taa_dtn
-DTN Evangelist-
Posts: 117
Joined: May 7, 2004


Posted: Nov 13, 2018 03:13 PM          Msg. 8 of 9
Not able to reproduce here. The shutdown procedure for my app must differ from yours.

Jaro1337
-Interested User-
Posts: 4
Joined: Aug 2, 2018


Posted: Today @ 01:58 AM          Msg. 9 of 9
Here is a more detailed description of the behavior I am seeing and of the configuration I run.

This is the exact output that I am seeing _without_ ever connecting a client (the difference from having a connecting client is just that the last line appears later along with the termination of the IQFeed client):

 $ IQFEED
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
Xlib: extension "MIT-SHM" missing on display "localhost:10.0".
err:winediag:IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions.


These are the versions of my software:

  • Remote host OS: Debian GNU/Linux 9 (stretch) (with some security hardening)

  • Remote host Wine: wine-1.8.7 (Debian 1.8.7-2)

  • Remote host IQFeed: 6.0.0.5

  • Local host OS: Windows 8.1

  • Local host XServer: Xming 6.9.0.31


Could the problem be caused by the missing "MIT-SHM" extension?
Edited by Jaro1337 on Nov 15, 2018 at 01:58 AM
Edited by Jaro1337 on Nov 15, 2018 at 01:59 AM
 

 

Time: Thu November 15, 2018 7:10 AM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003