← Atrás

BitMEX invalid argument clOrdID

Hi, I get an invalid argument error for the BitMEX connector when the MarketQuotingStrategy tries to requote:


Error	"Order 53343094 (0x7BB32E) was not cancelled because System.InvalidOperationException: {""error"":{""message"":""Invalid argument: clOrdID"",""name"":""HTTPError""}}

I've attached the log to this post. StockSharp.Bitmex.dll version 4.4.15.0. Code snippet used to initiate the MarketQuotingStrategy:


ChildStrategies.ToList().ForEach(s => s.Stop());
var strategy = new MarketQuotingStrategy(Sides.Sell, Volume + Math.Abs(Position))
{
    WaitAllTrades = true,
};
strategy.WhenNewMyTrade().Do(OnNewOrderTrade).Apply(this);
ChildStrategies.Add(strategy);

¿Le resultó útil este tema?

Compartir tema

Comentarios (5)

Iniciar sesión o Crear cuenta, Inicie sesión o regístrese para dejar un comentario

Support
Support

Thank you for your feedback. This error mean the order already inactive. Sometimes orders fill before cancel.

vsmt
vsmt Autor

The order was still active and not filled, please look at the log:

L#19: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 14:58:02 Info Registration of new (0x7BB32E) order for Sell with price 3603 and volume 1. L#26: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 14:58:02 Info Order 53343094 (0x7BB32E) accepted by the exchange. L#41: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 14:58:46 Error "Order 53343094 (0x7BB32E) was not cancelled because System.InvalidOperationException: {error:{message:Invalid argument: clOrdID,name:HTTPError}} at StockSharp.Bitmex.Native.HttpClient.MakeRequest(Uri url, IRestRequest request) at StockSharp.Bitmex.Native.HttpClient.AmendOrder(String originClientOrderId, String orderId, String clientOrderId, Nullable1 price, Nullable1 volume) at StockSharp.Bitmex.BitmexMessageAdapter.ProcessOrderReplace(OrderReplaceMessage replaceMsg) at StockSharp.Messages.MessageAdapter.SendInMessage(Message message)."

I manually stopped the strategy at 15:01 and then the order is cancelled:

L#75: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 15:01:21 Info Cancel order 53343094 (0x7BB32E). L#76: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 15:01:21 Warning Order 53343094 (0x7BB32E) has state Active. Rule cannot be stopped. L#85: MQS_XBTUSD@BMEX_Bitmex_-KEY 10/02/2019 15:01:22 Info Order 53343094 (0x7BB32E) no longer active.

Support
Support
Support

I have informed dev team. Please wait for a while.

kyle Qian
kyle Qian

Hi, i have encounter the same issue recently. I used python API. It has been working for me for several months but it starts to throw errors recently if I try to amend the order:

400 Bad Request: {'error': {'message': 'Invalid orderID', 'name': 'HTTPError'}}

Please look into this, thanks a lot!

Support
Support

The issue already fixed in our platform.