Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

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

Closed
overstartup opened this issue Oct 31, 2022 · 3 comments

Comments

@overstartup
Copy link

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": ""
}
@overstartup
Copy link
Author

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

@overstartup
Copy link
Author

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

@burakoner
Copy link
Owner

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

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

No branches or pull requests

2 participants