From aa09f30f068ce4c4697a7ddc1d424d1e9f711aa2 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Thu, 26 Mar 2020 07:09:55 +0800 Subject: [PATCH] [bug fix] --- Q_n_A.md | 2 +- vnpy/amqp/test02_task.py | 2 +- vnpy/gateway/ctp/ctp_gateway.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Q_n_A.md b/Q_n_A.md index 87da4c34..dab68975 100644 --- a/Q_n_A.md +++ b/Q_n_A.md @@ -50,7 +50,7 @@ /usr/local/lib/libta_lib.so.0 vi /etc/profile 添加 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib source /etc/profile 9、数字货币的增量安装 diff --git a/vnpy/amqp/test02_task.py b/vnpy/amqp/test02_task.py index 75326da0..5dc5af95 100644 --- a/vnpy/amqp/test02_task.py +++ b/vnpy/amqp/test02_task.py @@ -15,7 +15,7 @@ if __name__ == '__main__': mission.update({'id': str(uuid1())}) mission.update({'templateName': u'TWAP 时间加权平均'}) mission.update({'direction': Direction.LONG}) - mission.update({'vtSymbol': '518880'}) + mission.update({'vt_symbol': '518880'}) mission.update({'is_stock': True}) mission.update({'totalVolume': 300}) mission.update({'target_price': 3.20}) diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index b83a4a9a..891cb904 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -1158,7 +1158,7 @@ class TdxMdApi(): self.symbol_exchange_dict = {} # tdx合约与vn交易所的字典 self.symbol_market_dict = {} # tdx合约与tdx市场的字典 - self.symbol_vn_dict = {} # tdx合约与vtSymbol的对应 + self.symbol_vn_dict = {} # tdx合约与vt_symbol的对应 self.symbol_tick_dict = {} # tdx合约与最后一个Tick得字典 self.registered_symbol_set = set() @@ -1691,22 +1691,22 @@ class TickCombiner(object): if (self.last_leg1_tick.ask_price_1 == 0 or self.last_leg1_tick.bid_price_1 == self.last_leg1_tick.limit_up) \ and self.last_leg1_tick.ask_volume_1 == 0: self.gateway.write_log( - u'leg1:{0}涨停{1},不合成价差Tick'.format(self.last_leg1_tick.vtSymbol, self.last_leg1_tick.bid_price_1)) + u'leg1:{0}涨停{1},不合成价差Tick'.format(self.last_leg1_tick.vt_symbol, self.last_leg1_tick.bid_price_1)) return if (self.last_leg1_tick.bid_price_1 == 0 or self.last_leg1_tick.ask_price_1 == self.last_leg1_tick.limit_down) \ and self.last_leg1_tick.bid_volume_1 == 0: self.gateway.write_log( - u'leg1:{0}跌停{1},不合成价差Tick'.format(self.last_leg1_tick.vtSymbol, self.last_leg1_tick.ask_price_1)) + u'leg1:{0}跌停{1},不合成价差Tick'.format(self.last_leg1_tick.vt_symbol, self.last_leg1_tick.ask_price_1)) return if (self.last_leg2_tick.ask_price_1 == 0 or self.last_leg2_tick.bid_price_1 == self.last_leg2_tick.limit_up) \ and self.last_leg2_tick.ask_volume_1 == 0: self.gateway.write_log( - u'leg2:{0}涨停{1},不合成价差Tick'.format(self.last_leg2_tick.vtSymbol, self.last_leg2_tick.bid_price_1)) + u'leg2:{0}涨停{1},不合成价差Tick'.format(self.last_leg2_tick.vt_symbol, self.last_leg2_tick.bid_price_1)) return if (self.last_leg2_tick.bid_price_1 == 0 or self.last_leg2_tick.ask_price_1 == self.last_leg2_tick.limit_down) \ and self.last_leg2_tick.bid_volume_1 == 0: self.gateway.write_log( - u'leg2:{0}跌停{1},不合成价差Tick'.format(self.last_leg2_tick.vtSymbol, self.last_leg2_tick.ask_price_1)) + u'leg2:{0}跌停{1},不合成价差Tick'.format(self.last_leg2_tick.vt_symbol, self.last_leg2_tick.ask_price_1)) return if self.trading_day != tick.trading_day: