autoborrow: fix repay amount

This commit is contained in:
c9s 2022-07-18 19:14:17 +08:00
parent 185b1fe864
commit 29fc58cb18
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -92,7 +92,7 @@ func (s *Strategy) tryToRepayAnyDebt(ctx context.Context) {
continue
}
toRepay := b.Available
toRepay := fixedpoint.Min(b.Available, b.Borrowed)
bbgo.Notify(&MarginAction{
Exchange: s.ExchangeSession.ExchangeName,
Action: "Repay",