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)




"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"You are much better than lawyers or the phone company because you answer the phone when I call! I just love your customer service." - Comment from Isreal
"I use IQ Feed, Great stuff as far as data analysis information, storage and retrieval is concerned." - Comment from Public Forum
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"After all the anxiety I had with my previous data provider it is a relief not to have to worry about data speed and integrity." - Comment from Eamonn
"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 been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
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 3:51 PM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003