ExchangeSharp icon indicating copy to clipboard operation
ExchangeSharp copied to clipboard

Request/Advice: Implementing Websocket version of OnGetCompletedOrderDetailsAsync for Kraken

Open jdx-john opened this issue 3 years ago • 1 comments

We already implement this REST API https://docs.kraken.com/rest/#operation/getTradeHistory through OnGetCompletedOrderDetailsAsync. Kraken also provide a WebSocket equivalent that notifies you of your own trades: https://docs.kraken.com/websockets/#message-ownTrades. This is not implemented. The raw code should be quite simple but I'm not sure on the design:

  • A similar Kraken websocket API openOrders is implemented via OnGetPositionsWebSocketAsync which seems odd
  • I don't know if other exchanges have an equivalent to ownTrades.

Is there an obvious signature to use for this? It's something I'd find useful (I think) so I'm keen to write it.

jdx-john avatar Oct 27 '21 18:10 jdx-john

Yes, it looks like the wrong method was implemented.

Kraken also provide a WebSocket equivalent that notifies you of your own trades: https://docs.kraken.com/websockets/#message-ownTrades. This is not implemented. The raw code should be quite simple but I'm not sure on the design:

Looks like ownTrades should be implemented in GetCompletedOrderDetailsWebSocketAsync(). Would that work for you?

  • A similar Kraken websocket API openOrders is implemented via OnGetPositionsWebSocketAsync which seems odd
  • I don't know if other exchanges have an equivalent to ownTrades.

Yes, it looks like the openOrders should be implemented in GetOrderDetailsWebSocketAsync() instead of OnGetPositionsWebSocketAsync()

vslee avatar Oct 27 '21 23:10 vslee