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)




"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"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
"I will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"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
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"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
"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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
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 »Backwards History
Author Topic: Backwards History (15 messages, Page 1 of 1)

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 1, 2007 08:17 PM          Msg. 1 of 15
Hello,

Once and a while when I pull data from the History socket it comes back reversed. My code is EXACTLY the same, this only happens maybe once a week. I've also been having trouble connecting lately, and receive the following error in my log file "Unable to connect to minute history socket". Below is an example of the reversed data - any idea why this is happening?:

1/31/2007 4:01:00 PM,10.63,10.63,10.62,10.62,82646,0,0
1/31/2007 4:00:00 PM,10.63,10.71,10.62,10.62,48431,0,0
1/31/2007 3:59:00 PM,10.7,10.71,10.61,10.63,43117,0,0
1/31/2007 3:58:00 PM,10.72,10.73,10.69,10.71,41740,0,0
1/31/2007 3:57:00 PM,10.73,10.73,10.72,10.73,17004,0,0
1/31/2007 3:56:00 PM,10.73,10.73,10.7,10.72,32659,0,0
1/31/2007 3:55:00 PM,10.75,10.76,10.74,10.74,17700,0,0
1/31/2007 3:54:00 PM,10.77,10.77,10.76,10.76,27548,0,0
1/31/2007 3:53:00 PM,10.76,10.77,10.76,10.77,1328,0,0
1/31/2007 3:52:00 PM,10.76,10.77,10.76,10.76,5786,0,0
1/31/2007 3:51:00 PM,10.76,10.77,10.76,10.77,7049,0,0
1/31/2007 3:50:00 PM,10.7618,10.77,10.7618,10.77,3200,0,0
1/31/2007 3:49:00 PM,10.76,10.77,10.76,10.76,3400,0,0
1/31/2007 3:48:00 PM,10.77,10.77,10.76,10.77,3200,0,0
1/31/2007 3:47:00 PM,10.76,10.77,10.76,10.77,4024,0,0
1/31/2007 3:46:00 PM,10.76,10.77,10.76,10.77,800,0,0
1/31/2007 3:45:00 PM,10.76,10.77,10.76,10.7699,3838,0,0
1/31/2007 3:44:00 PM,10.77,10.77,10.77,10.77,1400,0,0
1/31/2007 3:43:00 PM,10.77,10.77,10.76,10.76,4050,0,0
1/31/2007 3:42:00 PM,10.77,10.77,10.76,10.77,7427,0,0
1/31/2007 3:41:00 PM,10.75,10.77,10.75,10.77,14620,0,0
1/31/2007 3:40:00 PM,10.77,10.77,10.76,10.76,23850,0,0

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


Posted: Feb 2, 2007 09:27 AM          Msg. 2 of 15
With IQFeed you can get data returned in either direction based upon the request.

The older interface returns data in the direction you have indicated. The newer interface returns data in the opossite direction.

I am not sure what would cause your data to be intermixed. We will need more information to track this down.

What version of IQfeed are you using?
How are you making your requests?
What requests are you making?

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 09:33 AM          Msg. 3 of 15
Thanks for your response. I am using Build 865.7 from 12/21/06.

I declare the following:
Public WithEvents hlookup As DTNHISTORYLOOKUPLib.HistoryLookup

Then call:
hlookup.RequestMinuteHistory("AAPL", 1, 1)

Then I process the bar data in this event:
Private Sub hlookup_MinuteCompleted(ByVal lMinutesLoaded As Integer, ByVal aTime As Object, ByVal aOpen As Object, _
ByVal aClose As Object, ByVal aHigh As Object, ByVal aLow As Object, ByVal aVolume As Object, ByVal aIntVolume As Object) Handles hlookup.MinuteCompleted

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


Posted: Feb 2, 2007 02:08 PM          Msg. 4 of 15
Where are you getting the "Build 865.7" from? If you check the properties of IQConnect.exe (and the DTNHistoryLookup.dll) what version does it say there on the version tab? It looks like you are using the beta but I just want to clarify which build. You should see a number such as 4.2.0.x

