coinbasepro-csharp icon indicating copy to clipboard operation
coinbasepro-csharp copied to clipboard

IOC/FAK canceled orders at near spot price doesn't call back OnDoneReceived.

Open prozerran opened this issue 3 years ago • 3 comments

IOC/FAK canceled orders are never called back to WebSocket_OnDoneReceived(object sender, WebfeedEventArgs<Done> e)

The Done.DoneReasonType.Canceled are not called in the cases where the price is VERY close to the actual price.

For example, if current BTC price is 40,000, and you create a BUY Limit IOC/FAK order at a few dollars short of 40,000, say 39998. This order should be immediately not filled and canceled, which it DID in Coinbase Pro. Coinbase Pro does show this canceled order, but the library do not call back to WebSocket_OnDoneReceived(object sender, WebfeedEventArgs<Done> e) with Done.DoneReasonType.Canceled.

However, if the price is much further apart say, > $50, then i get the canceled callback. But NOT if the price is < ~$5.

prozerran avatar Jun 23 '21 12:06 prozerran

hi. there is no logic around price that exists in this library - it simply receives the "Done" messages from the WebSocket and treats all messages the same. It sounds like it is just not being sent back from Coinbase Pro with that ResponseType.

The only thing I can recommend is that maybe it's coming through from a different event. The full list of events are here: https://github.com/dougdellolio/coinbasepro-csharp/blob/master/CoinbasePro/WebSocket/IWebSocket.cs

If this doesn't solve the issue, you may want to submit a support ticket to get some clarification from them directly as I am not sure there is anything to fix on this end

dougdellolio avatar Jun 23 '21 13:06 dougdellolio

But can you verify the issue exist as well on your end? Perhaps you can help submit the report as I am not faimilar with their Rest Api. I am only leveraging on your library as a bridge to connect with them.

prozerran avatar Jun 23 '21 17:06 prozerran

If the Order was placed that close to the current trading price; That is correct behavior as the order was never "Open" so no "Done" message would be sent. Check to make sure an Open message was created for that order if not it was canceled. Disclaimer: Base on knowing the Coinbase Pro API. Day 1 with this library.

RobertMeffe avatar Jul 08 '21 14:07 RobertMeffe