question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetExchangeInfoAsync() fails

See original GitHub issue

SpotApi.ExchangeData.GetExchangeInfoAsync() fails with this error:

{: Deserialize Unknown Exception: ArgumentNullException - Value cannot be null. (Parameter 'item')
   at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(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.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(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.CreateValueInternal(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.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at CryptoExchange.Net.BaseClient.DeserializeAsync[T](Stream stream, JsonSerializer serializer, Nullable`1 requestId, Nullable`1 elapsedMilliseconds)
 [Data only available in Debug LogLevel]}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:30 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JKorfcommented, Feb 25, 2022

Hi everyone, I just woke up so sorry for a bit of a delay. I’ve added the missing enum value as suggested and it fixes the issue. The new version 8.0.3 should be available in a bit. Thanks for investigating the issue.

1reaction
hossamnewcommented, Jul 12, 2022

Should be fixed with 8.1.5 I also adjusted the deserialization so it doesn’t fail the deserialization entirely when a new account type is added, but a warning is logged instead

Worked like a charm, Many thanks for your fast response 😇☺️

Read more comments on GitHub >

github_iconTop Results From Across the Web

JKorf/Binance.Net: .Net API wrapper for the Binance web API
GetExchangeInfoAsync() ; Updated CryptoExchange. ... causing error when deserializing GetExchangeInfoAsync; Fixed future deserialization failing when there's ...
Read more >
Examples | Binance.Net
GetExchangeInfoAsync (); // Getting ticker var spotTickerData = await binanceRestClient.SpotApi. ... Success) { // Handler failure return; } var sub = await ...
Read more >
Issue with generic taking some unrelated type, in F# - ...
The problem here is that pf is defined as a value, not a function, so the compiler is inferring that it has a...
Read more >
Binance.Net
Error ); var rulesCheck = await CheckTradeRules(symbol, quansaty, price, stopPrice, type, ct).ConfigureAwait(false); if (! ... GetExchangeInfoAsync(ct).
Read more >
Viewing online file analysis results for 'BoomTrader_2.exe'
GetExchangeInfoAsync. Ansi based on Memory/File Scan (cc5f05a76853fb7ec4fe80e37b928b0aaad475d741358687d860cbaf65d6d24b.bin). GetExecutingAssembly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found