mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
net asset should sub interest
This commit is contained in:
parent
5dd969fa6f
commit
ef419f75ab
|
@ -31,8 +31,9 @@ func (b Balance) Net() fixedpoint.Value {
|
|||
total := b.Total()
|
||||
netAsset := b.NetAsset
|
||||
if netAsset.IsZero() {
|
||||
netAsset = total.Sub(b.Borrowed)
|
||||
netAsset = total.Sub(b.Borrowed).Sub(b.Interest)
|
||||
}
|
||||
|
||||
return netAsset
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user