添加新的检测
This commit is contained in:
+4
-3
@@ -51,6 +51,7 @@ TIMEFRAMES = {
|
||||
'1h': '1小时',
|
||||
'2h': '2小时',
|
||||
'4h': '4小时',
|
||||
'6h': '6小时',
|
||||
'8h': '8小时',
|
||||
'12h': '12小时',
|
||||
'1d': '日线',
|
||||
@@ -110,12 +111,12 @@ def get_crypto_kl_data(symbol, timeframe, limit=1000, start_time=None, end_time=
|
||||
# 根据时间周期调整每次请求的数据量
|
||||
batch_size = 1000 # 默认批次大小
|
||||
if timeframe in ['1m', '3m', '5m']:
|
||||
batch_size = 500 # 分钟级数据减少批次大小
|
||||
batch_size = 1000 # 分钟级数据减少批次大小
|
||||
elif timeframe in ['15m', '30m', '1h']:
|
||||
batch_size = 1000
|
||||
else:
|
||||
batch_size = 1500 # 日线及以上可以获取更多
|
||||
batch_size = 1000 # 默认批次大小
|
||||
batch_size = 1500 # 默认批次大小
|
||||
# 初始化存储所有K线数据的列表
|
||||
all_ohlcv = []
|
||||
|
||||
@@ -1247,7 +1248,7 @@ def serialize_chan_macd_data(chan_macd_data, client_tz):
|
||||
serialized_data['klu_list'].append({
|
||||
'time': format_time_safely(getattr(klu, 'time', None), client_tz),
|
||||
'continue_div': bool(getattr(klu, 'continue_div', False)),
|
||||
'separate_div': bool(getattr(klu, 'separate_div', False)),
|
||||
'separate_div': int(getattr(klu, 'separate_div', 0)) if getattr(klu, 'separate_div', 0) is not None else 0,
|
||||
'near0_return': int(getattr(klu, 'near0_return', 0)) if getattr(klu, 'near0_return', 0) is not None else 0
|
||||
})
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user