[Fix] Fix:如果没有杠杆倍数,就不传这个参数

This commit is contained in:
nanoric 2018-10-11 03:46:11 -04:00
parent f5755b222a
commit fe99a3ddd8

View File

@ -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',