mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
xfunding: only do transfer when the available balance is not zero
This commit is contained in:
parent
d0566e23ec
commit
866443d89f
|
@ -21,7 +21,11 @@ func (s *Strategy) resetTransfer(ctx context.Context, ex FuturesTransfer, asset
|
||||||
|
|
||||||
b, ok := balances[asset]
|
b, ok := balances[asset]
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("%s balance not found", asset)
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if b.Available.IsZero() {
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("transfering out futures account asset %s %s", b.Available, asset)
|
log.Infof("transfering out futures account asset %s %s", b.Available, asset)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user