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 »Archive (2017 and earlier) »IQFeed Developer Support »About L1 level Connection
Author Topic: About L1 level Connection (6 messages, Page 1 of 1)

ChowWei
-Interested User-
Posts: 3
Joined: Nov 28, 2018


Posted: Nov 28, 2018 12:36 AM          Msg. 1 of 6
There are several questions I met when trying to use your api to receive the quote data from LME.
Connection type is Level 1 via TCP/IP, so the questions as the following:

1. As we know, LME opening time is from 1:00AM to 7:00PM, so I ran our application to connect IQFeed Connection Manager at around 00:55AM.
Then I received the connection response "S,SERVER CONNECTED" and sent "w[SYMBOL]<CR><LF>" for watching, every thing was ok. But received
nothing from the Manager after 1:00AM. However, if I close our application then and run it again, do the same things, the data comes. I don't
know why, is there anything wrong, or does it mean I have to connect the Manager after 1:00AM?

2. As Update/Message Summary Format shows, Bid Time/Ask Time/Last Time's resolution is millisecond(eg. HH:MM:SS.ffffff). Actually the the data I got
was like "Q,M.ZN3=LX,2505.00,1,2507.00,2,2507.50,956,11/25/2018,22:54:46,22:54:46" (the dynamic fields I select is "S,SELECT UPDATE FIELDS,Bid,Bid Size,Ask,Ask Size,Last,Number of Trades Today,"
"Last Trade Date,Ask Time,Bid Time\n\r"), the time resolution is just second level. Is that normal?

3. How can I get bid size and ask size from historical data? As Historical via TCP/IP document says, there is only bid price and ask price information in it.

I'm looking forward to hearing from your response.

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


Posted: Nov 29, 2018 06:10 AM          Msg. 2 of 6
Hello, I believe I also replied to some of this via email but I'll answer here as well for future readers.

1. I don't know of anything that should cause this described behavior. Please give me some examples of the exact request/responses you are getting from the feed in both scenarios.
2. This looks like you aren't specifying a protocol for the connection to use. For backwards compatibility reasons, the feed defaults new connections to the oldest supported protocol (4.9) which did not include subsecond timestamps.
3. We only store bid/ask prices (no sizes) information in historical data.

ChowWei
-Interested User-
Posts: 3
Joined: Nov 28, 2018


Posted: Nov 29, 2018 09:24 PM          Msg. 3 of 6
1. Well I already know where the problem is. The socket connection is ok, our application also get the data when opening. But what made me confused was the time received.
For keeping ascending time sequence of every contract, our application will ignore the data of which the time is older than the one last received,
so if the application received a wrong data time at the beginning of opening, the time which is, for example, two days later , the application would accept the data and update
the last received time to two days later, then it will reject all the normal data, cauze the time is older than the last updated. That's why I mistook no data on the connection.

The following is the time I got (GMT+8)
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22549, BidPrice=0, BidSize=0, AskPrice=0, AskSize=0, LastPrice=1370, LastSize=2, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22549, BidPrice=0, BidSize=0, AskPrice=1455, AskSize=10, LastPrice=1370, LastSize=2, msgSeqID=2
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-01 17:40:39.000, OrigSendingTimeInNano=1543657239000000000, SecurityID=22550, BidPrice=0, BidSize=0, AskPrice=0, AskSize=0, LastPrice=1400, LastSize=0, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-01 17:40:39.000, OrigSendingTimeInNano=1543657239000000000, SecurityID=22550, BidPrice=0, BidSize=0, AskPrice=1450, AskSize=10, LastPrice=1400, LastSize=0, msgSeqID=2
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22544, BidPrice=1936, BidSize=12, AskPrice=0, AskSize=0, LastPrice=1937.5, LastSize=5146, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22543, BidPrice=6244.5, BidSize=1, AskPrice=0, AskSize=0, LastPrice=6251.5, LastSize=12183, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22548, BidPrice=1930, BidSize=1, AskPrice=0, AskSize=0, LastPrice=1925, LastSize=2510, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22546, BidPrice=10865, BidSize=1, AskPrice=0, AskSize=0, LastPrice=10865, LastSize=3970, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22547, BidPrice=18260, BidSize=4, AskPrice=0, AskSize=0, LastPrice=18380, LastSize=448, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-12-02 17:40:39.000, OrigSendingTimeInNano=1543743639000000000, SecurityID=22545, BidPrice=2460.5, BidSize=2, AskPrice=0, AskSize=0, LastPrice=2470, LastSize=8231, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-11-17 17:40:39.000, OrigSendingTimeInNano=1542447639000000000, SecurityID=22551, BidPrice=0, BidSize=0, AskPrice=0, AskSize=0, LastPrice=55000, LastSize=0, msgSeqID=1
[34972:35016:1129/090000:VERBOSE3:iqfeed_md.cpp(34)] OrigSndTm=2018-11-17 17:40:39.000, OrigSendingTimeInNano=1542447639000000000, SecurityID=22551, BidPrice=0, BidSize=0, AskPrice=58000, AskSize=1, LastPrice=55000, LastSize=0, msgSeqID=2

2. Yes indeed, I don't set the protocol when connected.

3. Thanks

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


Posted: Nov 30, 2018 05:38 AM          Msg. 4 of 6
Can you post the raw IQFeed output messages you get that show the incorrect dates?

ChowWei
-Interested User-
Posts: 3
Joined: Nov 28, 2018


Posted: Dec 5, 2018 02:51 AM          Msg. 5 of 6
The raw data:
[1984:3632:1203/195502:INFO:iqfeed.cpp(176)] field: F,M.PB3=LX,3E,,,,,,,,,,,,,,,,,,,,,,LEAD 3 MONTH SELECT FORWARD,,,,,,,,,,,,,,,11,1,,,12,62,,,,,,,,,,,,,,
[1984:3632:1203/195502:INFO:iqfeed.cpp(190)] field: P,M.NA3=LX,,,,,1420,2,12/03/2018,99:99:99.406000,99:99:99.406000,
[1984:3632:1203/195502:ERROR:iqfeed.cpp(245)] spooky time info!!!
[1984:3632:1203/195502:INFO:iqfeed.cpp(176)] field: F,M.NA3=LX,3E,,,,,,,,,,,,,,,,,,,,,,NA ALUMINUM ALLOY 3 MONTH SELECT FORWARD,,,,,,,,,,,,,,,0,0,,,12,62,,,,,,,,,,,,,,
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.AL3=LX,,,,,1971.00,2,12/03/2018,99:99:99.406000,99:99:99.406000,
[1984:3632:1203/200002:ERROR:iqfeed.cpp(245)] spooky time info!!!
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.AL3=LX,,,,,1971.00,3,12/03/2018,99:99:99.406000,99:99:99.406000,
[1984:3632:1203/200002:ERROR:iqfeed.cpp(245)] spooky time info!!!
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.AL3=LX,,,,,1971.00,4,12/03/2018,99:99:99.406000,99:99:99.406000,
[1984:3632:1203/200002:ERROR:iqfeed.cpp(245)] spooky time info!!!
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.ZN3=LX,,,,,2572.00,2,12/03/2018,99:99:99.419000,99:99:99.419000,
[1984:3632:1203/200002:ERROR:iqfeed.cpp(245)] spooky time info!!!
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.ZN3=LX,2572.00,1,2573.00,1,2572.00,3,12/03/2018,20:00:00.170000,20:00:00.170000,
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.ZN3=LX,2572.00,1,2573.00,1,2572.00,4,12/03/2018,20:00:00.170000,20:00:00.170000,
[1984:3632:1203/200002:INFO:iqfeed.cpp(190)] field: Q,M.CU3=LX,6239.50,1,6240.00,4,6239.50,2,12/03/2018,20:00:00.155000,20:00:00.550000,

As you see, not only summary message(F), but also update message(Q), the time info for some data is invalid(99:99:99.xxx), that's the reason why my program got stuck.
Now I have ignored the data like that.

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


Posted: Dec 5, 2018 07:55 AM          Msg. 6 of 6
Have you updated your software to use the current protocol?

The 99:99:99 timestamps (and dates) were a way of signaling invalid values in older protocols.

I can't verify at the moment since it's currently trading but those fields should be blank rather than filled with 9s in the current protocols when they aren't valid.
 

 

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