From ab929f196acfb65749f3693d1de0639c0cccccdd Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 22 Mar 2019 21:39:36 +0800 Subject: [PATCH] [Add]stop_supported member data of ContractData object --- vnpy/gateway/bitmex/bitmex_gateway.py | 1 + vnpy/trader/object.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vnpy/gateway/bitmex/bitmex_gateway.py b/vnpy/gateway/bitmex/bitmex_gateway.py index 6db75147..bf35dcc1 100644 --- a/vnpy/gateway/bitmex/bitmex_gateway.py +++ b/vnpy/gateway/bitmex/bitmex_gateway.py @@ -606,6 +606,7 @@ class BitmexWebsocketApi(WebsocketClient): product=Product.FUTURES, pricetick=d["tickSize"], size=d["lotSize"], + stop_supported=True, gateway_name=self.gateway_name, ) diff --git a/vnpy/trader/object.py b/vnpy/trader/object.py index 0c65f95f..1fa897be 100644 --- a/vnpy/trader/object.py +++ b/vnpy/trader/object.py @@ -233,8 +233,10 @@ class ContractData(BaseData): size: int pricetick: float + stop_supported: bool = False # whether server supports stop order + option_strike: float = 0 - option_underlying: str = "" # vt_symbol of underlying contract + option_underlying: str = "" # vt_symbol of underlying contract option_type: OptionType = None option_expiry: datetime = None