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)




"This is an excellent value, the system is generous (allowing for 500 stocks) and stable (and really is tick-by-tick), and the support is fantastic." - Comment from Shirin via Email
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"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
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"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
"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 was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. 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
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
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 »Streaming / Derivative data not working
Author Topic: Streaming / Derivative data not working (6 messages, Page 1 of 1)

opttrade
-Interested User-
Posts: 25
Joined: Nov 7, 2016


Posted: Oct 21, 2018 09:45 AM          Msg. 1 of 6
Hi,
I try to build realtime charts for stocks, but the derivative data are not working as expected.

Sample:
BW,AAPL,3600,,5,100,,,,s,,0

this gives back hourly bars as expected.

But I try to get daily bars showing the last bar in realtime. I use 86400 seconds for a day (as written in documentation)
BW,AAPL,86400,,5,100,,,,s,,0

result:
E,INVALID PARAMETERS FOR BW REQUEST

It seems, that the largest possible interval is 2 hours (7200 seconds).
It's also not possible to create a derivative request for 3 (10800) or 4 hours (14400).

Is there a bug in documentation, a bug in the client (6.0.0.5), a limit for interval or do I completly missunderstand something?

The requests can easily be reproduced with the sample client.

br
Erich

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

IQML - IQFeed-MATLAB connector


Posted: Oct 21, 2018 01:09 PM          Msg. 2 of 6
I see the same buggy behavior as you do. This query used to work well until recently. In fact, it was just a month ago that the documentation was modified to reflect that "Second interval values must be 1 or greater and less than 1 day (86400)".

Note: I am not a DTN employee; my post reflects my personal opinion and not necessarily DTN's

- Yair
IQML - IQFeed-Matlab connector
https://UndocumentedMatlab.com/IQML

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


Posted: Oct 22, 2018 02:20 PM          Msg. 3 of 6
I have confirmed that these extra limits are on the streaming bars implementation.

The limits that were updated recently apply to Historical data requests but streaming bars adds the extra limitation on time series bars where the only valid interval values are:

All valid values < 300 (5min).
All values between 300 and 3600 must be divisible by 60 (so only multiples of 1-minute bars).
Only 3600 (1hr) or two hour (7200) bars.

I'll get the documentation updated to reflect this for now and discuss with our server/product people about the necessity of these extra limits for the future.

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


Posted: Oct 23, 2018 02:09 PM          Msg. 4 of 6
Hello, I have updated the documentation to correctly note the limitations in the code (as detailed in my above post).

Unfortunately, the Streaming Bars functionality cannot be used to create daily bars. The custom Interval bar historical data (even without streaming bars) is limited to less than 1 day as the maximum interval. We have a daily historical bar lookup to service that purpose (just not available on the streaming bar port).

altmany, you mentioned in your post that a request used to work better until recently. Can you clarify what specific change you are referring to? As far as I can tell, this code hasn't changed since it was introduced. The documentation update that you noticed recently did not change behavior but was simply an (failed) attempt to document the existing behavior.

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

IQML - IQFeed-MATLAB connector


Posted: Oct 24, 2018 01:07 AM          Msg. 5 of 6
Steve - I believe that I got confused with the historic interval bars mechanism, i.e. apparently I used larger interval sizes only with historic bars, but smaller sizes with live bars. Since the documentation of historic and streaming bars was exactly the same, I naturally assumed that they use the same back-end processing mechanism, and so they got merged in my mind into a single mechanism.

I understand the limitation on a streaming daily bar, but I suggest that you remove the restrictions on smaller interval sizes, so that (for example) it would be possible to request streaming bars of 1.5, 3, 4 or 5 hours.

Separately, it would be very useful if you could improve the reported error message, which currently simply states "INVALID PARAMETERS FOR BW REQUEST". It is sometimes hard to understand which parameter caused a query rejection. It would be helpful to know which parameter is at fault ("Invalid parameter IntervalSize for BW request"), and even better to know the reason ("Invalid parameter IntervalSize for BW request: must be <300, or 300-3600 in multiples of 60, or 7200"). This suggestion applies to many other query types as well, which return a generic rejection error message.

Note: I am not a DTN employee; my post reflects my personal opinion and not necessarily DTN's

- Yair
IQML - IQFeed-Matlab connector
https://UndocumentedMatlab.com/IQML

opttrade
-Interested User-
Posts: 25
Joined: Nov 7, 2016


Posted: Oct 24, 2018 01:49 AM          Msg. 6 of 6
Steve,
many thanks for clarifying and updateing the documentation.
No good news to hear that daily streaming bars are not available "out of the box". I've to build daily charts reflecting the RTH (0930-16:00) only. So building the volume of the latest bar is a little bit tricky and will result in additional work on my side. I have to aggregate eg hourly derivative bars to the latest daily "streaming" bar by myself...

Many thanks for your support!
Erich
 

 

Time: Wed April 24, 2024 5:41 PM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003