feat: fetch 15-minute bars instead of hourly for intraday prices
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-3 Pipeline was successful
ci/woodpecker/push/build-2 Pipeline was successful
ci/woodpecker/push/build-1 Pipeline was successful
ci/woodpecker/push/finalize Pipeline was successful
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
Build and Push / beta-gate (push) Has been cancelled

Changed intraday_bars default from 1-hour bars to 15-minute bars.
This gives ~26 price points per trading day per ticker (6.5h market
× 4 bars/hour) instead of ~7 hourly bars. Limit raised to 100 to
accommodate the higher bar count.
This commit is contained in:
Celes Renata
2026-04-29 23:01:11 +00:00
parent 2538da3f1e
commit 13f863ef30
+4 -4
View File
@@ -135,11 +135,11 @@ class PolygonMarketAdapter(MarketDataAdapter):
if config.get("limit"): if config.get("limit"):
params["limit"] = str(config["limit"]) params["limit"] = str(config["limit"])
elif endpoint_key == "intraday_bars": elif endpoint_key == "intraday_bars":
# Intraday: fetch hourly bars for today # Intraday: fetch 15-minute bars for today
from datetime import date as date_cls from datetime import date as date_cls
today = date_cls.today().isoformat() today = date_cls.today().isoformat()
multiplier = str(config.get("multiplier", 1)) multiplier = str(config.get("multiplier", 15))
timespan = config.get("timespan", "hour") timespan = config.get("timespan", "minute")
path = self.INTRADAY_BARS.format( path = self.INTRADAY_BARS.format(
ticker=ticker, ticker=ticker,
multiplier=multiplier, multiplier=multiplier,
@@ -149,7 +149,7 @@ class PolygonMarketAdapter(MarketDataAdapter):
) )
params["adjusted"] = str(config.get("adjusted", True)).lower() params["adjusted"] = str(config.get("adjusted", True)).lower()
params["sort"] = "asc" params["sort"] = "asc"
params["limit"] = str(config.get("limit", 50)) params["limit"] = str(config.get("limit", 100))
elif endpoint_key == "grouped_daily": elif endpoint_key == "grouped_daily":
# Grouped daily: returns bars for ALL tickers for a given date # Grouped daily: returns bars for ALL tickers for a given date
target_date = config.get("date", "") target_date = config.get("date", "")