Hi,

I have a separate issue about the problem with downloading Option data with Interactive Brokers (IBKR) that is still open. I tried using a IQFeed subscription that also fails with a different error.

Here's the algo to reproduce (C#):

  1. using System;
  2. using QuantConnect;
  3. using QuantConnect.Algorithm;
  4. using QuantConnect.Brokerages;
  5. using QuantConnect.Data;
  6. public class SampleOptionAlgo : QCAlgorithm
  7. {
  8. public override void Initialize()
  9. {
  10. var endDate = DateTime.Today.AddDays(-1);
  11. var startDate = endDate.AddDays(-3);
  12. SetStartDate(startDate);
  13. SetEndDate(endDate);
  14. SetCash(100000);
  15. SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin);
  16. var equity = AddEquity("SPY", Resolution.Minute).Symbol;
  17. Securities[equity].SetDataNormalizationMode(DataNormalizationMode.Raw);
  18. SetBenchmark(equity);
  19. var option = AddOption(equity, Resolution.Minute);
  20. option.SetFilter(-5, 5, TimeSpan.FromDays(20), TimeSpan.FromDays(60));
  21. }
  22. public override void OnData(Slice data)
  23. {
  24. foreach (var (symbol, optionChain) in data.OptionChains)
  25. {
  26. foreach (var option in optionChain)
  27. {
  28. Log($"Received {option}");
  29. }
  30. }
  31. }
  32. }
+ Expand

 

(1) I made sure to have correct data subscriptions with IQFeed and that they are active.

- DTN IQFeed Core Service
- OPRA
- RT Equity Options-Investor
- NASDAQ Level 1
- NYSE

(2) Installed IQFeed Client (iqfeed_client_6_2_1_20.exe)

(3) Ran C:ProgramFisDTNIQFeediqlk.exe and connected the IQFeed Client.

(4) After setting up Lean CLI to use IQFeed, lean.json has the following settings:
id:IQFeed,  data-provider:QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider,  data-downloader:QuantConnect.Lean.DataSource.IQFeed.IQFeedDataDownloader,  iqfeed-username:<iqfeed username>,  iqfeed-password:<iqfeed password>,  iqfeed-productName:IQFEED_DIAGNOSTICS,  iqfeed-version:1.0,  iqfeed-host:host.docker.internal,

(3) I run the algo with the following command:
anbacktestSampOptionAlgodataprovrhisricalIQFeedbacktestnameqciqfeedbacktest01

After running the algo, it shows that the stock data for the last 3 days get downloaded but option data fails to download. Also can confirm that from the downloaded files in the data folder.

From the logs:
DATA USAGE:: Total data requests 36
DATA USAGE:: Succeeded data requests 4
DATA USAGE:: Failed data requests 32

There is one error during execution:
20240719 00:41:18.959 ERROR:: IQFeedFileHistoryProvider.ProcessHistoryRequests: Historical data request with
TickType 'Quote' is not supported for resolutions other than Tick. Requested Resolution: Minute


At this point I am blocked again and don't know how to fix this. Can you please help?

Thank you!

P.S.: Here it says “Click Support Request below to submit your discussion as a bug report.” Three is a “Send Support” button on the form that is not working.

Author

Omid Rad

July 2024