mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
max: fix balance field for api
This commit is contained in:
parent
59fcef0b6d
commit
e9faf34b5e
|
@ -608,7 +608,7 @@ func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap,
|
||||||
Available: b.Balance,
|
Available: b.Balance,
|
||||||
Locked: b.Locked,
|
Locked: b.Locked,
|
||||||
NetAsset: b.Balance.Add(b.Locked).Sub(b.Debt),
|
NetAsset: b.Balance.Add(b.Locked).Sub(b.Debt),
|
||||||
Borrowed: b.Debt, // TODO: Replace this with borrow in the newer version
|
Borrowed: b.Borrowed,
|
||||||
Interest: b.Interest,
|
Interest: b.Interest,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ type Account struct {
|
||||||
|
|
||||||
// v3 fields for M wallet
|
// v3 fields for M wallet
|
||||||
Debt fixedpoint.Value `json:"debt"`
|
Debt fixedpoint.Value `json:"debt"`
|
||||||
|
Principal fixedpoint.Value `json:"principal"`
|
||||||
|
Borrowed fixedpoint.Value `json:"borrowed"`
|
||||||
Interest fixedpoint.Value `json:"interest"`
|
Interest fixedpoint.Value `json:"interest"`
|
||||||
|
|
||||||
// v2 fields
|
// v2 fields
|
||||||
|
|
Loading…
Reference in New Issue
Block a user