/// <summary> /// Get ticker for a trading pair /// </summary> /// <param name="pair">Trading pair</param> /// <returns>Ticker object</returns> public static async Task <Ticker> GetTicker(this IStex service, string pair) { var pairId = service.GetExchangePairId(pair); return(await service.GetTicker(pairId)); }
/// <summary> /// Get trades for a trading pair /// </summary> /// <param name="pair">Trading Pair</param> /// <param name="sort">Sort Order (default = DESC)</param> /// <param name="from">Timestamp from time (ms)</param> /// <param name="till">Timestamp till time (ms)</param> /// <param name="limit">Record max (default = 100)</param> /// <param name="offset">Offset</param> /// <returns>Collection of Trades</returns> public static async Task <List <Trade> > GetTrades(this IStex service, string pair, SortOrder sort = SortOrder.DESC, int from = 0, int till = 0, int limit = 100, int offset = 0) { var pairId = service.GetExchangePairId(pair); return(await service.GetTrades(pairId, sort, from, till, limit, offset)); }
/// <summary> /// Get trading pair details /// </summary> /// <param name="pair">Trading pair</param> /// <returns>TradingPairDetail object</returns> public static async Task <TradingPairDetail> GetTradingPairDetail(this IStex service, string pair) { var pairId = service.GetExchangePairId(pair); return(await service.GetTradingPairDetail(pairId)); }