Ejemplo n.º 1
0
        public Task <EmptyResponse> Cancel(string orderId, string brokerAccountId = null,
                                           CancellationToken cancellationToken    = default)
        {
            var query = new Dictionary <string, string>
            {
                { "orderId", orderId }
            };

            if (!string.IsNullOrWhiteSpace(brokerAccountId))
            {
                query.Add("brokerAccountId", brokerAccountId);
            }

            return(_http.Post <EmptyResponse>("orders/cancel",
                                              null,
                                              query,
                                              cancellationToken:
                                              cancellationToken));
        }
Ejemplo n.º 2
0
 public async Task <EmptyResponse> Register(CancellationToken cancellationToken = default)
 {
     return(await _http.Post <EmptyResponse>("sandbox/register",
                                             null, cancellationToken : cancellationToken));
 }