autoborrow: call Debt() for repay

This commit is contained in:
c9s 2022-07-26 11:49:04 +08:00
parent bdfb5d08aa
commit 549e28079b
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 := fixedpoint.Min(b.Available, b.Borrowed)
toRepay := fixedpoint.Min(b.Available, b.Debt())
bbgo.Notify(&MarginAction{
Exchange: s.ExchangeSession.ExchangeName,
Action: "Repay",