mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
autoborrow: fix repay amount
This commit is contained in:
parent
185b1fe864
commit
29fc58cb18
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user