My custom Fee Model:

class FutuTransactionFeeModel(FeeModel):

    def GetOrderFee(self, parameters: OrderFeeParameters) -> OrderFee:

        order = parameters.Order
        price = order.price
        count = order.quantity
        
        security = parameters.security
        return OrderFee(CashAmount(0.5, security.Currency.Symbol))

 


set my custon fee model:

self.equities[stock_name].set_fee_model(FutuTransactionFeeModel())

 


but when this called in ondata method ,error comes:

holding_stock = self.portfolio[stock_symbol]
stock_unrealized_profit = holding_stock.unrealized_profit
Runtime Error: FutuTransactionFeeModel.GetOrderFee() takes 2 positional arguments but 3 were given
at update_holding_stock_delta
stock_unrealized_profit = holding_stock.unrealized_profit

I don't konw why this error comes and what can i do ,anyone can help me ?