/// <summary> /// Cancel all orders request This request cancels all open orders on single specified exchange. /// </summary> /// <exception cref="CoinAPI.OMS.API.SDK.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="orderCancelAllRequest">OrderCancelAllRequest object.</param> /// <returns>Task of ApiResponse (Message)</returns> public async System.Threading.Tasks.Task <CoinAPI.OMS.API.SDK.Client.ApiResponse <Message> > V1OrdersCancelAllPostAsyncWithHttpInfo(OrderCancelAllRequest orderCancelAllRequest) { // verify the required parameter 'orderCancelAllRequest' is set if (orderCancelAllRequest == null) { throw new CoinAPI.OMS.API.SDK.Client.ApiException(400, "Missing required parameter 'orderCancelAllRequest' when calling OrdersApi->V1OrdersCancelAllPost"); } CoinAPI.OMS.API.SDK.Client.RequestOptions localVarRequestOptions = new CoinAPI.OMS.API.SDK.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json", "appliction/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.Data = orderCancelAllRequest; // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync <Message>("/v1/orders/cancel/all", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("V1OrdersCancelAllPost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Cancel all orders request This request cancels all open orders on single specified exchange. /// </summary> /// <exception cref="CoinAPI.OMS.API.SDK.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="orderCancelAllRequest">OrderCancelAllRequest object.</param> /// <returns>ApiResponse of Message</returns> public CoinAPI.OMS.API.SDK.Client.ApiResponse <Message> V1OrdersCancelAllPostWithHttpInfo(OrderCancelAllRequest orderCancelAllRequest) { // verify the required parameter 'orderCancelAllRequest' is set if (orderCancelAllRequest == null) { throw new CoinAPI.OMS.API.SDK.Client.ApiException(400, "Missing required parameter 'orderCancelAllRequest' when calling OrdersApi->V1OrdersCancelAllPost"); } CoinAPI.OMS.API.SDK.Client.RequestOptions localVarRequestOptions = new CoinAPI.OMS.API.SDK.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json", "appliction/json" }; var localVarContentType = CoinAPI.OMS.API.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = CoinAPI.OMS.API.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = orderCancelAllRequest; // make the HTTP request var localVarResponse = this.Client.Post <Message>("/v1/orders/cancel/all", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("V1OrdersCancelAllPost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Cancel all orders request This request cancels all open orders on single specified exchange. /// </summary> /// <exception cref="CoinAPI.OMS.API.SDK.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="orderCancelAllRequest">OrderCancelAllRequest object.</param> /// <returns>Task of Message</returns> public async System.Threading.Tasks.Task <Message> V1OrdersCancelAllPostAsync(OrderCancelAllRequest orderCancelAllRequest) { CoinAPI.OMS.API.SDK.Client.ApiResponse <Message> localVarResponse = await V1OrdersCancelAllPostAsyncWithHttpInfo(orderCancelAllRequest); return(localVarResponse.Data); }
/// <summary> /// Cancel all orders request This request cancels all open orders on single specified exchange. /// </summary> /// <exception cref="CoinAPI.OMS.API.SDK.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="orderCancelAllRequest">OrderCancelAllRequest object.</param> /// <returns>Message</returns> public Message V1OrdersCancelAllPost(OrderCancelAllRequest orderCancelAllRequest) { CoinAPI.OMS.API.SDK.Client.ApiResponse <Message> localVarResponse = V1OrdersCancelAllPostWithHttpInfo(orderCancelAllRequest); return(localVarResponse.Data); }