Exemplo n.º 1
0
		public Task<Wallet[]> GetAllWalletsAsync(Guid userId, Page page)
		{
			if (userId == Guid.Empty)
				throw new ArgumentException("userId");
			if (page == null)
				throw new ArgumentNullException("page");

			var request = new GetAllWalletsMessageBuilder(userId, page);
			return SendAsync(request).ReadAsAsync<Wallet[]>();
		}
 public GetOrdersMessageBuilder(Guid walletId, Page page=null, TickerSymbol? instrument=null, OrderStatus? status=null)
 {
     _walletId = walletId;
     _page = page;
     _instrument = instrument.HasValue
         ? Enum.GetName(typeof(TickerSymbol), instrument)
         : null;
     _status = status.HasValue
         ? Enum.GetName(typeof(OrderStatus), status)
         : null;
 }
Exemplo n.º 3
0
		public Task<Order[]> GetOrdersAsync(Guid walletId, Page page, TickerSymbol instrument, OrderStatus status)
		{
			if (walletId == Guid.Empty)
				throw new ArgumentException("walletId");
			if (page == null)
				throw new ArgumentNullException("page");
			if (!Enum.IsDefined(typeof(TickerSymbol), instrument))
				throw new ArgumentException("instrument");
			if (!Enum.IsDefined(typeof(OrderStatus), status))
				throw new ArgumentException("status");

			var request = new GetOrdersMessageBuilder(walletId, page, instrument, status);
			return SendAsync(request).ReadAsAsync<Order[]>();
		}
 public GetAllWalletsMessageBuilder(Guid userId, Page page)
 {
     _userId = userId;
     _page = page;
 }