add comment explaining why the 5k is good

This commit is contained in:
Emil Lerch 2026-03-06 16:50:41 -08:00
parent 4b2493afe0
commit 9902507911
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -53,6 +53,9 @@ pub const TwelveData = struct {
const from_str = from.format(&from_buf); const from_str = from.format(&from_buf);
const to_str = to.format(&to_buf); const to_str = to.format(&to_buf);
// TwelveData's max outputsize is 5000 data points per request.
// For daily candles this covers ~20 years of trading days (~252/year),
// well beyond our typical 10-year lookback. No pagination needed.
const url = try http.buildUrl(allocator, base_url ++ "/time_series", &.{ const url = try http.buildUrl(allocator, base_url ++ "/time_series", &.{
.{ "symbol", symbol }, .{ "symbol", symbol },
.{ "interval", "1day" }, .{ "interval", "1day" },