Пример #1
0
        public async Task <IEnumerable <Order> > GetOpenOrdersAsync(Interface.User user, string symbol = null, long recWindow = 0, Action <Exception> exception = default(Action <Exception>), CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = await exchangeService.GetOpenOrdersAsync(user, symbol, recWindow, exception, cancellationToken).ConfigureAwait(false);

            var orders = result.Select(o => o.GetViewOrder()).ToList();

            return(orders);
        }
Пример #2
0
        public async Task <string> CancelOrderAsync(Interface.User user, string symbol, long orderId, string newClientOrderId = null, long recWindow = 0, CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = await exchangeService.CancelOrderAsync(user, symbol, orderId, newClientOrderId, recWindow, cancellationToken).ConfigureAwait(false);

            return(result);
        }
Пример #3
0
        public async Task <Interface.Order> PlaceOrder(Interface.User user, Interface.ClientOrder clientOrder, long recWindow = 0, CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = await exchangeService.PlaceOrder(user, clientOrder, recWindow, cancellationToken).ConfigureAwait(false);

            return(result);
        }
Пример #4
0
 public void SubscribeAccountInfo(Interface.User user, Action <AccountInfoEventArgs> callback, Action <Exception> exception, CancellationToken cancellationToken)
 {
     exchangeService.SubscribeAccountInfo(user, callback, exception, cancellationToken);
 }
Пример #5
0
        public async Task <IEnumerable <Interface.AccountTrade> > GetAccountTradesAsync(Interface.User user, string symbol, DateTime startDate, DateTime endDate, long recWindow = 0, CancellationToken cancellationToken = default(CancellationToken))
        {
            var accountTrades = await exchangeService.GetAccountTradesAsync(user, symbol, startDate, endDate, recWindow, cancellationToken);

            return(accountTrades);
        }