Documentation
API Reference
Types
Balance

Type: Balances

BalancesByWalletType

This type represents the balances returned by the Cede SDK for a given exchange instance.

type BalancesByWalletType = {
  [walletType in WalletType]: {
    [tokenSymbol: string]: {
      freeBalance: number;
      refFreeBalance: number;
      usedBalance: number;
      refUsedBalance: number;
      totalBalance: number;
      refTotalBalance: number;
    };
  };
};
  • walletType - WalletType
    The wallet type.
  • tokenSymbol - string
    The token's symbol.
  • freeBalance - number
    The balance able to be transfered, traded, sent without any action needed.
  • refFreeBalance - number
    The freeBalance value in american dollars.
  • usedBalance - number
    The balance that is currently being used in open orders, loans, etc.
  • refUsedBalance - number
    The usedBalance value in american dollars.
  • totalBalance - number
    The total balance of the token.
  • refTotalBalance - number
    The totalBalance value in american dollars.

SubAccountBalancesByWalletType

This type represents the balances returned by the Cede SDK for a given sub-account.

type SubAccountBalancesByWalletType = {
  [walletType: string]: {
    [tokenSymbol: string]: {
      freeBalance: number;
      refFreeBalance: number;
      usedBalance: number;
      refUsedBalance: number;
      totalBalance: number;
      refTotalBalance: number;
    };
  };
};