Can you give me a better Idea about "how" you are makin your requests? Do you run a "batch" of requests very quickly or do you just occasionally make a request?

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 02:14 PM          Msg. 5 of 15
It's version 4.2.0.3.

I have an array of symbols. I loop though each & request the history. I wait until it's done w/one, then pause my app for 200 milliseconds (this seemed to help). Then, I call the next symbol & so on. It's usually about 153 symbols total.

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 02:16 PM          Msg. 6 of 15
It is the Beta version...

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


Posted: Feb 2, 2007 02:23 PM          Msg. 7 of 15
You mentioned this only happens "maybe once a week"....do you run your history requests once a day or several times throughout the day? Do you always request minute history? Does your symbol list change frequently or does it remain fairly constant? Can you provide me a sample symbol list?

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 02:34 PM          Msg. 8 of 15
I run request every day after 4 PM for a certain set of stocks that meet my volume & price criteria. The list doesn't change that often since I'm dealing w/high volume stocks. It's always 1 min...not tick data or anything else.

Here's a sample:

AAUK
ACAS
ADCT
ADSK
ADTN
AFFX
AGIX
AINV
ALGN
ALKS
AMKR
AMLN
AMMD
ANDW
APCC
APOL
APPB
AQNT
ARRS
ATHR
BBBY
BEBE
BIIB
BLUD
BMET
BMRN
BOBJ
CAKE
CBST
CECO
CELL
CHINA
CHKP
CHRS
CIEN
CKFR
COGN
CONR
CORS
CREE
CVTX
CWTR
CYMI
DBRN
DISCA
DISH
DLTR
DPTR
EAGL
ENDP
ENER
ENTG
EPEX
ERIC
EXPD
EXPE
EZPW
FAST
FITB
GLBL
GMKT
GNTX
GRMN
GROW
HANS
HAWK
HBAN
HGSI
HOTT
HYSL
IACI
ILMN
ILSE
IMCL
INFA
ISIL
ISIS
JBHT
JOYG
KOMG
LBTYA
LGND
LINTA
LOGI
MCHP
MDCO
MEDI
MEDX
MENT
MOLX
MPEL
MSCC
NBIX
NDAQ
NFLX
NITE
NKTR
NTES
NTLI
NTRI
NUAN
ONXX
OSIP
OVTI
PAAS
PAYX
PDLI
PEIX
PETM
PLCM
PLXS
PMTC
PPCO
PPDI
PSUN
QSFT
RACK
RNWK
ROST
SBAC
SGMS
SIGM
SIMG
SINA
SIRF
SLAB
SMTC
SNPS
SPSN
STEC
STLD
SVNT
SWFT
SYNA
THQI
TRID
TROW
TTWO
TWTC
URBN
USIH
USPI
VCLK
VPHM
VRSN
VRTX
VSEA
WBSN
WEBX
WFMI
XING
XRAY
YRCW

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 02:36 PM          Msg. 9 of 15
It seems like it happens when I'm having trouble connecting to the history socket....would that push me to a different server where I would get the older reversed data?

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


Posted: Feb 2, 2007 03:21 PM          Msg. 10 of 15
It wouldn't be a different server but it does make sense that the 2 issues would be connected.

This issue would have been introduced in version 4.1.2.0.

Without going into too much detail:
When a request on the older interface fails (for whatever reason), a second request is made behind the scenes using the newer interface to get a valid error message. In the case that you receive the error message, both requests are failing. In the case where you get reversed data, I would guess that the second request is comming back successful and returning data to your app instead of an error message.

This will be fixed in an upcomming version of IQFeed (not the current beta).

For now, if we can resolve whatever is causing the connection issues, the reversed data issue (effectively) goes away automaticly.

Another option would be for you to modify your app to use the newer interface which does not need the 2nd request to the server and would always return the data in the correct order (or an error message upon failure). This option would not fix the issue with your connections.

