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); }
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); }
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); }
public void SubscribeAccountInfo(Interface.User user, Action <AccountInfoEventArgs> callback, Action <Exception> exception, CancellationToken cancellationToken) { exchangeService.SubscribeAccountInfo(user, callback, exception, cancellationToken); }
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); }