diff --git a/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs b/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs index 0c5c341b..613d7153 100644 --- a/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using ExchangeSharp.Models; using Newtonsoft.Json.Linq; namespace ExchangeSharp @@ -51,13 +52,15 @@ protected internal override async Task> OnGetMarketS var symbols = await MakeJsonRequestAsync("/exchangeInfo", BaseUrl); return (symbols["symbols"] ?? throw new ArgumentNullException()) - .Select(symbol => new ExchangeMarket() + .Select(symbol => new ExchangeMarketMexc() { MarketSymbol = symbol["symbol"].ToStringInvariant(), IsActive = symbol["isSpotTradingAllowed"].ConvertInvariant(), MarginEnabled = symbol["isMarginTradingAllowed"].ConvertInvariant(), BaseCurrency = symbol["baseAsset"].ToStringInvariant(), QuoteCurrency = symbol["quoteAsset"].ToStringInvariant(), + BaseAssetPrecision = symbol["baseAssetPrecision"].ConvertInvariant(), + QuoteAssetPrecision = symbol["quoteAssetPrecision"].ConvertInvariant(), QuantityStepSize = symbol["baseSizePrecision"].ConvertInvariant(), // Not 100% sure about this PriceStepSize = diff --git a/src/ExchangeSharp/API/Exchanges/MEXC/Models/ExchangeMarketMexc.cs b/src/ExchangeSharp/API/Exchanges/MEXC/Models/ExchangeMarketMexc.cs new file mode 100644 index 00000000..8b59ddf5 --- /dev/null +++ b/src/ExchangeSharp/API/Exchanges/MEXC/Models/ExchangeMarketMexc.cs @@ -0,0 +1,8 @@ +namespace ExchangeSharp.Models +{ + public class ExchangeMarketMexc : ExchangeMarket + { + public int BaseAssetPrecision { get; set; } + public int QuoteAssetPrecision { get; set; } + } +}