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

api.GetInstruments error Error setting value to 'state' #95

Closed SergPlusPlus closed 1 year ago

SergPlusPlus commented 1 year ago

api.GetInstruments(OkexInstrumentType.Swap);

Problem in this: "state": "test",

[1] Deserialize JsonSerializationException: Error setting value to 'state' on 'Okex.Net.Objects.Public.OkexInstrument'. data: { "code": "0", "data": [ { "alias": "", "baseCcy": "", "category": "1", "ctMult": "1", "ctType": "linear", "ctVal": "10", "ctValCcy": "GLMR", "expTime": "", "instFamily": "GLMR-USDT", "instId": "GLMR-USDT-SWAP", "instType": "SWAP", "lever": "20", "listTime": "", "lotSz": "1", "maxIcebergSz": "", "maxLmtSz": "100000000", "maxMktSz": "25000", "maxStopSz": "25000", "maxTriggerSz": "", "maxTwapSz": "", "minSz": "1", "optType": "", "quoteCcy": "", "settleCcy": "USDT", "state": "test", "stk": "", "tickSz": "0.0001", "uly": "GLMR-USDT" }, ................

burakoner commented 1 year ago

I've added Test option in OkexInstrumentState enum. I'll release new version this evening. Thank you for feedback

burakoner commented 1 year ago

Version 5.3.3 released https://github.com/burakoner/OKEx.Net/commit/d8e82c16220fca579e90f58faab881f7e991965c https://www.nuget.org/packages/OKEx.Net/5.3.3