示例#1
0
        public Task <IceRequestResult> CreateOrderAsync(IceSymbolPair symbolPair, OrderType type, DecimalCast amount, DecimalCast price)
        {
            var data = new IceCreateOrder {
                Amount = amount, Price = price, Type = type
            };

            return(_client.ApiUtility.Post <IceRequestResult>($"/order/{symbolPair.Name}", data));
        }
示例#2
0
        public Task <List <IceOrderTransaction> > GetOrderHistoryAsync(IceSymbolPair symbolPair = null)
        {
            var route = symbolPair == null ? $"/order/history" : $"/order/history/{symbolPair.Name}";

            return(_client.ApiUtility.Get <List <IceOrderTransaction> >(route));
        }
示例#3
0
 public List <IceOrderTransaction> GetOrderHistory(IceSymbolPair symbolPair = null) => GetOrderHistoryAsync(symbolPair).Result;
示例#4
0
 public async Task <decimal> GetSuggestedPriceAsync(IceSymbolPair symbolPair)
 {
     return(await _client.ApiUtility.Get <decimal>($"/pairs/suggestedprice/{symbolPair.Name}", false));
 }
示例#5
0
 public IceRequestResult CreateOrder(IceSymbolPair symbolPair, OrderType type, DecimalCast amount, DecimalCast price) => CreateOrderAsync(symbolPair, type, amount, price).Result;
示例#6
0
 public async Task <IceOrderTransaction[]> GetHistoryAsync(IceSymbolPair symbolPair)
 {
     return(await _client.ApiUtility.Get <IceOrderTransaction[]>($"/history/{symbolPair.Name}", false));
 }
示例#7
0
 public decimal GetSuggestedPrice(IceSymbolPair symbolPair) => GetSuggestedPriceAsync(symbolPair).Result;
示例#8
0
 public IceOrderTransaction[] GetHistory(IceSymbolPair symbolPair) => GetHistoryAsync(symbolPair).Result;
示例#9
0
 public async Task <IceDepth> GetDepthAsync(IceSymbolPair symbolPair)
 {
     return(await _client.ApiUtility.Get <IceDepthRaw>($"/depth/{symbolPair.Name}", false));
 }
示例#10
0
 public IceDepth GetDepth(IceSymbolPair symbolPair) => GetDepthAsync(symbolPair).Result;
示例#11
0
 public Task <IceTicker> GetTickerAsync(IceSymbolPair symbolPair)
 {
     return(_client.ApiUtility.Get <IceTicker>($"/ticker/{symbolPair.Name}", false));
 }
示例#12
0
 public IceTicker GetTicker(IceSymbolPair symbolPair) => GetTickerAsync(symbolPair).Result;