QuantConnect / QuantConnect/Lean
Expand DownloaderDataProvider To Handle Canonical Symbols
Open
Nobody has claimed this yet.
depth
feature
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
- The
DownloaderDataProviderlauncher program can handle canonical symbols, using a lookup symbols call if supported
Actual Behavior
N/A
Potential Solution
if (symbol.IsCanonical())
{
try
{
if (_providerInstance is IDataQueueUniverseProvider universeProvider)
{
symbols = _brokerage.LookupSymbols(symbol, true);
}
else if (symbol.SecurityType.IsOption())
{
// we can try with the live option chain provider
var chainProvider = new LiveOptionChainProvider();
chainProvider.GetOptionContractList(symbol);
etc
}
}
catch(ex)
{
Log.Error(ex)
}
if (symbols.IsNullOrEmpty())
{
// log trade warning, we can pass the canonical to the provider, maybe it handles it, Polygon for example does,
// polygon should be covered by the first `if` in the try catch though, meaning we can clean it up a bit
}
}
Reproducing the Problem
N/A
System Information
N/A
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the DownloaderDataProvider launcher and reviewing how it currently handles canonical symbols. Trace the provider capabilities and the proposed LookupSymbols and option-chain paths, then define and test behavior for supported and unsupported lookups, including the fallback and warning cases described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100