update_credit_supply_interest#

API documentation for tradeexecutor.strategy.interest.update_credit_supply_interest Python function.

update_credit_supply_interest(state, position, asset, new_atoken_amount, event_at, block_number=None, tx_hash=None, log_index=None)[source]#

Poke credit supply position to increase its interest amount.

Parameters:
  • position (TradingPosition) – Trading position to update

  • asset (AssetIdentifier) –

    The asset of which we update the events for.

    aToken for collateral, vToken for debt.

  • new_atoken_amount (Decimal) – The new on-chain value of aToken/vToken tracking the loan.

  • event_at (datetime) – Block mined timestamp

  • state (State) –

  • block_number (Optional[int]) –

  • tx_hash (Optional[int]) –

  • log_index (Optional[int]) –

Return type:

BalanceUpdate