yuhua
This commit is contained in:
parent
9b8cd3c99d
commit
3410f4b0ba
@ -22,7 +22,7 @@ warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
|
||||
path = r'C:\trade_software\国盛证券同花顺新一代\xiadan.exe'
|
||||
path = r'C:\国盛证券同花顺新一代\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -22,7 +22,7 @@ warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
|
||||
path = r'C:\trade_software\goldsun\TdxW.exe'
|
||||
path = r'C:\goldsun\TdxW.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -22,7 +22,7 @@ warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
|
||||
path = r'C:\trade_software\e海通财独立交易\AlternateTradeSys5.18.73\xiadan.exe'
|
||||
path = r'C:\e海通财独立交易\AlternateTradeSys5.18.73\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -22,7 +22,7 @@ warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
|
||||
path = r'C:\trade_software\恒泰证券网上交易独立委托\xiadan.exe'
|
||||
path = r'C:\恒泰证券网上交易独立委托\xiadan.exe'
|
||||
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
@ -96,7 +96,7 @@ class HENGTAIClientTrader:
|
||||
set_proxy(proxy_ip,proxy_port)
|
||||
self.log.info('全局代理设置成功')
|
||||
|
||||
|
||||
|
||||
self._app = pywinauto.Application().start(self.path)
|
||||
time.sleep(0.5)
|
||||
self._app.top_window().Edit1.type_keys(self.securities_name)
|
||||
|
@ -22,7 +22,7 @@ warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
|
||||
path = r'C:\trade_software\华福证券独立下单\xiadan.exe'
|
||||
path = r'C:\华福证券独立下单\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -19,10 +19,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\华鑫同花顺独立下单\xiadan.exe'
|
||||
path = r'C:\华鑫同花顺独立下单\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -17,10 +17,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\华鑫同花顺独立下单(奇点)\xiadan.exe'
|
||||
path = r'C:\华鑫同花顺独立下单(奇点)\xiadan.exe'
|
||||
|
||||
|
||||
class HuaXinClientTrader:
|
||||
|
@ -19,10 +19,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\江海证券同花顺独立下单\xiadan.exe'
|
||||
path = r'C:\江海证券同花顺独立下单\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -19,10 +19,10 @@ from tools import *
|
||||
from config import ssid,password
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\金元证券金融终端2.0\xiadan.exe'
|
||||
path = r'C:\金元证券金融终端2.0\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -20,10 +20,10 @@ from tools import *
|
||||
from config import ssid,password
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\开源证券独立下单\xiadan.exe'
|
||||
path = r'C:\开源证券独立下单\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -17,10 +17,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\平安证券智投版\xiadan.exe'
|
||||
path = r'C:\平安证券智投版\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -19,10 +19,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\sywgtonghuashun\xiadan.exe'
|
||||
path = r'C:\sywgtonghuashun\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -18,10 +18,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\万和证券财智通金融终端\xiadan.exe'
|
||||
path = r'C:\万和证券财智通金融终端\xiadan.exe'
|
||||
|
||||
|
||||
class WanHeClientTrader:
|
||||
|
@ -18,10 +18,10 @@ from tools import *
|
||||
from config import ssid,password
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\xyzqzhb\xiadan.exe'
|
||||
path = r'C:\xyzqzhb\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -20,10 +20,10 @@ from config import ssid,password
|
||||
from tools import *
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\双子星金融终端独立交易-中国银河证券\xiadan.exe'
|
||||
path = r'C:\双子星金融终端独立交易-中国银河证券\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -20,10 +20,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\中山赢者专业版\xiadan.exe'
|
||||
path = r'C:\中山赢者专业版\xiadan.exe'
|
||||
|
||||
|
||||
class ZSZQClientTrader:
|
||||
|
@ -19,10 +19,10 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\zhongyou\xiadan.exe'
|
||||
path = r'C:\zhongyou\xiadan.exe'
|
||||
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
|
@ -19,10 +19,10 @@ from tools import *
|
||||
from config import ssid,password
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\zd_zsone\TdxW.exe'
|
||||
path = r'C:\zd_zsone\TdxW.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -19,7 +19,6 @@ import datetime
|
||||
from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
|
@ -20,10 +20,10 @@ from tools import *
|
||||
from config import ssid,password
|
||||
warnings.filterwarnings('ignore')
|
||||
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = scripts_path[:scripts_path.find(project_name)+len(project_name)]
|
||||
from pathlib import Path
|
||||
root_path = Path(__file__).parent.parent
|
||||
|
||||
path = r'C:\trade_software\zxzq\xiadan.exe'
|
||||
path = r'C:\zxzq\xiadan.exe'
|
||||
engine = create_engine(
|
||||
'mysql+pymysql://cn_ainvest_db:cn_ainvest_sd3a1@rm-2zewagytttzk6f24xno.mysql.rds.aliyuncs.com:3306/',
|
||||
encoding="utf-8", echo=False)
|
||||
|
@ -188,6 +188,12 @@ class Trade:
|
||||
elif self.broker == '国盛' or self.broker == '国盛证券':
|
||||
from autobasic import guosheng_clienttrader
|
||||
user = guosheng_clienttrader.GuoShengClientTrader(self.user)
|
||||
elif self.broker == '长江' or self.broker == '长江证券':
|
||||
from autobasic import cj_clienttrader
|
||||
user = cj_clienttrader.ChangJiangClientTrader(self.user)
|
||||
elif self.broker == '江海' or self.broker == '江海证券':
|
||||
from autobasic import jh_clienttrader
|
||||
user = jh_clienttrader.JHClientTrader(self.user)
|
||||
else:
|
||||
self.log.error('暂不支持该券商')
|
||||
return user
|
||||
|
@ -181,7 +181,7 @@ if __name__ == '__main__':
|
||||
#
|
||||
# userlist = ['13708491492','138187729
|
||||
|
||||
userlist = [ '13653488300']
|
||||
userlist = [ '18636191815']
|
||||
print(userlist)
|
||||
for user in userlist:
|
||||
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||
|
@ -97,12 +97,6 @@ class auto_trade:
|
||||
logger.info(user)
|
||||
try:
|
||||
self.trade_main(user)
|
||||
writer = ExcelDataWriter()
|
||||
writer.update_latest_record(
|
||||
status='成功',
|
||||
remarks='实盘数据',
|
||||
risk_response=''
|
||||
)
|
||||
logger.info(f'{user}交易已经完成')
|
||||
|
||||
except Exception as er:
|
||||
@ -119,14 +113,6 @@ class auto_trade:
|
||||
else:
|
||||
logger.error('交易错误')
|
||||
logger.error(er)
|
||||
#
|
||||
writer = ExcelDataWriter()
|
||||
writer.update_latest_record(
|
||||
status='失败',
|
||||
remarks='实盘数据',
|
||||
risk_response=str(er)
|
||||
)
|
||||
|
||||
|
||||
continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user