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)

"For anyone considering using DTN.IQ for a data feed, my experience with the quality of data and the tech support has been very positive." - Comment from Public Forum
"I "bracket trade" all major news releases and I have not found one lag or glitch with DTN.IQ feed. I am very comfortable with their feed under all typical news conditions (Fed releases, employment numbers, etc)." - Comment from Public Forum
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"There is no doubt that IQFeed is the best data provider. I am very satisfied with your services. And IQFeed is the only one that I would recommend to my friends. Now, most of them are using your product in China." - Comment from Zhezhe
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"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
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"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
Home  Search  Register  Login  Blogs Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTN_IQFeed on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »IQFeed Developer »IQFeed Developer Support »About L1 level Connection
Author Topic: About L1 level Connection (6 messages, Page 1 of 1)

-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 Guru-
Posts: 2062
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.

-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 Guru-
Posts: 2062
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?

-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(, that's the reason why my program got stuck.
Now I have ignored the data like that.

-DTN Guru-
Posts: 2062
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: Wed January 16, 2019 10:51 PM CFBB v1.2.0 0 ms.
© AderSoftware 2002-2003