System.InvalidOperationException: Can't convert { "closed": { "OX6JIK-2LGLR-NT5O6X": { "refid": null, "userref": 52122451, "status": "closed", "reason": null, "opentm": 1564576200.0848, "closetm": 1564576200.0909, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "market", "price": "0", "price2": "0", "leverage": "none", "order": "buy 0.05000000 XBTUSD @ market", "close": "" }, "vol": "0.05000000", "vol_exec": "0.05000000", "cost": "490.9", "fee": "1.2", "price": "9819.3", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "TRBBTS-QI7RN-VD6EDJ" ] }, "OQFMGA-A6WRM-M452L4": { "refid": null, "userref": 47364446, "status": "canceled", "reason": "User requested", "opentm": 1564571421.9791, "closetm": 1564571615.3294, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "limit", "price": "9689.8", "price2": "0", "leverage": "none", "order": "buy 0.05000000 XBTUSD @ limit 9689.8", "close": "" }, "vol": "0.05000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "OHYA2S-UVV5O-HNV7F7": { "refid": null, "userref": 0, "status": "canceled", "reason": "User requested", "opentm": 1564340136.964, "closetm": 1564344059.2475, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "stop-loss", "price": "9490.0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ stop loss 9490.0", "close": "" }, "vol": "0.10000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "OMVVPW-EU7ZM-4ZETHQ": { "refid": null, "userref": 0, "status": "closed", "reason": null, "opentm": 1564344052.1519, "closetm": 1564344052.1566, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "market", "price": "0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ market with 5:1 leverage", "close": "" }, "vol": "0.10000000", "vol_exec": "0.10000000", "cost": "953.6", "fee": "2.4", "price": "9536.0", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "TX5DTM-U7J7R-LAY5Q4" ] }, "OSRJLV-64OOO-2B3OX5": { "refid": null, "userref": 0, "status": "canceled", "reason": "User requested", "opentm": 1564340122.1437, "closetm": 1564340136.7258, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "stop-loss", "price": "9500.0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ stop loss 9500.0", "close": "" }, "vol": "0.10000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "OAOE3P-KR77G-NN5ELN": { "refid": "OT4NO6-VBV4I-W73NKN", "userref": 0, "status": "canceled", "reason": "User requested", "opentm": 1564339936.689, "closetm": 1564340121.7945, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "stop-loss", "price": "9489.0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ stop loss 9489.0", "close": "" }, "vol": "0.10000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fcib" }, "OT4NO6-VBV4I-W73NKN": { "refid": null, "userref": 0, "status": "closed", "reason": null, "opentm": 1564339936.6724, "closetm": 1564339936.6831, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "market", "price": "0", "price2": "0", "leverage": "5:1", "order": "buy 0.10000000 XBTUSD @ market with 5:1 leverage", "close": "close position @ stop loss 9489.0" }, "vol": "0.10000000", "vol_exec": "0.10000000", "cost": "952.4", "fee": "2.5", "price": "9524.4", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "TJX6ES-TNPDI-GVEHFY" ] }, "OCR6J5-YFWAH-4SDH2J": { "refid": null, "userref": 0, "status": "canceled", "reason": "User requested", "opentm": 1564337812.7241, "closetm": 1564338309.2572, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "stop-loss", "price": "9510.0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ stop loss 9510.0", "close": "" }, "vol": "0.10000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "OIZF7A-RTWKG-NL4SHJ": { "refid": null, "userref": 0, "status": "closed", "reason": null, "opentm": 1564338306.0155, "closetm": 1564338306.0541, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "market", "price": "0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ market with 5:1 leverage", "close": "" }, "vol": "0.10000000", "vol_exec": "0.10000000", "cost": "952.9", "fee": "2.4", "price": "9529.0", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "TYRUBB-PKVWV-DX5QM2" ] }, "OGNWFP-HO7SM-JJV4ML": { "refid": null, "userref": 0, "status": "canceled", "reason": "User requested", "opentm": 1564337458.5024, "closetm": 1564337812.469, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "stop-loss", "price": "9493.0", "price2": "0", "leverage": "5:1", "order": "sell 0.10000000 XBTUSD @ stop loss 9493.0", "close": "" }, "vol": "0.10000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "O3GG7H-UOCE2-DQYXWS": { "refid": null, "userref": 0, "status": "closed", "reason": null, "opentm": 1564337240.1572, "closetm": 1564337240.1752, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "market", "price": "0", "price2": "0", "leverage": "5:1", "order": "buy 0.10000000 XBTUSD @ market with 5:1 leverage", "close": "" }, "vol": "0.10000000", "vol_exec": "0.10000000", "cost": "952.9", "fee": "2.5", "price": "9529.4", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "TSL44F-ARYIK-EIEMOW" ] }, "O2UYYN-AVMEH-TIDUVZ": { "refid": null, "userref": null, "status": "closed", "reason": null, "opentm": 1564103433.5907, "closetm": 1564103433.6053, "starttm": 0, "expiretm": 0, "descr": { "pair": "USDTUSD", "type": "sell", "ordertype": "market", "price": "0", "price2": "0", "leverage": "none", "order": "sell 300.00000000 USDTUSD @ market", "close": "" }, "vol": "300.00000000", "vol_exec": "300.00000000", "cost": "299.9700", "fee": "0.5999", "price": "0.9999", "stopprice": "0.00000000", "limitprice": "0.00000000", "misc": "", "oflags": "fciq", "trades": [ "TCEYRM-N435F-CEB55H" ] }, "ODPYC4-EVMXW-JDAVB2": { "refid": null, "userref": null, "status": "closed", "reason": null, "opentm": 1564102033.9759, "closetm": 1564102033.9801, "starttm": 0, "expiretm": 0, "descr": { "pair": "USDTUSD", "type": "buy", "ordertype": "market", "price": "0", "price2": "0", "leverage": "none", "order": "buy 300.00000000 USDTUSD @ market", "close": "" }, "vol": "300.00000000", "vol_exec": "300.00000000", "cost": "300.0300", "fee": "0.6000", "price": "1.0001", "stopprice": "0.00000000", "limitprice": "0.00000000", "misc": "", "oflags": "fciq", "trades": [ "TJDC6Z-KES3Z-Q634ED" ] }, "OVR3DX-H5WIE-BHP7RU": { "refid": null, "userref": null, "status": "canceled", "reason": "User requested", "opentm": 1564094131.1287, "closetm": 1564094251.6432, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "limit", "price": "9715.0", "price2": "0", "leverage": "none", "order": "buy 0.02052496 XBTUSD @ limit 9715.0", "close": "" }, "vol": "0.02052496", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "ONLIEV-QXWE5-TCVPYJ": { "refid": null, "userref": null, "status": "canceled", "reason": "User requested", "opentm": 1564093092.4412, "closetm": 1564093114.1232, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "limit", "price": "9200.0", "price2": "0", "leverage": "none", "order": "buy 0.05391304 XBTUSD @ limit 9200.0", "close": "" }, "vol": "0.05391304", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "OCXTZM-R3HRZ-VJ4JKI": { "refid": null, "userref": null, "status": "canceled", "reason": "User requested", "opentm": 1564076998.7033, "closetm": 1564077005.9694, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "buy", "ordertype": "limit", "price": "9100.0", "price2": "0", "leverage": "5:1", "order": "buy 0.01000000 XBTUSD @ limit 9100.0 with 5:1 leverage", "close": "" }, "vol": "0.01000000", "vol_exec": "0.00000000", "cost": "0.00000", "fee": "0.00000", "price": "0.00000", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq" }, "O2CRAN-VIZWO-LBTYE6": { "refid": null, "userref": null, "status": "closed", "reason": null, "opentm": 1563806805.5941, "closetm": 1563806805.6042, "starttm": 0, "expiretm": 0, "descr": { "pair": "XBTUSD", "type": "sell", "ordertype": "market", "price": "0", "price2": "0", "leverage": "none", "order": "sell 0.07694035 XBTUSD @ market", "close": "" }, "vol": "0.07694035", "vol_exec": "0.07694035", "cost": "787.8", "fee": "2.0", "price": "10239.9", "stopprice": "0.00000", "limitprice": "0.00000", "misc": "", "oflags": "fciq", "trades": [ "THHUV4-JAFQD-P3FHJF" ] } }, "count": 17 } to type 'ClosedOrders'. ---> Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Int64'. Path 'result.closed.O2UYYN-AVMEH-TIDUVZ.userref'. ---> System.InvalidCastException: Null object cannot be converted to a value type. at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType) at Ecng.Net.NetworkHelper.DeserializeObject(JToken token, Type type) --- End of inner exception stack trace --- at Ecng.Net.NetworkHelper.DeserializeObject(JToken token, Type type) at Ecng.Net.NetworkHelper.DeserializeObject[T](JToken token) at StockSharp.Kraken.Native.HttpClient.GetClosedOrders(Boolean includeTrades, Nullable`1 userRef, Nullable`1 start, Nullable`1 end, Nullable`1 offset, String closeTime) at StockSharp.Kraken.KrakenMessageAdapter.ProcessPortfolioLookup(PortfolioLookupMessage message) at StockSharp.Kraken.KrakenMessageAdapter.OnSendInMessage(Message message) at StockSharp.Messages.MessageAdapter.SendInMessage(Message message)