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 you so much - awesome feed, awesome service!" - Comment from Greg via Email
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"If you are serious about your trading I would not rely on IB data for serious daytrading. Took me a while to justify the cost of IQ Feed and in the end, it's just a 2 point stop on ES. Better safe than sorry" - Comment from Public Forum
"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
"I used to have *******, but they are way more money for the same thing. I have had no probs with data from DTN since switching over." - Comment from Public Forum Post
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"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.
"Just a quick one to say I'm very impressed so far :) The documentation for developers is excellent and I've quickly managed to get an app written to do historical downloads. The system is very robust and pretty quick considering the extent of data that's available. The support guys have been very helpful too, in combination with the forums it's been plain sailing so far!" - Comment from Adam
"I started a trial a few weeks back before the market went wild. DTN.IQ didn’t miss anything and beat my other provider. I decided to stay with you because of the great service through all the volatility." - Comment from Mike
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
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 »NEW IQFEED FORUMS »New IQFeed Forum »HIT BeginDate BeginTime and DataDirection works incorrectly
Author Topic: HIT BeginDate BeginTime and DataDirection works incorrectly (7 messages, Page 1 of 1)

aliksend
-Interested User-
Posts: 3
Joined: Jun 12, 2019


Posted: Jun 12, 2019 03:01 PM          Msg. 1 of 7
Hi. I'm trying to get historical data from first symbol's ticks. I make request like
HIT,AMD,60,20000101 000000,,3,,,1,REQ_1

to get data for first three minutes after 2000-01-01 with data direction from oldest to newest, but I get data for last three minutes related to current time in order from oldest to newest.
REQ_1,2019-06-12 15:15:00,32.2250,32.2000,32.2150,32.2150,50016587,51402,
REQ_1,2019-06-12 15:16:00,32.2300,32.2045,32.2100,32.2200,50057054,37465,
REQ_1,2019-06-12 15:17:00,32.2400,32.2000,32.2100,32.2400,50092543,34608,

Is there a bug and you can fix it? Or should I use other command to get time of first tick and then request ticks from this time?

Thank you
Edited by aliksend on Jun 12, 2019 at 03:02 PM
Edited by aliksend on Jun 12, 2019 at 03:03 PM

altmany
-Interested User-
Posts: 73
Joined: Jul 30, 2018

IQML - IQFeed-MATLAB connector


Posted: Jun 12, 2019 03:11 PM          Msg. 2 of 7
The MaxDatapoints parameter has precedence over BeginDate/Time, regardless of DataDirection. For example, if MaxDatapoints=3 (as in your example), we’ll only get the 3 latest ticks (before EndDate/Time), regardless of BeginDate/Time. If you don't want this behavior, leave MaxDatapoints empty.

Perhaps DTN should update the documentation with this important clarification, but it seems to me to be a documentation aspect, not a coding bug.

Yair Altman
IQML - IQFeed-MATLAB connector
https://UndocumentedMatlab.com/IQML

I am not a DTN employee; my post reflects my personal opinion

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


Posted: Jun 12, 2019 03:50 PM          Msg. 3 of 7
Confirming what Yair said here.

The [MaxDatapoints] should be thought of as a "No more than X datapoints" instead of "First X datapoints before/after..." from the API.

Also, the [DataDirection] parameter does not change the result set. It only changes the direction in which the result set is delivered.

As a result, The request HIT,AMD,60,20000101 000000,20190101 235959,3,,,0 is saying "give me all of the data from 20190101 235959 back to 20000101 000000 but no more than 3 datapoints."
Additionally, HIT,AMD,60,20000101 000000,20190101 235959,3,,,1 says give me the same 3 datapoints but deliver them to me oldest to newest.

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


Posted: Jun 12, 2019 03:57 PM          Msg. 4 of 7
Also, as for updating the documentation to be more clear, the next version IQFeed has the dataDirection field described as follows:

DataDirection
  • This determines which order the data is returned to you.
  • '0' (newest to oldest) or '1' (oldest to newest).
  • Note, this does NOT change the data that is returned. The ordering of the data is simply reversed if oldest to newest is selected



I'll look into something to address explaining a bit more about how the result sets are collected.

aliksend
-Interested User-
Posts: 3
Joined: Jun 12, 2019


Posted: Jun 13, 2019 05:29 AM          Msg. 5 of 7
So there is no ability to specify "give me only 3 datapoints from 20000101 000000 to 20190101 000000" that will means that I want receive first three existing datapoints, not last three?
The reason is that I don't want to receive data for every minute from start of symbol's history to get only first three minutes that matters for me. Is there other mechanism to limit results?
Edited by aliksend on Jun 13, 2019 at 05:32 AM

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


Posted: Jun 13, 2019 07:07 AM          Msg. 6 of 7
The only recommendation I could give would be to first request daily (or weekly/monthly) data to find the start of data for the symbol. At that point you could craft an HIT request with an end datetime that reduces the overall amount of data you're having to process.

aliksend
-Interested User-
Posts: 3
Joined: Jun 12, 2019


Posted: Jun 13, 2019 08:31 AM          Msg. 7 of 7
Ok, thank you for your help.
 

 

Time: Fri April 26, 2024 5:40 AM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003