mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: call debt()
This commit is contained in:
parent
79fe49f66f
commit
9787b867ac
|
@ -42,7 +42,7 @@ func (b Balance) Total() fixedpoint.Value {
|
|||
// Net returns the net asset value (total - debt)
|
||||
func (b Balance) Net() fixedpoint.Value {
|
||||
total := b.Total()
|
||||
return total.Sub(b.Borrowed).Sub(b.Interest)
|
||||
return total.Sub(b.Debt())
|
||||
}
|
||||
|
||||
func (b Balance) Debt() fixedpoint.Value {
|
||||
|
|
Loading…
Reference in New Issue
Block a user