From a67f32ae23eaacf67a3dd60430ced42491ec7d29 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 7 Nov 2019 11:20:04 +0800 Subject: [PATCH] [Mod] save min_volume into spread setting --- vnpy/app/spread_trading/engine.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vnpy/app/spread_trading/engine.py b/vnpy/app/spread_trading/engine.py index a690a331..8550e0de 100644 --- a/vnpy/app/spread_trading/engine.py +++ b/vnpy/app/spread_trading/engine.py @@ -142,7 +142,8 @@ class SpreadDataEngine: spread_setting = { "name": spread.name, "leg_settings": leg_settings, - "active_symbol": spread.active_leg.vt_symbol + "active_symbol": spread.active_leg.vt_symbol, + "min_volume": spread.min_volume } setting.append(spread_setting) @@ -272,7 +273,8 @@ class SpreadDataEngine: legs.append(leg) price_multipliers[vt_symbol] = leg_setting["price_multiplier"] trading_multipliers[vt_symbol] = leg_setting["trading_multiplier"] - inverse_contracts[vt_symbol] = leg_setting.get("inverse_contract", False) + inverse_contracts[vt_symbol] = leg_setting.get( + "inverse_contract", False) spread = SpreadData( name, @@ -727,7 +729,8 @@ class SpreadStrategyEngine: strategy = self.algo_strategy_map.get(algo.algoid, None) if strategy: - self.call_strategy_func(strategy, strategy.update_spread_algo, algo) + self.call_strategy_func( + strategy, strategy.update_spread_algo, algo) def process_order_event(self, event: Event): """"""