You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The issue I faced was with Trades stream. BinanceStreamTrade.BuyerIsMaker was always True, so my guess was that it is picking from "M" field in JSON. The way I proove it is simple (see below). Unfortunately, it looks like there is no fix from Newtonsoft (JamesNK/Newtonsoft.Json#815). May be having below solution will be ok for your releases, anyway it's up to you. This issue may popup some other places too, but so far I notices only this.
public class BinanceStreamTrade: BinanceStreamEvent
{
...
// added this so it will pick M, and m will be where it should be.
// I have no idea why it works, but...
[JsonProperty("M")]
public bool Ignore { get; set; }
[JsonProperty("m")]
public bool BuyerIsMaker { get; set; }
The text was updated successfully, but these errors were encountered:
wallace1981
changed the title
Case-insensitive deserializition... Aargh
Case-insensitive deserialization... Aargh
Mar 12, 2018
Hi, I've seen this issue before yes, Solution is as you noted, add a property to map the unused property to make sure the other one gets mapped properly. I've fixed this in the latest version (3.0.9). Thanks for notifying me of this!
Hi,
The issue I faced was with Trades stream. BinanceStreamTrade.BuyerIsMaker was always True, so my guess was that it is picking from "M" field in JSON. The way I proove it is simple (see below). Unfortunately, it looks like there is no fix from Newtonsoft (JamesNK/Newtonsoft.Json#815). May be having below solution will be ok for your releases, anyway it's up to you. This issue may popup some other places too, but so far I notices only this.
...
// added this so it will pick M, and m will be where it should be.
// I have no idea why it works, but...
[JsonProperty("M")]
public bool Ignore { get; set; }
[JsonProperty("m")]
public bool BuyerIsMaker { get; set; }
The text was updated successfully, but these errors were encountered: