#!/usr/bin/env python3 """Send hourly 1h market trend report to Slack.""" import sys import os sys.path.insert(0, os.path.dirname(__file__)) import data_fetcher import indicators import slack_notifier def main(): market_data = data_fetcher.fetch_all_market_data() htf_by_symbol = {} current_prices = {} for sym, md in market_data.items(): ticker = md.get("ticker", {}) if ticker: current_prices[sym] = ticker.get("last_price", 0) candles_htf = md.get("candles_htf") if candles_htf is not None and not candles_htf.empty: htf_by_symbol[sym] = indicators.calculate_htf_indicators(candles_htf) slack_notifier.send_market_trend_report(htf_by_symbol, current_prices) if __name__ == "__main__": main()