func (c *Client) GetLiquidatableAccounts(pageSize, pageNum string) (map[string]float64, error) {
	resp, err := c.GetAccounts(pageSize, pageNum)
	if err != nil {
		return nil, err
	}
	if len(resp.Accounts) == 0 {
		return nil, errors.New("an unexpected error occurred")
	}
	out := make(map[string]float64)
	for _, acct := range resp.Accounts {
		health, err := strconv.ParseFloat(acct.Health.Value, 64)
		if err != nil {
			return nil, err
		}
		if health < 1.0 {
			out[acct.Address] = health
		}
	}
	if len(out) == 0 {
		return nil, errors.New("no liquidatable accounts found")
	}
	return out, nil
}
GetLiquidatableAccounts is used to return all accounts with health below 1.0
indicating they can be liquidated. The keys of the map are the addresses
and the values are their health
package client
import (
	"errors"
	"io/ioutil"
	"net/http"
	"strconv"
	"github.com/bonedaddy/go-compound/v2/models"
	"github.com/ethereum/go-ethereum/common"
)
type Address string
func (a Address) String() string {
	return string(a)
}
func (a Address) EthAddress() common.Address {
	return common.HexToAddress(a.String())
}
const (
	CompoundBAT = Address("0x6c8c6b02e7b2be14d4fa6022dfd6d75921d90e4e")
	CompoundDAI = Address("0x5d3a536e4d6dbd6114cc1ead35777bab948e3643")
	CompoundSAI = Address("0xf5dce57282a584d2746faf1593d3121fcac444dc")
	CompoundETH = Address("0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5")
	CompoundREP = Address("0x158079ee67fce2f58472a96584a73c7ab9ac95c1")
	CompoundUSDC = Address("0x39aa39c021dfbae8fac545936693ac917d5e7563")
	CompoundWBTC = Address("0xc11b1268c1a384e55c48c2391d8d480264a3a7f4")
	CompoundZRX = Address("0xb3319f5d18bc0d84dd1b4825dcde5d5f7266d407")
	Comptroller = Address("0x178053c06006e67e09879C09Ff012fF9d263dF29")
	Unitroller = Address("0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b")
)
var (
	CompoundTokens = map[string]Address{
		"cBAT":  CompoundBAT,
		"cDAI":  CompoundDAI,
		"cSAI":  CompoundSAI,
		"cETH":  CompoundETH,
		"cREP":  CompoundREP,
		"cUSDC": CompoundUSDC,
		"cWBTC": CompoundWBTC,
		"cZRX":  CompoundZRX,
	}
)
func (c *Client) GetTotalSupplyInterestedEarned(resp *models.AccountResponse) (float64, error) {
	if len(resp.Accounts) == 0 {
		return 0, errors.New("no accounts found")
	}
	var (
		account = resp.Accounts[0]
		value   float64
	)
	for _, tk := range account.Tokens {
		if tk.LifetimeSupplyInterestAccrued.Value == "0" ||
			tk.LifetimeSupplyInterestAccrued.Value == "0.0" {
			continue
		}
		val, err := strconv.ParseFloat(tk.LifetimeSupplyInterestAccrued.Value, 64)
		if err != nil {
			return 0, err
		}
		value = value + val
	}
	return value, nil
}
func (c *Client) GetSupplyInterestEarned(token Address, resp *models.AccountResponse) (float64, error) {
	tkn, err := models.GetTokenByAddress(token.String(), resp)
	if err != nil {
		return 0, err
	}
	return strconv.ParseFloat(tkn.LifetimeSupplyInterestAccrued.Value, 64)
}
func (c *Client) GetBorrowInterestedAccrued(token Address, resp *models.AccountResponse) (string, error) {
	tkn, err := models.GetTokenByAddress(token.String(), resp)
	if err != nil {
		return "", err
	}
	return tkn.LifetimeBorrowInterestAccrued.Value, nil
}