Skip to content

Commit ef1cf8e

Browse files
authored
Replace RestShap with HttpClient (#9143)
* Replace RestShap with HttpClient * Address peer review * Minor fixes
1 parent 661356e commit ef1cf8e

13 files changed

+311
-788
lines changed

Algorithm.Python/FutureOptionMultipleContractsInDifferentContractMonthsWithSameUnderlyingFutureRegressionAlgorithm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ def initialize(self):
2626
self._create_option(datetime(2020, 2, 25), OptionRight.CALL, 1600.0): False,
2727
self._create_option(datetime(2020, 2, 25), OptionRight.PUT, 1545.0): False
2828
}
29-
29+
3030
# Required for FOPs to use extended hours, until GH #6491 is addressed
3131
self.universe_settings.extended_market_hours = True
3232

3333
self.set_start_date(2020, 1, 4)
3434
self.set_end_date(2020, 1, 6)
3535

3636
gold_futures = self.add_future("GC", Resolution.MINUTE, Market.COMEX, extended_market_hours=True)
37-
gold_futures.SetFilter(0, 365)
37+
gold_futures.set_filter(0, 365)
3838

39-
self.add_future_option(gold_futures.Symbol)
39+
self.add_future_option(gold_futures.symbol)
4040

4141
def on_data(self, data: Slice):
4242
for symbol in data.quote_bars.keys():

Algorithm.Python/HistoryAlgorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def initialize(self):
3232
self.add_equity("SPY", Resolution.DAILY)
3333
IBM = self.add_data(CustomDataEquity, "IBM", Resolution.DAILY)
3434
# specifying the exchange will allow the history methods that accept a number of bars to return to work properly
35-
IBM.Exchange = EquityExchange()
35+
IBM.exchange = EquityExchange()
3636

3737
# we can get history in initialize to set up indicators and such
3838
self.daily_sma = SimpleMovingAverage(14)
@@ -96,7 +96,7 @@ def initialize(self):
9696
self.assert_history_count("History(CustomDataEquity, self.securities.keys(), 14)", all_custom_data, 14 * 2)
9797

9898
# NOTE: Using different resolutions require that they are properly implemented in your data type. If your
99-
# custom data source has different resolutions, it would need to be implemented in the GetSource and
99+
# custom data source has different resolutions, it would need to be implemented in the GetSource and
100100
# Reader methods properly.
101101
#custom_data_history = self.history(CustomDataEquity, "IBM", timedelta(7), Resolution.MINUTE)
102102
#custom_data_history = self.history(CustomDataEquity, "IBM", 14, Resolution.MINUTE)

0 commit comments

Comments
 (0)