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)




"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"And by the way, have to say this. I love the IQFeed software. It's rock solid and it has a really nice API." - Comment from Thomas via RT Chat
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"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
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"You have an excellent product !!!!!!" - Comment from Arely
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
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: 391
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: 391
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: 391
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 227 times)

DTN_Gary_Stephen
-DTN Guru-
Posts: 391
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: Wed February 21, 2024 8:31 AM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003