dougdellolio / coinbasepro-csharp

The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
MIT License
193 stars 90 forks source link

Missing price on websocket "done" message #188

Closed beckerben closed 5 years ago

beckerben commented 5 years ago

Great work here! I have been toying with a sandbox connection and the user channel there and it is interesting that on a "done" message received on the websocket the price is 0, here's an example of the json returned below, was curious if this is just an issue connecting with the sandbox or maybe an issue with the code somewhere? It looks like price is returned in the example in the coinbase pro API docs so I thought I'd ask. I haven't tested against the live platform, only in sandbo.

2019-01-07 22:37:39.428 -05:00 [INF] Websocket event order done {"LastOrder":{"Side":"Buy","OrderId":"5321aca6-8674-46ff-b034-54a0c3ae8e3d","Reason":"Filled","ProductId":"BtcUsd","Price":0,"RemainingSize":0,"Sequence":34995716,"Time":"2019-01-08T03:37:38.4930000+00:00","Type":"Done","$type":"Done"},"$type":"WebfeedEventArgs1"}`

dougdellolio commented 5 years ago

hey @beckerben it's hard for me to test on live servers because I would have to place an order 😄

Although, I am leaning towards it being being of the sandbox environment and not the code. There is a test here: https://github.com/dougdellolio/coinbasepro-csharp/blob/master/CoinbasePro.Specs/WebSocket/WebSocketSpecs.cs#L303 that covers the Done response using the same JSON response from the api docs.

When the response is deserialized, it includes the price 👍 capture

let me know if you find anything else on this

beckerben commented 5 years ago

Perfect, I'll let you know when I switch out of sandbox mode if the issue still persists!