print("Retry get_exchange_info //{}".format(retries - 1))
print(e.error_code)
print(e.error_message)
time.sleep(0.5)
// 转换成DICT,mongodb不接受专有类型
symbol_list = []
for symbol in exchange_info.symbol_list:
After Change
if (retries == 0):
msg_dict = json.loads(req.content)
if (("status" in msg_dict) and (msg_dict["status"] == "ok") and ("data" in msg_dict)):
if len(msg_dict["data"]) == 0:
return []
for symbol in msg_dict["data"]:
// 只导入上架交易对
if (symbol["state"] == "online"):
datas.append(symbol)