As far as the connections issue is concerned, can you give me some more information about the timeframes that your requests are being made? Is it always right at 4PM that your start your requests or just sometime after 4PM? What timezone? Would it be possible for you to add some logging to your app to give us an exact timeframe that the errors occur?
Edited by DTN_Steve_S on Feb 2, 2007 at 03:22 PM

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 04:01 PM          Msg. 11 of 15
How can I modify my app to use the newer interface? Is this a different method I need to call? That would be great until the new release comes out....

I really don't have a set time...it's usually anywhere from 5:30 EST to 1 AM EST. Are there certain times I should avoid?

I do have some logging in my app; here are some recent examples (EST Time) (my internet is connected at the time it can't connect to the history server, i can log in to IQFeed just fine..):

1/29/2007 7:56:00 PM Unable to connect to minute history socket

1/29/2007 10:27:54 PM Unable to connect to minute history socket
1/29/2007 11:02:52 PM Unable to connect to minute history socket
1/29/2007 11:55:12 PM Unable to connect to minute history socket
1/29/2007 11:55:13 PM Unable to connect to minute history socket

1/30/2007 5:37:42 PM Unable to connect to minute history socket
1/30/2007 5:38:03 PM Unable to connect to minute history socket

1/30/2007 8:05:16 PM Unable to connect to minute history socket
1/30/2007 8:09:22 PM Unable to connect to minute history socket
1/30/2007 8:09:22 PM Unable to connect to minute history socket

1/31/2007 4:09:13 PM Unable to connect to minute history socket
1/31/2007 4:09:13 PM Unable to connect to minute history socket

1/31/2007 8:50:45 PM Unable to connect to minute history socket

2/1/2007 1:44:09 AM Unable to connect to minute history socket
2/1/2007 1:44:09 AM Unable to connect to minute history socket
2/1/2007 1:44:09 AM Unable to connect to minute history socket

2/1/2007 9:03:06 PM Unable to connect to minute history socket
2/1/2007 9:07:41 PM Unable to connect to minute history socket
2/1/2007 9:11:45 PM Unable to connect to minute history socket

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


Posted: Feb 2, 2007 04:47 PM          Msg. 12 of 15
The methods are the same between the two interfaces. The events differ quite a bit but are explained in the documentation provided in the install (and are probably better suited for explaining via email if you have questions).

The vb HistoryCOM example app that is included with 4.2.0.3 developer install has very well documented examples for both interfaces.

If you have further questions/concerns, feel free to email us at developer support.

Concerning the actual requests, I recommend avoiding times between 12AM (midnight) and 2AM EST because there are currently some known issues with our nightly processes that run at that time causing unexpected results. Other than that, anytime should work well.

This is not going to be an easy issue to track down because there are so many factors that are involved. I will look into this deeper on monday to see if I can find any patterns on our end.

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Feb 2, 2007 04:51 PM          Msg. 13 of 15
So this is the IHistoryLookup2 then? And it will be supported in all future releases?

Thanks for your help....

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


Posted: Feb 2, 2007 04:53 PM          Msg. 14 of 15
Correct

APIer
-Interested User-
Posts: 13
Joined: Feb 1, 2007


Posted: Mar 12, 2007 08:10 PM          Msg. 15 of 15
I have resolved the backwards history issue (I haven't seen it since I re-wrote my code to use the historylookup2)...thanks again for your help.

I am still having issues w/connecting to the History Socket though. This happens almost every time I try to pull history on at least 1 symbol out of 200 or so. There doesn't seem to be a common time or symbol pattern...it appears to be random. I am using the new developer build.

Here's an example from my log today (EST time):

3/12/2007 7:17:11 PM Unable to connect to minute history socket
3/12/2007 7:17:21 PM download failed for BRCM
 

 

Time: Wed October 5, 2022 8:47 PM CFBB v1.2.0 15 ms.
© AderSoftware 2002-2003