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)




"Everything is working great with the API. I love it." - Comment from Calvin
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"Excellent datafeed !!!" - Comment from Arely
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"I will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
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
Viewing User Profile for: altmany
About Contact
Joined: Jul 30, 2018 05:38 AM
Last Post: Feb 13, 2023 11:57 AM
Last Visit: Feb 13, 2023 12:00 PM
Website: https://UndocumentedMatlab.com/IQML
Location:
Occupation: Consultant
Interests: Matlab, finance, trading
Avatar:
IQML - IQFeed-MATLAB connector
Email: altmany@gmail.com
AIM:
ICQ:
MSN IM:
Yahoo IM:
Post Statistics
altmany has contributed to 71 posts out of 20867 total posts (0.34%) in 1,699 days (0.04 posts per day).

20 Most recent posts:
IQFeed Developer Support » How to create bar from tick data Feb 13, 2023 11:57 AM (Total replies: 17)

Quote: So 10:40 to 10:45 would include 10:45:00.999999

I think you meant that 10:40 to 10:45 would include 10:44:59.999999, not 10:45:00.999999, otherwise the following bar will include overlapped data with this bar (trades that occurred in the first second of 10:45:00) and this will cause data inconsistencies.



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

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

Edited by altmany on Feb 13, 2023 at 11:57 AM
Edited by altmany on Feb 13, 2023 at 12:00 PM

IQFeed 3rd Party Software Support » SPX.XO Wont load Oct 28, 2022 06:37 AM (Total replies: 3)

SPX.XO is not a regular stock ticker but a CBOE index (see https://ws1.dtn.com/IQ/Guide/indices_cboe.html) - you need to subscribe to CBOE Indices in your DTN account.

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

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


DTN.IQ Client Software Support » Historical Pre-Market Volume Jun 18, 2022 12:51 PM (Total replies: 14)

Quote: Firstly, thanks for all of your help with this Gary. Secondly, love your last update - great idea! To confirm, will it always choose the latest tick in the range? Also, am I correct in thinking that for a multi-day request like 06/15 to 06/16, it will only pick the latest across all days, or would it return the latest per day? (if the former I can just use python to cycle through each day).

Coming back to the main problem, here's the summary of what I'm seeing...
If I update my message to send an OLD protocol like 5.1...

message = "S,SET PROTOCOL,5.1\r\nHTT,%s,20220615 000000,20220616 130000,,092900,092959\n" % sym 


... then I get a good response back: S,CURRENT PROTOCOL,5.1 - plus I get all of the info for GOOG (still testing, but specifying an old protocol seems to be working). However if I take this exact same code and the only change I make is to update the protocol from 5.1 to 6.2, then it gets weird. A) I get this error response: E,6.2 is not a valid protocol. B) I now get 1 row of data for GOOG back (before specifying protocol, I used to get 0 rows back). This feels super weird - sending 6.2 is getting an error, but at the same time it is meaning I get 1 row of data for GOOG vs 0 rows of data.

All in all, one request I'd love to make if possible would be to add a basic sample code for Python to the IQ Developer Support section. I know a lot of experienced devs use C++ & Java, but Python is quite a common entry level language so hoping it could be supported to a MVP level like opening a socket, setting protocol, submitting a request (to take off the table situations like this when I'm wondering if its my coding or the system - for this it looks like a problem with the system, both with GOOG data responding differently and with accepting the latest protocol incorrectly).

