burakoner / OKEx.Net

Open source .Net API wrapper for the @OKEx V5 Rest API and V5 Websocket API
MIT License
86 stars 48 forks source link

Error setting value to 'QuantityType' on 'Okex.Net.Objects.Trade.OkexAlgoOrder'. #72

Closed overstartup closed 1 year ago

overstartup commented 1 year ago

i have error in getting list stop lost: var st2 = api.GetAlgoOrderList(**OkexAlgoOrderType.Conditional**, instrumentId: preOrder.Symbol);

https://www.okx.com/api/v5/trade/orders-algo-pending?instId=BCH-USDT-SWAP&limit=100&ordType=conditional

error: Deserialize JsonSerializationException: Error setting value to 'QuantityType' on 'Okex.Net.Objects.Trade.OkexAlgoOrder'.

The stop lost added by type 'conditional' too: var StopProfitResult = api.PlaceAlgoOrder(preOrder.Symbol, trademode, orderSide, **OkexAlgoOrderType.Conditional**, preOrder.Quantity, positionSide: positionSide, slOrderPrice: -1, slTriggerPrice: preOrder.StopLostPrice);

burakoner commented 1 year ago

Fixed in version 5.2.6 Github Commit: https://github.com/burakoner/OKEx.Net/commit/de2a4cd1b698433cf112177900e68435d9f4484e Nuget Package: https://www.nuget.org/packages/OKEx.Net/5.2.6