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 »Market Summary Reports with Python - SYNTAX_ERROR?
Author Topic: Market Summary Reports with Python - SYNTAX_ERROR? (3 messages, Page 1 of 1)

icackler1
-Interested User-
Posts: 3
Joined: Feb 5, 2022


Posted: Feb 5, 2022 09:13 PM          Msg. 1 of 3
I'm trying to retrieve the Market Summary reports using my Python script, but keep getting "E,!SYNTAX_ERROR!,". I can get everything else I need to work, such as SST, SLM, CEO to retrieve option chains, and setting & removing watches to stream option symbol quotes. So I know I've basically got things working, but just not the reports. Any ideas?

I also get the same results when connecting using putty to 127.0.0.1, port:9100, connection type: Raw. I can get option chains, etc, but not the Market Summary Reports.
EDS,1,5,20220203 -- I've tried different combinations of Security Type & Group IDs, but always just get a syntax error.
E,!SYNTAX_ERROR!,


This is what I'm running in my Python script for the Reports:
#!python3
import sys, getopt, time, socket
import contextlib

iqfeed_host="127.0.0.1"
iqfeed_port=9100
timeout=10.0
chunk_size=65535

with contextlib.closing(socket.create_connection((iqfeed_host, iqfeed_port))) as iqfeed_socket:
iqfeed_socket.settimeout(timeout)

#msg="SST\n" #Request a list of Security Types from the feed.
#msg="SLM\n" #Request a list of Listed Markets from the feed.
#msg = "CEO,AAL,pc,ABCDEFGHIJKL,,\n" #Get option chain

msg="EDS,2,14,20220204,TEST\n" #End of Day Summary -- 2,IEOPTION,Index/Equity Option, 14,OPRA,OPRA System,

iqfeed_socket.sendall(msg.encode('ascii'))

loop = True
while loop == True:
chunk = iqfeed_socket.recv(chunk_size).decode("utf-8").strip()
print(chunk)

if chunk.endswith("!ENDMSG!,"):
loop = False
elif chunk.endswith("E,!SYNTAX_ERROR!,"):
loop = False

altmany
-Interested User-
Posts: 73
Joined: Jul 30, 2018

IQML - IQFeed-MATLAB connector


Posted: Feb 6, 2022 02:05 AM          Msg. 2 of 3
Perhaps you connect to IQFeed without setting a protocol version (S,SET PROTOCOL,6.1 for example); in such a case IQFeed uses the default (older) protocol version, which does not understand the EDS command.

Yair Altman
IQML - IQFeed-MATLAB connector
https://UndocumentedMatlab.com/IQML

I am not a DTN employee; my post reflects my personal opinion

icackler1
-Interested User-
Posts: 3
Joined: Feb 5, 2022


Posted: Feb 6, 2022 08:52 PM          Msg. 3 of 3
Yes, that was it. Thanks!! I have another script for the streaming quotes, and I was setting the version there, but not in this one for downloading the reports.
 

 

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