BitMEX invalid argument clOrdID
Atom
10.02.2019
vsmt


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);
bitMEX.csv 8 KB (380)

Теги:


Спасибо:


Support

Фотография
Дата: 11.02.2019
Ответить


Thank you for your feedback. This error mean the order already inactive. Sometimes orders fill before cancel.
Спасибо:

vsmt

Фотография
Дата: 11.02.2019
Ответить


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[T](Uri url, IRestRequest request)
at StockSharp.Bitmex.Native.HttpClient.AmendOrder(String originClientOrderId, String orderId, String clientOrderId, Nullable`1 price, Nullable`1 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

Фотография
Дата: 11.02.2019
Ответить


I have informed dev team. Please wait for a while.
Спасибо:

kyle Qian

Фотография
Дата: 19.03.2019
Ответить


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

Фотография
Дата: 19.03.2019
Ответить


The issue already fixed in our platform.
Спасибо:


Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy