bsp_monitor: 多周期 BSP 推送 (1m/5m/15m/1h),中枢监控代码保留但暂停
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
42296ef971
commit
8eb50e3eae
@@ -10,7 +10,6 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
TIMEFRAME = "1m"
|
||||
PROVIDER_URL = "http://103.179.242.166"
|
||||
FETCH_LIMIT = 1000
|
||||
|
||||
@@ -33,12 +32,12 @@ def get_symbols() -> list[str]:
|
||||
return _symbols_cache
|
||||
|
||||
|
||||
def fetch_ohlcv(symbol: str) -> pd.DataFrame:
|
||||
"""从 data_provider API 拉取某个币对最近 FETCH_LIMIT 根 1m K 线。"""
|
||||
def fetch_ohlcv(symbol: str, tf: str = "1m") -> pd.DataFrame:
|
||||
"""从 data_provider API 拉取某个币对最近 FETCH_LIMIT 根 K 线。"""
|
||||
url = f"{PROVIDER_URL}/api/candles"
|
||||
params = {
|
||||
"symbol": symbol,
|
||||
"tf": TIMEFRAME,
|
||||
"tf": tf,
|
||||
"limit": FETCH_LIMIT,
|
||||
}
|
||||
resp = requests.get(url, params=params, timeout=30)
|
||||
|
||||
Reference in New Issue
Block a user