use mid price to calculate weight

This commit is contained in:
なるみ 2023-03-13 15:30:33 +00:00
parent 0690518dc7
commit add9372eba

View File

@ -175,7 +175,7 @@ func (s *Strategy) prices(ctx context.Context) (types.ValueMap, error) {
return nil, err
}
m[currency] = ticker.Last
m[currency] = ticker.Buy.Add(ticker.Sell).Div(fixedpoint.NewFromFloat(2.0))
}
return m, nil
}