// GetPrices return a pointer to a Prices struct with the data given by
// the api and an error message. It returns (nil,error) when an error
// is raised and (*Prices, nil) when the operation is successful.
// The data fields are classified in two categories, Ask and Bid.
// The fields are CandleId, OpenPrice, HightPrice, ClosePrice, LowPrice, VolumeSum
// CandleDate and TickCount. To access the data you can call this way:
// *Prices.Data.Ask[indexYouWant].FieldYouWant or *Prices.Data.Bid[indexYouWant].FieldYouWant
//
// List of accepted Arguments:
//   - required: Market (string), Timeframe (string)
//   - optional: Page (int), Limit (int)
// https://developers.cryptomkt.com/#precios
GetPrices return a pointer to a Prices struct with the data given by
the api and an error message. It returns (nil,error) when an error
is raised and (*Prices, nil) when the operation is successful.
The data fields are classified in two categories, Ask and Bid.
The fields are CandleId, OpenPrice, HightPrice, ClosePrice, LowPrice, VolumeSum
CandleDate and TickCount. To access the data you can call this way:
*Prices.Data.Ask[indexYouWant].FieldYouWant or *Prices.Data.Bid[indexYouWant].FieldYouWant


// GetPrices return a pointer to a Prices struct with the data given by // the api and an error message . It returns ( nil error ) when an error // is raised and ( * Prices nil ) when the operation is successful . // The data fields are classified in two categories Ask and Bid . // The fields are CandleId OpenPrice HightPrice ClosePrice LowPrice VolumeSum // CandleDate and TickCount . To access the data you can call this way : // * Prices . Data . Ask [ indexYouWant ] . FieldYouWant or * Prices . Data . Bid [ indexYouWant ] . FieldYouWant // // List of accepted Arguments : // - required : Market ( string ) Timeframe ( string ) // - optional : Page ( int ) Limit ( int ) // https : // developers . cryptomkt . com / #precios
func (client *Client) GetPrices(arguments ...args.Argument) (*Prices, error) {
	required := []string{"market", "timeframe"}
	req, err := makeReq(required, arguments...)
	if err != nil {
		return nil, fmt.Errorf("Error in GetPrices: %s", err)
	}
	resp, err := client.getPublic("prices", req)
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var pResp PricesResponse
	json.Unmarshal(resp, &pResp)
	if pResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", pResp.Message)
	}
	prices := Prices{
		args:       req.GetArguments(),
		pagination: pResp.Pagination,
		client:     client,
		Data:       pResp.Data,
	}
	return &prices, nil
}
func ( client * Client ) GetPrices ( arguments ... args . Argument ) ( * Prices , error ) { required := [ ] string { " " , " " } req , err := makeReq ( required , arguments ... ) if err != nil { return nil , fmt . Errorf ( " " , err ) } resp , err := client . getPublic ( " " , req ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var pResp PricesResponse json . Unmarshal ( resp , & pResp ) if pResp . Status == " " { return nil , fmt . Errorf ( " " , pResp . Message ) } prices := Prices { args : req . GetArguments ( ) , pagination : pResp . Pagination , client : client , Data : pResp . Data , } return & prices , nil }
GetPrices return a pointer to a Prices struct with the data given by
the api and an error message.
GetPrices return a pointer to a Prices struct with the data given by the api and an error message .