mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
FIX: [max] remove outdated margin fields
This commit is contained in:
parent
d50e50991e
commit
10daeab1cb
|
@ -664,8 +664,8 @@ func (e *Exchange) queryBalances(ctx context.Context, walletType maxapi.WalletTy
|
||||||
Currency: cur,
|
Currency: cur,
|
||||||
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.Principal).Sub(b.Interest),
|
||||||
Borrowed: b.Borrowed,
|
Borrowed: b.Principal,
|
||||||
Interest: b.Interest,
|
Interest: b.Interest,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,7 @@ type Account struct {
|
||||||
Locked fixedpoint.Value `json:"locked"`
|
Locked fixedpoint.Value `json:"locked"`
|
||||||
|
|
||||||
// v3 fields for M wallet
|
// v3 fields for M wallet
|
||||||
Debt fixedpoint.Value `json:"debt"`
|
|
||||||
Principal fixedpoint.Value `json:"principal"`
|
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