File tree 2 files changed +12
-1
lines changed
src/ExchangeSharp/API/Exchanges/MEXC
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Threading . Tasks ;
5
+ using ExchangeSharp . Models ;
5
6
using Newtonsoft . Json . Linq ;
6
7
7
8
namespace ExchangeSharp
@@ -51,13 +52,15 @@ protected internal override async Task<IEnumerable<ExchangeMarket>> OnGetMarketS
51
52
var symbols = await MakeJsonRequestAsync < JToken > ( "/exchangeInfo" , BaseUrl ) ;
52
53
53
54
return ( symbols [ "symbols" ] ?? throw new ArgumentNullException ( ) )
54
- . Select ( symbol => new ExchangeMarket ( )
55
+ . Select ( symbol => new ExchangeMarketMexc ( )
55
56
{
56
57
MarketSymbol = symbol [ "symbol" ] . ToStringInvariant ( ) ,
57
58
IsActive = symbol [ "isSpotTradingAllowed" ] . ConvertInvariant < bool > ( ) ,
58
59
MarginEnabled = symbol [ "isMarginTradingAllowed" ] . ConvertInvariant < bool > ( ) ,
59
60
BaseCurrency = symbol [ "baseAsset" ] . ToStringInvariant ( ) ,
60
61
QuoteCurrency = symbol [ "quoteAsset" ] . ToStringInvariant ( ) ,
62
+ BaseAssetPrecision = symbol [ "baseAssetPrecision" ] . ConvertInvariant < int > ( ) ,
63
+ QuoteAssetPrecision = symbol [ "quoteAssetPrecision" ] . ConvertInvariant < int > ( ) ,
61
64
QuantityStepSize = symbol [ "baseSizePrecision" ] . ConvertInvariant < decimal > ( ) ,
62
65
// Not 100% sure about this
63
66
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