burakoner / OKX.Api

Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper
MIT License
39 stars 15 forks source link

spotTraderInsts type had been changed in api #54

Closed hesam-javadi closed 7 months ago

hesam-javadi commented 7 months ago

I think the spotTraderInsts return field in the GetAccountConfiguration route had been changed to array from string, giving me an error. The following is the error message each time I try to use the route:

[1] Deserialize JsonReaderException: Error reading string. Unexpected token: StartArray. Path 'data[0].spotTraderInsts', line 1, position 397. Path: data[0].spotTraderInsts, LineNumber: 1, LinePosition: 397, data: {
  "code": "0",
  "data": [
    {
      "acctLv": "2",
      "autoLoan": false,
      "ctIsoMode": "automatic",
      "greeksType": "PA",
      "ip": "",
      "kycLv": "0",
      "label": "copytrade_test1",
      "level": "Lv1",
      "levelTmp": "",
      "liquidationGear": "-1",
      "mainUid": "---",
      "mgnIsoMode": "quick_margin",
      "opAuth": "0",
      "perm": "read_only,withdraw,trade",
      "posMode": "long_short_mode",
      "roleType": "0",
      "spotOffsetType": "",
      "spotRoleType": "0",
      "spotTraderInsts": [],
      "traderInsts": [],
      "uid": "---"
    }
  ],
  "msg": ""
}
burakoner commented 7 months ago

Thank you for your feedback and merge request

burakoner commented 7 months ago

I've fixed in new version