/// <summary> /// Extension allowing candlestick interval as a string. /// </summary> /// <param name="client"></param> /// <param name="symbol"></param> /// <param name="interval"></param> /// <param name="limit"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <param name="token"></param> /// <returns></returns> public static async Task <string> GetCandlesticksAsync(this IKucoinHttpClient client, string symbol, string interval, int limit = default, long startTime = default, long endTime = default, CancellationToken token = default) { Throw.IfNull(client, nameof(client)); if (client.RateLimiter != null) { await client.RateLimiter.DelayAsync(token : token) .ConfigureAwait(false); } return(await client.GetCandlesticksAsync(symbol, interval.ToCandlestickInterval(), limit, startTime, endTime, token) .ConfigureAwait(false)); }