burakoner/OKEx.Net

Error setting value to 'TriggerTime' on 'Okex.Net.Objects.Trade.OkexAlgoOrder'.

Closed this issue · 3 comments

i want to cancel all algo orders by:
var st = api.GetAlgoOrderList(OkexAlgoOrderType.Conditional, instrumentId: preOrder.Symbol);
sometimes it gives this error:


[1726] Deserialize JsonSerializationException: Error setting value to 'TriggerTime' on 'Okex.Net.Objects.Trade.OkexAlgoOrder'. data: {
  "code": "0",
  "data": [
    {
      "activePx": "",
      "actualPx": "",
      "actualSide": "",
      "actualSz": "0",
      "algoId": "507432240511590400",
      "cTime": "1667253273773",
      "callbackRatio": "",
      "callbackSpread": "",
      "ccy": "",
      "clOrdId": "",
      "instId": "UNI-USDT-SWAP",
      "instType": "SWAP",
      "lever": "50",
      "moveTriggerPx": "",
      "ordId": "0",
      "ordPx": "",
      "ordType": "conditional",
      "posSide": "net",
      "pxLimit": "",
      "pxSpread": "",
      "pxVar": "",
      "quickMgnType": "",
      "reduceOnly": "false",
      "side": "buy",
      "slOrdPx": "-1",
      "slTriggerPx": "6.864",
      "slTriggerPxType": "last",
      "state": "live",
      "sz": "219",
      "szLimit": "",
      "tag": "",
      "tdMode": "cross",
      "tgtCcy": "",
      "timeInterval": "",
      "tpOrdPx": "",
      "tpTriggerPx": "",
      "tpTriggerPxType": "",
      "triggerPx": "",
      "triggerPxType": "",
      "triggerTime": ""
    }
  ],
  "msg": ""
}

It has same error when I use:
var st = api.GetAlgoOrderList(OkexAlgoOrderType.OCO, instrumentId: preOrder.Symbol);

i have stop lost and take profit record in the broker:
image

@burakoner could you please solve this issue? i need it.

Version 5.3.0 is released with this commit 1700b67
Also nuget package is available on https://www.nuget.org/packages/OKEx.Net/5.3.0