[Add] write log and return if no data feteched
This commit is contained in:
parent
4a96145e25
commit
9557534eaf
@ -331,9 +331,13 @@ class BitmexRestApi(RestClient):
|
||||
break
|
||||
else:
|
||||
data = resp.json()
|
||||
if not data:
|
||||
msg = f"获取历史数据为空,开始时间:{start_time},数量:{count}"
|
||||
break
|
||||
|
||||
for d in data:
|
||||
dt = datetime.strptime(d["timestamp"], "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
dt = datetime.strptime(
|
||||
d["timestamp"], "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
bar = BarData(
|
||||
symbol=req.symbol,
|
||||
exchange=req.exchange,
|
||||
|
Loading…
Reference in New Issue
Block a user