// GetMarkets returns the available markets in cryptomarket as a string slice
//
// https://developers.cryptomkt.com/mercado
GetMarkets returns the available markets in cryptomarket as a string slice

developers.cryptomkt.com/mercado
// GetMarkets returns the available markets in cryptomarket as a string slice // // https : // developers . cryptomkt . com / mercado
func (client *Client) GetMarkets() ([]string, error) {
	resp, err := client.get("market", requests.NewEmptyReq())
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var mResp MarketListResponse
	json.Unmarshal(resp, &mResp)
	if mResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", mResp.Message)
	}
	return mResp.Data, nil
}
func ( client * Client ) GetMarkets ( ) ( [ ] string , error ) { resp , err := client . get ( " " , requests . NewEmptyReq ( ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var mResp MarketListResponse json . Unmarshal ( resp , & mResp ) if mResp . Status == " " { return nil , fmt . Errorf ( " " , mResp . Message ) } return mResp . Data , nil }
GetMarkets returns the available markets in cryptomarket as a string slice
GetMarkets returns the available markets in cryptomarket as a string slice