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: