Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonabreul committed Jan 8, 2024
1 parent 7e5f655 commit ff3a373
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion QuantConnect.Polygon.Tests/PolygonHistoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public void GetsSameBarCountForDifferentResponseLimits()
new TestCaseData(Symbols.USDJPY, Resolution.Minute, TickType.Trade),
new TestCaseData(Symbols.BTCUSD, Resolution.Minute, TickType.Trade),
new TestCaseData(Symbols.DE10YBEUR, Resolution.Minute, TickType.Trade),
new TestCaseData(Symbols.SPX, Resolution.Minute, TickType.Trade),
new TestCaseData(Symbols.Future_ESZ18_Dec2018, Resolution.Minute, TickType.Trade),

// Supported security type and resolution, unsupported tick type
Expand Down
3 changes: 1 addition & 2 deletions QuantConnect.Polygon/PolygonOptionChainProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ public IEnumerable<Symbol> GetOptionContractList(Symbol symbol, DateTime date)
}

var underlying = symbol.SecurityType.IsOption() ? symbol.Underlying : symbol;
var brokerageSymbol = _symbolMapper.GetBrokerageSymbol(underlying);
var optionsSecurityType = underlying.SecurityType == SecurityType.Index ? SecurityType.IndexOption : SecurityType.Option;

var request = new RestRequest("/v3/reference/options/contracts", Method.GET);
request.AddQueryParameter("underlying_ticker", brokerageSymbol);
request.AddQueryParameter("underlying_ticker", underlying.ID.Symbol);
request.AddQueryParameter("as_of", date.ToStringInvariant("yyyy-MM-dd"));
request.AddQueryParameter("limit", "1000");

Expand Down

0 comments on commit ff3a373

Please sign in to comment.