// GetBalance returns the actual balance of the wallets of the client in CryptoMarket
// Returns the a slice of Balance structs
//
// https://developers.cryptomkt.com/#obtener-balance
GetBalance returns the actual balance of the wallets of the client in CryptoMarket
Returns the a slice of Balance structs

developers.cryptomkt.com/#obtener-balance
// GetBalance returns the actual balance of the wallets of the client in CryptoMarket // Returns the a slice of Balance structs // // https : // developers . cryptomkt . com / #obtener - balance
func (client *Client) GetBalance() ([]Balance, error) {
	resp, err := client.get("balance", requests.NewEmptyReq())
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var bResp BalancesResponse
	json.Unmarshal(resp, &bResp)
	if bResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", bResp.Message)
	}
	return bResp.Data, nil
}
func ( client * Client ) GetBalance ( ) ( [ ] Balance , error ) { resp , err := client . get ( " " , requests . NewEmptyReq ( ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var bResp BalancesResponse json . Unmarshal ( resp , & bResp ) if bResp . Status == " " { return nil , fmt . Errorf ( " " , bResp . Message ) } return bResp . Data , nil }
GetBalance returns the actual balance of the wallets of the client in CryptoMarket
Returns the a slice of Balance structs
GetBalance returns the actual balance of the wallets of the client in CryptoMarket Returns the a slice of Balance structs