internal UriBuilder GetUriBuilder(
            PolygonDataClient polygonDataClient)
        {
            var unixFrom = (TimeInterval.From ?? default).IntoUnixTimeMilliseconds();
            var unixInto = (TimeInterval.Into ?? default).IntoUnixTimeMilliseconds();

            var builder = polygonDataClient.GetUriBuilder(
                $"v2/aggs/ticker/{Symbol}/range/{Period.ToString()}/{unixFrom}/{unixInto}");

            builder.QueryBuilder
            .AddParameter("unadjusted", Unadjusted ? Boolean.TrueString : Boolean.FalseString);

            return(builder);
        }
Exemplo n.º 2
0
        internal UriBuilder GetUriBuilder(
            PolygonDataClient polygonDataClient,
            String historicalItemType)
        {
            var builder = polygonDataClient.GetUriBuilder(
                $"v2/ticks/stocks/{historicalItemType}/{Symbol}/{Date.AsDateString()}");

            builder.QueryBuilder
            .AddParameter("limit", Limit)
            .AddParameter("timestamp", Timestamp)
            .AddParameter("timestamp_limit", TimestampLimit)
            .AddParameter("reverse", Reverse != null ? Reverse.ToString() : null);

            return(builder);
        }
        internal UriBuilder GetUriBuilder(
            PolygonDataClient polygonDataClient)
        {
            var unixFrom = (TimeInterval.From ?? default).IntoUnixTimeMilliseconds();
            var unixInto = (TimeInterval.Into ?? default).IntoUnixTimeMilliseconds();

            var builder = polygonDataClient.GetUriBuilder(
                $"v2/aggs/ticker/{Symbol}/range/{Period}/{unixFrom}/{unixInto}");

            builder.QueryBuilder
            .AddParameter("unadjusted", Unadjusted)
            .AddParameter("limit", Limit)
            .AddParameter("sort", Sort);

            return(builder);
        }