binance: improve transfer logs

This commit is contained in:
c9s 2023-03-24 14:37:18 +08:00
parent ea7af708f9
commit feec194843
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 10 additions and 1 deletions

View File

@ -381,7 +381,14 @@ func (e *Exchange) TransferFuturesAccountAsset(ctx context.Context, asset string
}
resp, err := req.Do(ctx)
log.Infof("futures transfer %s %s, transaction = %+v, err = %+v", amount.String(), asset, resp, err)
switch io {
case types.TransferIn:
log.Infof("internal transfer (spot) => (futures) %s %s, transaction = %+v, err = %+v", amount.String(), asset, resp, err)
case types.TransferOut:
log.Infof("internal transfer (futures) => (spot) %s %s, transaction = %+v, err = %+v", amount.String(), asset, resp, err)
}
return err
}

View File

@ -162,6 +162,8 @@ func (s *Strategy) Defaults() error {
s.MinHoldingPeriod = types.Duration(3 * 24 * time.Hour)
}
s.positionType = types.PositionShort
return nil
}