Providers Package
Provider API Reference
Types
Balance

Balances

GroupedBalancesByAccount

This type represents a balance returned by the version 2 of the balances method. "Ref" stands for "Reference" and is used to represent the balance in the reference currency (USD).

type GroupedBalancesByAccount = {
  [accountId: string]: {
    [tokenSymbol: string]: {
      freeBalance: number;
      usedBalance: number;
      totalBalance: number;
      refUsedBalance: number;
      totalBalance: number;
      refTotalBalance: number;
      [type in WalletType]?: {
        freeBalance: number;
        usedBalance: number;
        totalBalance: number;
        refUsedBalance: number;
        totalBalance: number;
        refTotalBalance: number;
      };
    };
  };
};

TokenBalance

This type represents a balance returned by the withdrawableTokens method.

export type TokenBalance = {
  tokenName: string;
  totalBalance: number;
  refTotalBalance: number;
  freeBalance: number;
  refFreeBalance: number;
};