行情区增加 3m/10m/20m/30m 与 2h/6h/8h/12h 周期

- hub_ohlcv_lib 扩展 CHART_TIMEFRAMES 与分钟快捷键映射

- 下拉框与 /api/chart/meta 同步新周期列表

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-02 15:21:55 +08:00
parent bb762ceeaa
commit abcda762d8
4 changed files with 88 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ if str(_REPO_ROOT) not in sys.path:
sys.path.insert(0, str(_REPO_ROOT))
from hub_kline_store import format_ohlcv_detail, resolve_chart_bars, retention_days
from hub_ohlcv_lib import CHART_TIMEFRAMES, bar_limit_for_timeframe
from hub_ohlcv_lib import CHART_TIMEFRAME_ORDER, CHART_TIMEFRAMES, bar_limit_for_timeframe
from env_load import load_hub_dotenv
@@ -340,7 +340,7 @@ def _fetch_instance_ohlcv_sync(
@app.get("/api/chart/meta")
def api_chart_meta():
tfs = ["1m", "5m", "15m", "1h", "4h", "1d", "1w"]
tfs = [tf for tf in CHART_TIMEFRAME_ORDER if tf in CHART_TIMEFRAMES]
exchanges = []
for ex in enabled_exchanges(load_settings()):
exchanges.append(