JKorf / Bitget.Net

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

Mistake Values in Bitget.Net.Enums.V2.OrderSide #35

Open dante1989 opened 2 months ago

dante1989 commented 2 months ago

Dim BitgetOpenOrders_Algo = Await clientBitget.FuturesApiV2.Trading.GetOpenTriggerOrdersAsync(BitgetProductTypeV2.UsdtFutures, BitgetFuturesPlanType.NormalPlan, Symbol_USDFutureV2)

i got: BitgetOpenOrders_Algo.Data.Orders(0).PositionSide=Bitget.Net.Enums.V2.PositionSide.Long BitgetOpenOrders_Algo.Data.Orders(0).Side = Bitget.Net.Enums.V2.OrderSide.Buy BitgetOpenOrders_Algo.Data.Orders(0).TradeSide=Bitget.Net.Enums.V2.TradeSide.Close

I think side should be "Sell" because this order is stop loss for Long position in hedge mode

dante1989 commented 2 months ago

Sometimes side is Correct, Most of time side is not corect. i do not know why?

dante1989 commented 2 months ago

I think if order is Open Order, it will be correct. And if order is close order, it will not be correct

dante1989 commented 2 months ago

as i see, if the order is open order and is Stop Market, the price has no value, The side will be Correct if the order is close order and is Stop Limit, the price has a value, The side will not be Correct I'm not sure for other cases

JKorf commented 2 months ago

Can you check what the value is the server sends? If it doesn't send a value it might default to buy, so that might be the issue. If the server sends buy then it's not really fixable