Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i take price of the market order that has just been executed? #109

Open
ThePiLocator opened this issue Jul 23, 2018 · 1 comment

Comments

@ThePiLocator
Copy link

Issue Overview

After executing a market order, if i want to take the price i usually do:
var orders = await client.GetAllOrders(new AllOrdersRequest() { Symbol = Symbol });
price = orders.OrderByDescending(a => a.Time).FirstOrDefault().Price;
Price always equal to 0.00000

image

Package Version: ?.?.?

Repro Steps

var orders = await client.GetAllOrders(new AllOrdersRequest() { Symbol = Symbol });
price = orders.OrderByDescending(a => a.Time).FirstOrDefault().Price;

Other Information
@yetkinsari
Copy link
Contributor

Hi there. I had the same issue. I solved this by adding

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

to OrderResponse.cs

Now you can calculate the price your order executed via ExecutedQuantity (BTC) and CummulativeQuoteQuantity (USDT) after you query your filled order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants