bchavez / Coinbase.Pro

:chart_with_upwards_trend: A .NET/C# implementation of the Coinbase Pro API.

Home Page:https://docs.pro.coinbase.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing Exponential Numbers

cduvall opened this issue · comments

Some books return exponential numbers (e.g., "7e-7" for markets like "BCH-BTC") as valid values. Instead of reading as a decimal, it can be read as a string and parsed with decimal.Parse

decimal.Parse("7e-7", System.Globalization.NumberStyles.Any)

Known Newtonsoft.Json issue: JamesNK/Newtonsoft.Json#1711

Using the sandbox ws feed does not seem to demonstrate this issue, so for integration testing try the production uri (wss://ws-feed.pro.coinbase.com).

Thanks for the bug report Christian.

The issue was ultimately resolved by taking a hard dependency on the fix inside Newtonsoft.Json at v12.0.1.

https://www.nuget.org/packages/Coinbase.Pro/2.0.3

Thanks,
Brian

🚶‍♂️ 🚶‍♀️ Missing Persons - Walking in L.A.