diff --git a/pkg/exchange/max/exchange.go b/pkg/exchange/max/exchange.go index 0a894d4fa..4c095a5c3 100644 --- a/pkg/exchange/max/exchange.go +++ b/pkg/exchange/max/exchange.go @@ -664,8 +664,8 @@ func (e *Exchange) queryBalances(ctx context.Context, walletType maxapi.WalletTy Currency: cur, Available: b.Balance, Locked: b.Locked, - NetAsset: b.Balance.Add(b.Locked).Sub(b.Debt), - Borrowed: b.Borrowed, + NetAsset: b.Balance.Add(b.Locked).Sub(b.Principal).Sub(b.Interest), + Borrowed: b.Principal, Interest: b.Interest, } } diff --git a/pkg/exchange/max/maxapi/account.go b/pkg/exchange/max/maxapi/account.go index 17d4e29d4..678de81f7 100644 --- a/pkg/exchange/max/maxapi/account.go +++ b/pkg/exchange/max/maxapi/account.go @@ -25,9 +25,7 @@ type Account struct { Locked fixedpoint.Value `json:"locked"` // v3 fields for M wallet - Debt fixedpoint.Value `json:"debt"` Principal fixedpoint.Value `json:"principal"` - Borrowed fixedpoint.Value `json:"borrowed"` Interest fixedpoint.Value `json:"interest"` // v2 fields