diff --git a/vnpy/trader/gateway/bitmexGateway/bitmexGateway.py b/vnpy/trader/gateway/bitmexGateway/bitmexGateway.py index 599ead71..b55c3309 100644 --- a/vnpy/trader/gateway/bitmexGateway/bitmexGateway.py +++ b/vnpy/trader/gateway/bitmexGateway/bitmexGateway.py @@ -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