rqalpha-mod-ctp icon indicating copy to clipboard operation
rqalpha-mod-ctp copied to clipboard

RQAlpha 对接 ctp 的扩展 Mod。通过启用该 Mod 来实现期货策略的实盘交易

Results 5 rqalpha-mod-ctp issues
Sort by recently updated
recently updated
newest added

用户登录:RspInfo(ErrorID=0, ErrorMsg=b'CTP:No Error') 交易日期: b'20171020' 连接市场数据: RspInfo(ErrorID=0, ErrorMsg=b'CTP:No Error')

我注册了simnow的模拟账号,配置文件也都改了,怎么用起来呢?比如下单、获取行情,能给个示例文件吗?

`(rqalpha) albert@albert-ThinkPad-X240:~/Documents/rqalpha-master/rqalpha/examples$ python run_code_demo.py [2018-07-25 21:14:22.792825] DEBUG: basic_system_log: {'base': {'accounts': {'STOCK': 100000.0}, 'benchmark': '000300.XSHG', 'data_bundle_path': '/home/albert/.rqalpha/bundle', 'end_date': datetime.date(2016, 12, 1), 'frequency': '1d', 'init_positions': [], 'margin_multiplier': 1, 'persist': False, 'persist_mode': PERSIST_MODE.REAL_TIME,...

``` def make_underlying_symbol(id_or_symbol): id_or_symbol = bytes2str(id_or_symbol) if six.PY2: return filter(lambda x: x not in '0123456789 ', id_or_symbol).upper() else: return ''.join(list(filter(lambda x: x not in '0123456789 ', 'rb1705'))).upper() ``` python3的所有的make_underlying_symbol 都会返回RB

环境: * rqalpha==3.0.6 * rqalpha-mod-ctp==0.2.0 * python==3.4.5 现象: 1. 实盘中出现以下错误: ``` Traceback (most recent call last): File "TraderApi.pyx", line 841, in ctp._TraderApi.TraderSpi_OnRtnTrade (ctp/TraderApi.cpp:21981) File "/home/nsls/anaconda2/envs/rqalpha-env/lib/python3.4/site-packages/rqalpha_mod_ctp/ctp/api.py", line 297, in OnRtnTrade self.gateway.on_trade(trade_dict)...