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)




"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
"I just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"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
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"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 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
"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.
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
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 »Can I get pre and after market data?
Author Topic: Can I get pre and after market data? (10 messages, Page 1 of 1)

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 4, 2023 11:10 PM          Msg. 1 of 10
Hello,

I´d like to get pre-market data and after-market data.

I am sending the request as usual but replacing the bgn_time and end_time as well as bgn_flt and end_flt as 00:00:00 and 23:59:59


For example, for 'MU', I request:

HTT,MU,20230331 000000,20230331 235900,,000000,235900,1,H_0000000000,100

Data retrieved only contains market data (9:30:00 to 16:00:00).

Could you please help me sort this out? Thanks in advance

Juan

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Apr 5, 2023 08:23 AM          Msg. 2 of 10
When I send your command, I get ticks from 4 AM to 8 PM. No ticks earlier or later than that seem to exist.

HTT,MU,20230331 000000,20230331 235900,,000000,235900,1,H_0000000000,100
H_0000000000,LH,2023-03-31 04:01:04.723548,63.1800,50,50,63.0600,63.8900,1,O,11,8717,0,31,
H_0000000000,LH,2023-03-31 04:01:06.579007,63.1500,50,100,63.0600,63.8900,2,O,11,8717,0,31,
H_0000000000,LH,2023-03-31 04:01:08.210927,63.1000,4,104,63.0600,63.8900,3,O,11,8717,0,31,
(etc.)
H_0000000000,LH,2023-03-31 19:59:44.795782,60.4500,1,35416476,60.4400,60.4800,29569,O,11,8717,0,31,
H_0000000000,LH,2023-03-31 19:59:44.796732,60.4800,18,35416494,60.4400,60.4800,29570,O,11,8717,0,31,
H_0000000000,LH,2023-03-31 19:59:44.831045,60.4800,2,35416496,60.4400,60.4800,29571,O,11,8717,0,31,
H_0000000000,!ENDMSG!,

I'm not sure why you'd only get 9:30 to 16:00 ticks - there is no "exclude extended trades"-type option that can be set for the command. Are you using protocol 6.2, or an older one?

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 5, 2023 01:37 PM          Msg. 3 of 10
Thanks for your prompt reply! I´m gonna check which protocol I`m using, but I´m sure it´s 6.2

I´ll come back later with the results!

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 5, 2023 02:30 PM          Msg. 4 of 10
Hello Gary,

Thanks for your response. It really helped me sort out what was going on. Since you mentioned that the command was working for you, I started looking at the library I was using for the requests.

I´m using pyqfeed, an open source library that has been unmantained for 10+ years. However, it is very nice since all the code is available.

The library was indeed filtering for trades of type "C" when requesting HTT data. Don´t know the reason why they hardcoded it that way, but I removed the filter and now have all the trades from 4AM to 8PM.

Thanks a lot!

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Apr 5, 2023 03:12 PM          Msg. 5 of 10
That makes sense. "C" ticks can only occur during trading hours, so if the library was removing them, the data would only be from 9:30 to 4.

I'm familiar with pyiqfeed but I didn't know it did that. I'll make a mental note.


Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

Edited by DTN_Gary_Stephen on Apr 5, 2023 at 03:13 PM

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 13, 2023 02:48 PM          Msg. 6 of 10
Hi Gary, sorry for bothering again...

In the extended hours I get now a lot of trades. I could identify from the documentation the following letters...

C - Last Qualified Trade.
E - Extended Trade = Form T trade.
O - Other Trade = Any trade not accounted for by C or E.
S - Settle = Daily settle, only applicable to commodities.

Can you tell me what "Other trades" includes? I was expecting to have mostly E trades outside business hours but I see a lot of Os.


Thanks in advance

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Apr 13, 2023 03:23 PM          Msg. 7 of 10
"Other" trades are anything that is not Last Qualified or Extended. In practice, these are trades for less than 100 units, during regular trading hours.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 16, 2023 09:38 PM          Msg. 8 of 10
Thanks for that!

juanoShutze
-Interested User-
Posts: 6
Joined: Apr 4, 2023


Posted: Apr 16, 2023 10:39 PM          Msg. 9 of 10
Hi Gary,

I have one more question (hopefully last one). I successfully filtered out most of the outliers coming from "Other" and I have only "C" and "E" trades coming in.

However, the person who uses the app tells me that a considerable ammount of ticks are "FINRA entries", and that the API provider should have a method for filtering them. I attach a screenshot of the raw data I get from an HTT request on AAPL for 04/06/2023 where my client identifies in purple, the FINRA entries. Is there any hidden code the API provides that could help me identify them?

I know that the Center and Condition fields could lead me in the right direction, but they are not very self explanatory, nor there is a list of codes to understand.

Anyways, I don't see a clear pattern to filter these trades from the information that is currently being provided by the API. Is there any extra way to query that from IqFeed?

I attach a picture of the rows (green) my client assumes are FINRA. Thanks for any help

Best



File Attached: Screenshot 2023-04-17 003830.png (downloaded 334 times)

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Apr 18, 2023 10:25 AM          Msg. 10 of 10
The center is where the Bid or Ask came from, or where the last trade occurred. I don't think this will be helpful though, unless this is what your user means by "FINRA". FINRA is a governing body, not a market center or a type of trade, so I don't know what they mean by "FINRA trades."

The Trade Conditions field will tell you what condition(s) apply to this trade. The API command STC will list all of them. The trade conditions code in the API messages are in hexadecimal; You will have to convert them to decimal to compare them to the list that STC gives you.

Most of all, it sounds like the field you want is Message Contents. This is one of the fields in the level feed, But it doesn't appear automatically, and you have to use the S, SELECT UPDATE FIELDS command to make it one of the fields that you get. It will include one or more of these codes:

C - Last Qualified Trade.
E - Extended Trade = Form T trade.
O - Other Trade = Any trade not accounted for by C or E.
b - A bid update occurred.
a - An ask update occurred.
o - An Open occurred.
h - A High occurred.
l - A Low occurred.
c - A Close occurred.
s - A Settlement occurred.
v - A volume update occurred.

This is the field you should look to if you want to isolate "last-eligible" trades (the ones that can set high high/low/open/close) from the others. The tick history also has a field for just the trade type.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist
 

 

Time: Fri April 19, 2024 10:48 PM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003