Skip to content

Commit add9372

Browse files
committed
use mid price to calculate weight
1 parent 0690518 commit add9372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/strategy/rebalance/strategy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (s *Strategy) prices(ctx context.Context) (types.ValueMap, error) {
175175
return nil, err
176176
}
177177

178-
m[currency] = ticker.Last
178+
m[currency] = ticker.Buy.Add(ticker.Sell).Div(fixedpoint.NewFromFloat(2.0))
179179
}
180180
return m, nil
181181
}

0 commit comments

Comments
 (0)