File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/ExchangeSharp/API/Exchanges/MEXC Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 22using System . Collections . Generic ;
33using System . Linq ;
44using System . Threading . Tasks ;
5+ using ExchangeSharp . Models ;
56using Newtonsoft . Json . Linq ;
67
78namespace ExchangeSharp
@@ -51,13 +52,15 @@ protected internal override async Task<IEnumerable<ExchangeMarket>> OnGetMarketS
5152 var symbols = await MakeJsonRequestAsync < JToken > ( "/exchangeInfo" , BaseUrl ) ;
5253
5354 return ( symbols [ "symbols" ] ?? throw new ArgumentNullException ( ) )
54- . Select ( symbol => new ExchangeMarket ( )
55+ . Select ( symbol => new ExchangeMarketMexc ( )
5556 {
5657 MarketSymbol = symbol [ "symbol" ] . ToStringInvariant ( ) ,
5758 IsActive = symbol [ "isSpotTradingAllowed" ] . ConvertInvariant < bool > ( ) ,
5859 MarginEnabled = symbol [ "isMarginTradingAllowed" ] . ConvertInvariant < bool > ( ) ,
5960 BaseCurrency = symbol [ "baseAsset" ] . ToStringInvariant ( ) ,
6061 QuoteCurrency = symbol [ "quoteAsset" ] . ToStringInvariant ( ) ,
62+ BaseAssetPrecision = symbol [ "baseAssetPrecision" ] . ConvertInvariant < int > ( ) ,
63+ QuoteAssetPrecision = symbol [ "quoteAssetPrecision" ] . ConvertInvariant < int > ( ) ,
6164 QuantityStepSize = symbol [ "baseSizePrecision" ] . ConvertInvariant < decimal > ( ) ,
6265 // Not 100% sure about this
6366 PriceStepSize =
Original file line number Diff line number Diff line change 1+ namespace ExchangeSharp . Models
2+ {
3+ public class ExchangeMarketMexc : ExchangeMarket
4+ {
5+ public int BaseAssetPrecision { get ; set ; }
6+ public int QuoteAssetPrecision { get ; set ; }
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments