// GetBook returns a pointer to a Book struct with the data given by
// the api and an error message. It returns (nil, error) when an error
// is raised and (*Book, nil) when the operation is successful.
// The data fields are: Price, Amount and Timestamp. To access these fields,
// you can call them by *Book.Data[indexYouWant].FieldYouWant
//
// List of accepted Arguments:
//   - required: Market (string), Type (string)
//   - optional: Page (int), Limit (int)
// https://developers.cryptomkt.com/#ordenes
GetBook returns a pointer to a Book struct with the data given by
the api and an error message. It returns (nil, error) when an error
is raised and (*Book, nil) when the operation is successful.
The data fields are: Price, Amount and Timestamp. To access these fields,
you can call them by *Book.Data[indexYouWant].FieldYouWant


// GetBook returns a pointer to a Book struct with the data given by // the api and an error message . It returns ( nil error ) when an error // is raised and ( * Book nil ) when the operation is successful . // The data fields are : Price Amount and Timestamp . To access these fields // you can call them by * Book . Data [ indexYouWant ] . FieldYouWant // // List of accepted Arguments : // - required : Market ( string ) Type ( string ) // - optional : Page ( int ) Limit ( int ) // https : // developers . cryptomkt . com / #ordenes
func (client *Client) GetBook(arguments ...args.Argument) (*Book, error) {
	required := []string{"market", "type"}
	req, err := makeReq(required, arguments...)
	if err != nil {
		return nil, fmt.Errorf("Error in GetBook: %s", err)
	}
	resp, err := client.getPublic("book", req)
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var bResp BookResponse
	json.Unmarshal(resp, &bResp)
	if bResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", bResp.Message)
	}
	book := Book{
		args:       req.GetArguments(),
		pagination: bResp.Pagination,
		client:     client,
		Data:       bResp.Data,
	}
	return &book, nil
}
func ( client * Client ) GetBook ( arguments ... args . Argument ) ( * Book , 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 bResp BookResponse json . Unmarshal ( resp , & bResp ) if bResp . Status == " " { return nil , fmt . Errorf ( " " , bResp . Message ) } book := Book { args : req . GetArguments ( ) , pagination : bResp . Pagination , client : client , Data : bResp . Data , } return & book , nil }
GetBook returns a pointer to a Book struct with the data given by
the api and an error message.
GetBook returns a pointer to a Book struct with the data given by the api and an error message .