This error comes up when I’m making a bracketing order:
File “C:\Users\That Guy\PycharmProjects\allpacaTest\venv\lib\site-packages\lumibot\brokers\alpaca.py”, line 302, in _flatten_order
sub_order = self._parse_broker_order(json_sub_order, strategy_name)
TypeError: _parse_broker_order() missing 1 required positional argument: ‘strategy_object’
Parsing the alpaca.py code, it doesn’t look like it could ever work:
def _flatten_order(self, order):
"""Some submitted orders may trigger other orders.
_flatten_order returns a list containing the main order
and all the derived ones"""
orders = [order]
if order._raw.legs:
strategy_name = order.strategy
for json_sub_order in order._raw.legs:
sub_order = self._parse_broker_order(json_sub_order, strategy_name)
orders.append(sub_order)
return orders
def _parse_broker_order(self, response, strategy_name, strategy_object):
…
…
…
Is this a bug or am I just missing something?
Thanks for your help.