hitbtc-com / hitbtc-api

HitBTC API
GNU Lesser General Public License v3.0
322 stars 152 forks source link

WebSocket cancelReplaceOrder will not cancel originalRequestClientOrderId, if replaced before #243

Closed alexander-hagen closed 4 years ago

alexander-hagen commented 4 years ago

WebSocket cancelReplaceOrder will not cancel the originalRequestClientOrderId, if the order was replaced before.

L-20200531154208159-M-00118 replaced by L-20200531154208159-B-00119. This cancels L-20200531154208159-M-00118 and creates L-20200531154208159-B-00119.

Then, L-20200531154208159-B-00119 replaced by L-20200531154208159-A-00120. This does not cancel L-20200531154208159-B-00119 and also creates L-20200531154208159-A-00120. So there are 2 active orders.

[{"id":"****","clientOrderId":"L-20200531154208159-B-00119","symbol":"BCNBTC","side":"buy","status":"new","type":"limit","timeInForce":"GTC","quantity":"2013900","price":"0.00000001001","cumQuantity":"0","createdAt":"2020-05-31T13:42:08.167Z","updatedAt":"2020-05-31T13:44:51.846Z","postOnly":false,"reportType":"replaced","originalRequestClientOrderId":"L-20200531154208159-M-00118"},

{"id":"****","clientOrderId":"L-20200531154208159-A-00120","symbol":"BCNBTC","side":"buy","status":"new","type":"limit","timeInForce":"GTC","quantity":"2002700","price":"0.00000001001","cumQuantity":"0","createdAt":"2020-05-31T13:42:08.167Z","updatedAt":"2020-05-31T13:51:27.660Z","postOnly":false,"reportType":"replaced","originalRequestClientOrderId":"L-20200531154208159-B-00119"}]

alexander-hagen commented 4 years ago

Have replaced this by cancelOrder and newOrder