// CancelOrder cancel an order in CryptoMarket, given its id
// Returns an Order struct that supports Close() and Refresh() to cancel or update
// the order respectively.
//
// List of accepted Arguments:
//   - required: Id (string)
//   - optional: none
// https://developers.cryptomkt.com/#cancelar-una-orden
CancelOrder cancel an order in CryptoMarket, given its id
Returns an Order struct that supports Close() and Refresh() to cancel or update
the order respectively.


// CancelOrder cancel an order in CryptoMarket given its id // Returns an Order struct that supports Close () and Refresh () to cancel or update // the order respectively . // // List of accepted Arguments : // - required : Id ( string ) // - optional : none // https : // developers . cryptomkt . com / #cancelar - una - orden
func (client *Client) CancelOrder(arguments ...args.Argument) (*Order, error) {
	required := []string{"id"}
	resp, err := client.postReq("orders/cancel", "CancelOrder", required, arguments...)
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var oResp OrderResponse
	json.Unmarshal(resp, &oResp)
	if oResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", oResp.Message)
	}
	oResp.Data.client = client
	return &oResp.Data, nil
}
func ( client * Client ) CancelOrder ( arguments ... args . Argument ) ( * Order , error ) { required := [ ] string { " " } resp , err := client . postReq ( " " , " " , required , arguments ... ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var oResp OrderResponse json . Unmarshal ( resp , & oResp ) if oResp . Status == " " { return nil , fmt . Errorf ( " " , oResp . Message ) } oResp . Data . client = client return & oResp . Data , nil }
CancelOrder cancel an order in CryptoMarket, given its id
Returns an Order struct that supports Close() and Refresh() to cancel or update
the order respectively.
CancelOrder cancel an order in CryptoMarket given its id Returns an Order struct that supports Close () and Refresh () to cancel or update the order respectively .