[Mod] save min_volume into spread setting
This commit is contained in:
parent
b056901a38
commit
a67f32ae23
@ -142,7 +142,8 @@ class SpreadDataEngine:
|
|||||||
spread_setting = {
|
spread_setting = {
|
||||||
"name": spread.name,
|
"name": spread.name,
|
||||||
"leg_settings": leg_settings,
|
"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)
|
setting.append(spread_setting)
|
||||||
|
|
||||||
@ -272,7 +273,8 @@ class SpreadDataEngine:
|
|||||||
legs.append(leg)
|
legs.append(leg)
|
||||||
price_multipliers[vt_symbol] = leg_setting["price_multiplier"]
|
price_multipliers[vt_symbol] = leg_setting["price_multiplier"]
|
||||||
trading_multipliers[vt_symbol] = leg_setting["trading_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(
|
spread = SpreadData(
|
||||||
name,
|
name,
|
||||||
@ -727,7 +729,8 @@ class SpreadStrategyEngine:
|
|||||||
strategy = self.algo_strategy_map.get(algo.algoid, None)
|
strategy = self.algo_strategy_map.get(algo.algoid, None)
|
||||||
|
|
||||||
if strategy:
|
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):
|
def process_order_event(self, event: Event):
|
||||||
""""""
|
""""""
|
||||||
|
Loading…
Reference in New Issue
Block a user