glitch100 / BinanceDotNet

Official C# Wrapper for the Binance exchange API, with REST and WebSocket endpoints
https://www.nuget.org/packages/BinanceDotNet/
MIT License
161 stars 138 forks source link

Get the fill price and quote quantity on a filled order. #144

Closed yetkinsari closed 5 years ago

yetkinsari commented 5 years ago

Issue Overview

I could not get the fill price on a previous market order i submitted after i queried it because price is always zero on the OrderResponse.

Package Version: 4.9.1

Master head revision source code.

Repro Steps

Get all your previous orders. Pick a market order that filled before. Check it's order response. Price is always zero.

Other Information

As a work around I added

 [DataMember(Order = 15)]
        [JsonProperty(PropertyName = "cummulativeQuoteQty")]
        public decimal CummulativeQuoteQuantity { get; set; }

to the end of OrderResponse class to get my quote coin quantity. Then i calculated the executed price manually from ExecutedQuantity and CummulativeQuoteQuantity which seem to be correctly returned from the server.

If you approve this, please make a similar change so we can know our executed price and executed quote quantity.

BR

glitch100 commented 5 years ago

Would you like to make a PR for this?

yetkinsari commented 5 years ago

Sure. I will do it today.

yetkinsari commented 5 years ago

PR created: https://github.com/glitch100/BinanceDotNet/pull/151