mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix price in usd
This commit is contained in:
parent
4404098bf9
commit
08a1819bd3
|
@ -123,12 +123,12 @@ func (m BalanceMap) Assets(prices map[string]fixedpoint.Value, priceTime time.Ti
|
|||
if !asset.Total.IsZero() {
|
||||
asset.InUSD = asset.Total.Div(usdPrice)
|
||||
}
|
||||
asset.PriceInUSD = usdPrice
|
||||
asset.PriceInUSD = fixedpoint.One.Div(usdPrice)
|
||||
} else {
|
||||
if !asset.Total.IsZero() {
|
||||
asset.InUSD = asset.Total.Mul(usdPrice)
|
||||
}
|
||||
asset.PriceInUSD = fixedpoint.One.Div(usdPrice)
|
||||
asset.PriceInUSD = usdPrice
|
||||
}
|
||||
|
||||
if hasBtcPrice && !asset.InUSD.IsZero() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user