DigitalRuby / ExchangeSharp

ExchangeSharp is a powerful, fast and easy to use .NET/C# API for interfacing with many crypto currency exchanges. REST and web sockets are supported.
https://www.digitalruby.com
MIT License
735 stars 374 forks source link

Request/Advice: Implementing Websocket version of OnGetCompletedOrderDetailsAsync for Kraken #681

Open jdx-john opened 2 years ago

jdx-john commented 2 years ago

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:

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.

vslee commented 2 years ago

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()