Balances

Resolver to call token balances

Get Balances

Get mutiple token balances for a specific address

dsa.balances.getBalances(address, type);

Parameter

Type

Description

address

address

The user address.

type

string

(Optional) the type of token. Default will use `token`. - `token` eth, dai, usdc, etc. - `ctoken` ceth, cdai, cusdc, etc. - `all` eth, ceth, dai, cdai, usdc, cusdc, etc.

Returns: Object of token Balances

{
  bat: 0,
  dai: 63.09232716193875,
  eth: 1.0100010098441603,
  knc: 1,
  mkr: 0,
  rep: 0,
  ...
}

Last updated