diff --git a/price_monitor.py b/price_monitor.py index 0be0a5f..e7fd2a6 100644 --- a/price_monitor.py +++ b/price_monitor.py @@ -133,7 +133,7 @@ def fetch_hk_eastmoney(codes): results = {} - # 主通道:东方财富实时行情(逐股查询,港股最多~10只,可接受) + # 主通道:东方财富实时行情(逐股查询,港股仅~10只,<1秒完成。该API不支持批量) for code in hk_codes: try: url = (f"https://push2.eastmoney.com/api/qt/stock/get" @@ -155,8 +155,6 @@ def fetch_hk_eastmoney(codes): change_pct = str(item.get("f170", "0")) if price > 0: results[code] = (price, change, change_pct) - # 东方财富有频率限制,每请求间隔 0.2s - time.sleep(0.2) except Exception as e: print(f"⚠️ 东方财富 {code} 拉取失败: {e}", file=sys.stderr) continue