Esempio n. 1
0
        /// <summary>
        ///     Cancels an order based on the provided request
        /// </summary>
        /// <param name="request">The <see cref="CancelOrderRequest" /> that is used to define the order</param>
        /// <param name="receiveWindow"></param>
        /// <returns></returns>
        public async Task <CancelOrderResponse> CancelOrderAsync(CancelOrderRequest request, int receiveWindow = -1)
        {
            receiveWindow = SetReceiveWindow(receiveWindow);
            Guard.AgainstNull(request.Symbol);

            return(await _apiProcessor.ProcessDeleteRequest <CancelOrderResponse>(Endpoints.Account.CancelOrder(request),
                                                                                  receiveWindow));
        }
Esempio n. 2
0
        /// <summary>
        /// Closes a user data stream
        /// </summary>
        /// <param name="userDataListenKey"></param>
        /// /// <returns><see cref="UserDataStreamResponse"/></returns>
        public async Task <UserDataStreamResponse> CloseUserDataStream(string userDataListenKey)
        {
            Guard.AgainstNullOrEmpty(userDataListenKey);

            return(await _apiProcessor.ProcessDeleteRequest <UserDataStreamResponse>(Endpoints.UserStream.CloseUserDataStream(userDataListenKey)));
        }