Hopefully this helps others. I had been stuck on being able to download polygon data via QuantConnect.ToolBox.dll and I wanted to share a work around for the time being while this github issue is still open.
A workaround in this file: /ToolBox/Polygon/PolygonDataQueueHandler.cs
Modify line 52:
private readonly string _apiKey = Config.Get("polygon-api-key");
To read:
private const string apiKey = “<your api key>";
Then rebuild the Quantconnect toolbox as described here
Here was the sample command I'd try running:
dotnet QuantConnect.ToolBox.dll --app=PDL --tickers=SPY --resolution=Daily --from-date=20210101-00:00:00 --to-date=20220101-00:00:00 --security-type=Equity --market=usa
This was my previous post on the topic:
Yuri Lopukhov
hmm, I don't know C#, but shouldn't the variable name have an underscore in front in the
as well as it does in the original code?
like this:
Axist
You're right! Excuse the typo on my end. Was just happy I found this and if anyone else was stuck, wanted to show the workaround
Axist
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!