From fe99a3ddd8cf24fad865a7c56877f09f7c3be8c9 Mon Sep 17 00:00:00 2001 From: nanoric Date: Thu, 11 Oct 2018 03:46:11 -0400 Subject: [PATCH] =?UTF-8?q?[Fix]=20Fix:=E5=A6=82=E6=9E=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9D=A0=E6=9D=86=E5=80=8D=E6=95=B0=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E4=BC=A0=E8=BF=99=E4=B8=AA=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/api/okexfuture/OkexFutureApi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnpy/api/okexfuture/OkexFutureApi.py b/vnpy/api/okexfuture/OkexFutureApi.py index c5a1a377..36057a7a 100644 --- a/vnpy/api/okexfuture/OkexFutureApi.py +++ b/vnpy/api/okexfuture/OkexFutureApi.py @@ -149,8 +149,9 @@ class OkexFutureRestClient(OkexFutureRestBase): 'contract_typ': contractType, # 合约类型:当周/下周/季度 'amount': volume, 'type': orderType, - 'lever_rate': leverRate # 杠杆倍数 }) + if leverRate: + data['lever_rate'] = leverRate # 杠杆倍数 request = self.addReq('POST', '/future_trade.do',