[Fix] 修正市价单无法下单的问题

This commit is contained in:
nanoric 2018-09-20 02:42:54 -04:00
parent 72da1ad5f8
commit 27fab6bfba

View File

@ -196,6 +196,11 @@ class RestApi(BitmexRestApi):
'orderQty': orderReq.volume,
'clOrdID': str(orderId)
}
# 市价单不能有price字段
if orderReq.priceType == PRICETYPE_MARKETPRICE:
req.pop('price')
self.addReq('POST', '/order', self.onSendOrder, postdict=req)
return vtOrderID