Com essa mudança, foi preciso adicionar esse argumento em todas as chamadas deste método. No caso, apenas na definição do método fill arquivo tradingsystem.py
def fill(self, id, price, quantity, status):
if id in self.orders:
order = self.orders[id]
instrument = order.instrument
owner = order.owner
if instrument in self.position:
if owner in self.position[instrument]:
self.position[instrument][owner] += quantity
if owner in self.strategies:
strategy = self.strategies[owner]
strategy.fill(id, instrument, price, quantity, status) #MUDANÇA FEITA
O método
fill
da classeStrategy
recebe oOrder.id
como primeiro argumentoCom essa mudança, foi preciso adicionar esse argumento em todas as chamadas deste método. No caso, apenas na definição do método
fill
arquivotradingsystem.py