mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: net asset should substract debt
This commit is contained in:
parent
92882f68f4
commit
ae8625da31
|
@ -605,7 +605,7 @@ func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap,
|
|||
Currency: cur,
|
||||
Available: b.Balance,
|
||||
Locked: b.Locked,
|
||||
NetAsset: b.Balance.Add(b.Locked),
|
||||
NetAsset: b.Balance.Add(b.Locked).Sub(b.Debt),
|
||||
Borrowed: b.Debt, // TODO: Replace this with borrow in the newer version
|
||||
Interest: b.Interest,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user