xfunding: log positionRisks

This commit is contained in:
c9s 2023-06-16 17:57:53 +08:00
parent e4ababd39e
commit bd347d5aa5
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -714,7 +714,7 @@ func (s *Strategy) syncFuturesPosition(ctx context.Context) {
return
}
log.Infof("position comparision: %s (spot) <=> %s (futures)", spotBase.String(), futuresBase.String())
log.Infof("syncFuturesPosition: position comparision: %s (spot) <=> %s (futures)", spotBase.String(), futuresBase.String())
if futuresBase.Sign() > 0 {
// unexpected error
@ -1133,6 +1133,8 @@ func (s *Strategy) checkAndRestorePositionRisks(ctx context.Context) error {
return err
}
log.Infof("fetched futures position risks: %+v", positionRisks)
for _, positionRisk := range positionRisks {
if positionRisk.Symbol != s.Symbol {
continue