Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def initialize(self):
Resolution.MINUTE).symbol

# Get option contract lists for 2020/01/05 (timedelta(days=1)) because Lean has local data for that date
option_chains = self.option_chain_provider.get_option_contract_list(self.es20h20, self.time + timedelta(days=1))
option_chains = list(self.option_chain_provider.get_option_contract_list(self.es20h20, self.time + timedelta(days=1)))
option_chains += self.option_chain_provider.get_option_contract_list(self.es19m20, self.time + timedelta(days=1))

for option_contract in option_chains:
Expand Down Expand Up @@ -80,7 +80,7 @@ def on_end_of_algorithm(self):
if len(self.symbols_received) != len(self.expected_symbols_received):
raise AssertionError(f"Expected {len(self.expected_symbols_received)} option contracts Symbols, found {len(self.symbols_received)}")

missing_symbols = [expected_symbol for expected_symbol in self.expected_symbols_received if expected_symbol not in self.symbols_received]
missing_symbols = [expected_symbol.value for expected_symbol in self.expected_symbols_received if expected_symbol not in self.symbols_received]
if any(missing_symbols):
raise AssertionError(f'Symbols: "{", ".join(missing_symbols)}" were not found in OnData')

Expand Down
6 changes: 3 additions & 3 deletions Algorithm.Python/ComboOrderTicketDemoAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ def check_group_orders_for_fills(self, combo1: list[OrderTicket], combo2: list[O
return False

def on_end_of_algorithm(self) -> None:
filled_orders = self.transactions.get_orders(lambda x: x.status == OrderStatus.FILLED).to_list()
order_tickets = self.transactions.get_order_tickets().to_list()
filled_orders = list(self.transactions.get_orders(lambda x: x.status == OrderStatus.FILLED))
order_tickets = list(self.transactions.get_order_tickets())
open_orders = self.transactions.get_open_orders()
open_order_tickets = self.transactions.get_open_order_tickets().to_list()
open_order_tickets = list(self.transactions.get_open_order_tickets())
remaining_open_orders = self.transactions.get_open_orders_remaining_quantity()

# 6 market, 6 limit, 6 leg limit.
Expand Down
Loading