24 lines
548 B
Python
24 lines
548 B
Python
"""
|
|
交易系统启动入口
|
|
"""
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# 添加trading_system到路径
|
|
trading_system_path = Path(__file__).parent / 'trading_system'
|
|
sys.path.insert(0, str(trading_system_path))
|
|
|
|
# 导入并运行主程序
|
|
from trading_system.main import main
|
|
import asyncio
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
asyncio.run(main())
|
|
except KeyboardInterrupt:
|
|
print("程序被用户中断")
|
|
except Exception as e:
|
|
print(f"程序异常退出: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|