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)




"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"For anyone considering using DTN.IQ for a data feed, my experience with the quality of data and the tech support has been very positive." - Comment from Public Forum
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"I was on the phone with a friend who uses CQG and right after the Fed announcement, CQG was as much as 30 seconds behind DTN.IQ. Some quotes were off by as much as 15-18 cents. Your feed never missed a beat." - Comment from Roger
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"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
"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 »A complete example to get historical data using TCP/IP
Author Topic: A complete example to get historical data using TCP/IP (3 messages, Page 1 of 1)

gautham
-Interested User-
Posts: 6
Joined: Sep 22, 2004


Posted: Nov 9, 2004 10:45 AM          Msg. 1 of 3
I am having problem downloading historical data using TCP/IP in Visual C++.
I do not see any example of this in the sample files I got from IQFEED.
I need a complete but simple example showing me how exactly to go about doing this
in a console application.

DTN_Natalie_H
-DTN Evangelist-
Posts: 175
Joined: May 10, 2004

DTN Market Access, LLC.


Posted: Nov 9, 2004 02:28 PM          Msg. 2 of 3
You're correct, we currently do not have a C++ example app for getting history data via sockets. For now you could look at the VB app, or maybe another developer has something they could give you. We are working to build a more comphrehensive suite of example apps. Thanks for your patience!

Natalie Hannan DTN Market Access, LLC.

gautham
-Interested User-
Posts: 6
Joined: Sep 22, 2004


Posted: Nov 9, 2004 04:12 PM          Msg. 3 of 3
I found out that it is pretty simple. I was not able to get historical data before because after using registerclientapp function I was using the statement
SOCKET iqSocket;
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons( 9100 );
addr.sin_addr.S_un.S_addr = inet_addr("127.0.0.1");
memset(&addr.sin_zero, 0, sizeof(addr.sin_zero));

connect( iqSocket(struct sockaddr*)&addr,sizeof(addr))
// connect to the server
send( iqSocket,"S,KEY\r\n", 7, 0); // Should NOT be using this statement.

and then doing
char iqCommand[ 15 ];
memset( iqCommand, 0, sizeof( iqCommand ) );
strcpy( iqCommand, "HD,IBM,5;" );

send( iqSocket, iqCommand, static_cast<int>( strlen( iqCommand ) ), 0 );
The statement
send( iqSocket,"S,KEY\r\n", 7, 0);
seems to have somehow not get the historical data. After removing this statement I do get historical data.
 

 

Time: Sun May 5, 2024 1:54 AM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003