update_credit_supply_loan#
API documentation for tradeexecutor.strategy.lending_protocol_leverage.update_credit_supply_loan Python function.
- update_credit_supply_loan(loan, position, timestamp, trade=None, quantity_delta=Decimal('0'), mode='plan')[source]#
Close/increase/reduce credit supply loan.
- Parameters:
loan (Loan) –
position (tradeexecutor.state.position.TradingPosition) –
timestamp (datetime) –
trade (tradeexecutor.state.trade.TradeExecution | None) –
quantity_delta (Decimal) –
mode (Literal['plan', 'execute']) –