Will crack on with trying to get it working using the old 5.1 approach, and loop back if no joy (but please shout if you already know there'll be an issue with using the old protocol).

Thanks again for your help Gary, really appreciate it!

ChainsawDR
Edited by ChainsawDR on Jun 17, 2022 at 05:24 PM
--- Original message by ChainsawDR on Jun 17, 2022 05:22 PM
To use protocol 6.2, you must of course install the IQFeed 6.2 client. If for example you only have a 6.0 client, then you will not be able to use the 6.1 or 6.2 protocols, only 6.0 or older.
You can download the latest IQFeed client from http://www.iqfeed.net/index.cfm?displayaction=support§ion=download

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

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



Mark - you have 2 bugs in your code:
1. The symbol name needs to be in UPPERCASE, i.e. "AAPL" not "aapl"
2. The IncludeNonStandardOptions parameter needs to be 0 or 1 (not "F")

See http://www.iqfeed.net/dev/api/docs/OptionChainsviaTCPIP.cfm

Note that the parameters order in the CEO command changed in protocol 6.1, so if you need to support earlier protocol versions you need to change the parameters order accordingly.

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

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



You probably have a non-IQFeed process on that computer that uses the same port number (Lookup=9100 by default). Run `netstat -on` to see which process it is and then either stop that process, or modify the Lookup port number in the Windows registry.

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

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


IQFeed Developer Support » FDS request error Apr 11, 2022 10:30 AM (Total replies: 2)

Perhaps you are sending the request to the Level1 port instead of to the Lookup port.

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

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



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


Data and Content Support » Watch List/Syntax error Jan 3, 2022 11:18 AM (Total replies: 2)

The watch command should be sent on the Level 1 port (5009), not the Lookup port (9100)

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

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



During regular US trading hours (9:30-16:30 US Eastern time), only 8 days of ticks data is available. Outside trading hours you can receive up to 180 days of data.

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

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



This field in the S,CUST message indicates the latest official version of IQFeed, which is currently 6.1.0.20. Remember that 6.2 is still in beta mode and not the officially supported version [yet]. Simply run the S,SET PROTOCOL,6.2 after you receive this message and you should be ok. You will see that the 6.2 protocol is used by an incoming S,CURRENT PROTOCOL,6.2 message. Note that you need to repeat this protocol setting for all ports, not just the Admin port.

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

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



Are you certain that when you initially connect to IQFeed you specify S,SET PROTOCOL,6.2 in *ALL* the connection ports?

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

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


IQFeed Developer Support » Multiple Interval Watches on same symbol Oct 9, 2021 03:47 PM (Total replies: 1)

You can specify a unique RequestID (8th parameter after the BW) for each separate BW request (for example: IBM-1s, IBM-5s, IBM-30s). This will be reported at the beginning of each incoming message from IQFeed. You could parse the incoming RequestID and use the parsed components in your code logic.

Note: setting multiple overlapping BW requests per symbol is sub-optimal and will likely inundate your program with multiple duplicate messages. I think that it would be better to only request 1sec BW intervals, and to aggregate the bars in your program logic. This would probably be more efficient than to separately process multiple duplicate interval messages.

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

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


IQFeed Developer Support » Question regarding streaming Oct 8, 2021 08:20 AM (Total replies: 3)

In your BW command to start the streaming, set the UpdateInterval field (which is the 11th field after the BW) to any integer value >= 0 (e.g. 1), to specify the max number of seconds before a bar update message is sent from IQFeed, even when no trade has occurred.

Also see http://forums.iqfeed.net/index.cfm?page=topic&topicID=4341

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

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


IQFeed Developer Support » Market center codes Jul 26, 2021 08:28 AM (Total replies: 1)

Run the SLM command on the Lookup port to get the latest list of market centers (IDs, names and descriptions)

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

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


IQFeed Developer Support » HWX, HMX May 25, 2021 08:00 AM (Total replies: 4)

You're probably using an old version of the IQFeed client (IQConnect), version 6.0 or older - these versions used fewer parameters (the IncludePartialDatapoint parameter was added in client version 6.1). Simply install the latest IQFeed client and this problem will probably be resolved.

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

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



For the volatility value you can use the Historical_Volatility field from the underlying asset's fundamental data. DTN's official description of this field is: “30-trading day volatility, calculated using Black-Scholes”. Apparently, the actual calculation (which is updated once a day, after midnight) for options computes the volatility of day-to-day price change values of the last 30 trading days, using the last 31 daily close prices, as follows:
100*sqrt(252)*std(ln(close(i+1)/close(i)))
, rounded to the nearest 0.01. For futures, the calculation is similar but apparently based on 90 (not 30) values. When a contract is newly-listed, fewer values are used, with a minimum of 4 values.

You can also calculate the historic volatility yourself, using historic prices of the underlying asset (use IQFeed's historic bars query for this). In this case, you can use a different number of historic prices for the calculation, ignore outlier values etc., without relying on DTN's built-in opaque calculation.

As an alternative to using the historic volatility, you can also calculate the implied volatility using Black-Scholes. This will typically be easier for European derivatives than for American/Asian/exotic ones.

In my IQML connector I enable the user to choose whether to use IQFeed's built-in Historical_Volatility field, or a calculated Implied Volatility, or a fixed value.

For the risk-free rate, you can either set a fixed rate (in the current financial situation, a simple value of 0 may be close enough for practical purposes), or use the current value of assets such as LIBOR/IRX.XO.

See http://forums.iqfeed.net/index.cfm?page=topic&topicID=4387 for some detailed discussion of these matters.


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

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

Edited by altmany on Feb 21, 2021 at 02:58 AM


I do not believe that IQFeed has a dedicated query for requesting greeks, nor are the greeks reported by IQFeed in the standard market-data query.

Some of the software that connects to IQFeed (for example, my IQML connector for Matlab) calculate the greeks internally and report them to the user. If you are developing your own program, you can calculate the greeks using the information reported for the options and their underlying asset, and the standard Mathematical definitions: https://en.wikipedia.org/wiki/Greeks_(finance).

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

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


IQFeed Developer Support » Questions about api Dec 28, 2020 10:09 AM (Total replies: 5)

For the benefit of anyone who happens across this thread, note that on Dec. 22, 2020 DTN has changed the throttling mechanism for historical data queries: instead of the old limit on the number of concurrent connections, the new limit is on the number of queries within a rolling 1-second window (50 queries/sec).

References:

There is currently no known throttling limitation on other types of IQFeed queries (non-historical).

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

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


IQFeed 3rd Party Software Support » Bar Watch Help Dec 1, 2020 03:04 PM (Total replies: 7)

Set a non-default UpdateInterval parameter in your BW command to get interim bars.
See http://forums.iqfeed.net/index.cfm?page=topic&topicID=4341 and http://www.iqfeed.net/dev/api/docs/Derivatives_StreamingIntervalBars_TCPIP.cfm

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

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


Data and Content Support » Download Futures Data with delivery month Nov 30, 2020 06:33 AM (Total replies: 12)

The delivery date for futures and future options is included in the "First Delivery Date" field of the Fundamental Data Message in IQFeed (towards the end of the message).
See http://www.iqfeed.net/dev/api/docs/Level1FundamentalMessage.cfm and http://www.iqfeed.net/dev/api/docs/Level1viaTCPIP.cfm

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

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



Time: Fri March 24, 2023 3:36 AM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003