Pārlūkot izejas kodu

修改wind接口

tuoling805 1 gadu atpakaļ
vecāks
revīzija
03bd4ea16a
1 mainītis faili ar 0 papildinājumiem un 28 dzēšanām
  1. 0 28
      wind_api.py

+ 0 - 28
wind_api.py

@@ -16,32 +16,6 @@ def hello():
     return 1
     # return 'wind true'
 
-
-# 同花顺登录函数
-def thslogindemo():
-    # 输入用户的帐号和密码
-    thsLogin = THS.THS_iFinDLogin("hzmd150", "689719")
-    print(thsLogin)
-    if (thsLogin == 0 or thsLogin == -201):
-        print('ths 登录成功')
-    else:
-        print('ths 登录失败')
-
-
-@hug.get('/edbInfo/ths')
-def GetEdbDataByThs(EdbCode, StartDate, EndDate):
-    print("GetEdbDataByThs")
-    thsLogin = THS.THS_iFinDLogin("hzmd150", "689719")
-    thsEDBDataQuery = THS.THS_EDBQuery(EdbCode, StartDate, EndDate, True)
-    print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ":start GetEdbDataByThs")
-    print("thsEDBDataQuery")
-    print(thsEDBDataQuery)
-    thsEDBDataQuery = thsEDBDataQuery.decode("unicode_escape")
-
-    result = json.loads(thsEDBDataQuery)
-    print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ":end GetEdbDataByThs")
-    return result
-
 @hug.get('/edbInfo/ths/future_good')
 def GetFutureGoodEdbDataByThs(EdbCode, StartDate, EndDate):
     print("THS_HistoryQuotes start")
@@ -144,8 +118,6 @@ def GetFutureGoodEdbDataByWind(FutureGoodEdbCode, StartDate, EndDate):
 
 
 if __name__ == "__main__":
-    # ths登录函数
-    thslogindemo()
     # wind 登录
     wStart = w.start()
     if wStart.ErrorCode != 0: