/// <summary> /// returns the actual data on exchange rates of the specified cryptocurrency. /// /api/1/public/:symbol/ticker /// </summary> /// <param name="symbol">is a currency symbol traded on HitBTC exchange</param> /// <returns></returns> public async Task<Ticker> GetSymbolTicker(Symbol symbol) { var request = new RestRequest(); request.Resource = "/api/1/public/{symbol}/ticker"; request.AddParameter("symbol", symbol.symbol, ParameterType.UrlSegment); return await _api.Execute(request, false); }
/// <summary> /// returns recent trades for the specified currency symbol. /// /api/1/public/:symbol/trades/recent /// </summary> /// <param name="symbol">is a currency symbol traded on HitBTC exchange</param> /// <param name="max_results">Maximum quantity of returned results, at most 1000</param> /// <returns></returns> public async Task<SpecifiedTrades> GetRecentTrades(Symbol symbol, int max_results = 1000) { var request = new RestRequest("/api/1/public/{symbol}/trades/recent"); request.Parameters.Add(new Parameter { Name = "symbol", Value = symbol.symbol, Type = ParameterType.UrlSegment }); request.Parameters.Add(new Parameter { Name = "max_results", Value = max_results, Type = ParameterType.GetOrPost }); request.Parameters.Add(new Parameter { Name = "format_item", Value = "object", Type = ParameterType.GetOrPost }); request.Parameters.Add(new Parameter { Name = "side", Value = "true", Type = ParameterType.GetOrPost }); return await _api.Execute(request); }
/// <summary> /// returns a list of open orders for specified currency symbol: their prices and sizes. /// /api/1/public/:symbol/orderbook /// </summary> /// <param name="symbol">is a currency symbol traded on HitBTC exchange </param> /// <returns></returns> public async Task<Orderbook> GetOrderbook(Symbol symbol) { var request = new RestRequest("api/1/public/{symbol}/orderbook"); request.AddParameter("symbol", symbol.symbol, ParameterType.UrlSegment); return await _api.Execute(request, false); }