We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前提条件:通过ctpbee连接openctp 返回结果如下: 2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 行情服务器连接成功 2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 交易连接成功 2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 交易登录成功 2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 行情服务器登录成功 2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 结算信息确认成功
行情服务器状态:False 交易服务器状态:False
这个服务器状态特别不稳定,有时候True,有时候False。测试了几次,稳定之后都是False状态。
代码: def create_app(app_name_: str = None): """ 工厂函数 创建app变量并加载相关变量,最后返回 """ app_name_ = app_name_ if app_name_ else 'ctpbee_test' app_ = CtpBee(app_name_, name) # 在此处我们创建我们的核心App。 info = { "CONNECT_INFO": { "userid": "xxxx", "password": "123456", "brokerid": "", "md_address": "tcp://121.37.80.177:20004", "td_address": "tcp://121.37.80.177:20002", # "product_info": "", "appid": "simnow_client_test", "auth_code": "" }, "INTERFACE": "ctp", # 接口声明 "TD_FUNC": True, # 开启交易功能 }
app_.config.from_mapping(info) return app_
if name == 'main': app = create_app() app.start(log_output=True) print(f'行情服务器状态:{app.market.md_status}') print(f'交易服务器状态:{app.trader.td_status}')
The text was updated successfully, but these errors were encountered:
感觉是在非交易时间测,那两个应该就是false吧
Sorry, something went wrong.
是这样的
我要想办法重构登录流程 还在想
登录已经重构完成
No branches or pull requests
前提条件:通过ctpbee连接openctp
返回结果如下:
2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 行情服务器连接成功
2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 交易连接成功
2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 交易登录成功
2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 行情服务器登录成功
2024-04-16 01:28:49 ctpbee_test INFO ctpbee_test 结算信息确认成功
行情服务器状态:False
交易服务器状态:False
这个服务器状态特别不稳定,有时候True,有时候False。测试了几次,稳定之后都是False状态。
代码:
def create_app(app_name_: str = None):
"""
工厂函数 创建app变量并加载相关变量,最后返回
"""
app_name_ = app_name_ if app_name_ else 'ctpbee_test'
app_ = CtpBee(app_name_, name) # 在此处我们创建我们的核心App。
info = {
"CONNECT_INFO": {
"userid": "xxxx",
"password": "123456",
"brokerid": "",
"md_address": "tcp://121.37.80.177:20004",
"td_address": "tcp://121.37.80.177:20002",
# "product_info": "",
"appid": "simnow_client_test",
"auth_code": ""
},
"INTERFACE": "ctp", # 接口声明
"TD_FUNC": True, # 开启交易功能
}
if name == 'main':
app = create_app()
app.start(log_output=True)
print(f'行情服务器状态:{app.market.md_status}')
print(f'交易服务器状态:{app.trader.td_status}')
The text was updated successfully, but these errors were encountered: