JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.05k stars 429 forks source link

`Binance.Net.Objects.Models.Futures.BinanceFuturesOrder` Incorrect json map #1334

Open XHighIntell opened 11 months ago

XHighIntell commented 11 months ago

Describe the bug

  1. Places an new limit order at future (quantity = 0.004), wait for order to be FILLED
  2. Get order by using UsdFuturesApi.Trading.GetOrderAsync(symbol, orderId)
  3. Result is QuantityFilled is zero

image

Here is raw response from /fapi/v1/order?symbol=BTCUSDT&orderid=123 image

image

You maped cumQty to QuantityFilled. cumQty does not exist in response. You maped executedQty to LastFilledQuantity that should be QuantityFilled

dante1989 commented 11 months ago

Thank you. How about Coin-m Future? the same problem?

XHighIntell commented 11 months ago

@dante1989 I don't use Coin-M Future, I can't send real request right now.

Look at the document, Coin-M Future has some fields that are different. https://binance-docs.github.io/apidocs/delivery/en/#query-order-user_data

Looks like cumQty does not exist either. So Yes, the same problem for QuantityFilled

JKorf commented 11 months ago

Hm seems to mapped incorrectly yes. Not sure where that originates from. I'll have a look

JKorf commented 11 months ago

I've corrected the model(s), should be working correct now. Let me know if you have any issues

dante1989 commented 10 months ago

For Example: Dim ItemOrderBinance_USD As WebCallResult(Of BinanceUsdFuturesOrder) ItemOrderBinance_USD = Await clientFutureBinance.UsdFuturesApi.Trading.GetOrderAsync(Symbol, , ClientOrderId)

How could I make new ItemOrderBinance (class BinanceFuturesOrder) by converting from Class BinanceUsdFuturesOrder or copying the same properties from BinanceUsdFuturesOrder. For me, I like to combine BinanceUsdFuturesOrder and BinanceFuturesOrder Like Old Version (Version 9.3.0 - 26 Dec 2023) because I write a bot for USD future and Coin Future all in 1