diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..abd136b
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,15 @@
+
+
+ net6.0
+ disable
+
+ latest
+
+
+
+
\ No newline at end of file
diff --git a/ccxt.net.sln b/ccxt.net.sln
index 87df432..bd490da 100644
--- a/ccxt.net.sln
+++ b/ccxt.net.sln
@@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
appveyor.yml = appveyor.yml
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
+ Directory.Build.props = Directory.Build.props
global.json = global.json
LICENSE.txt = LICENSE.txt
README.md = README.md
diff --git a/samples/binance/Program.cs b/samples/binance/Program.cs
index 0771028..9cbec5d 100644
--- a/samples/binance/Program.cs
+++ b/samples/binance/Program.cs
@@ -15,7 +15,7 @@ private static async Task Main(string[] args)
if (__step_no == 0 || __step_no == 1)
{
var _tickers = await _public_api.FetchTickersAsync();
- if (_tickers.success == true)
+ if (_tickers.success)
{
var _btcusd_tickers = _tickers.result.Where(t => t.symbol.ToUpper().Contains("BTCUSD"));
diff --git a/samples/binance/binance.csproj b/samples/binance/binance.csproj
index 75e9c12..e80eaaa 100644
--- a/samples/binance/binance.csproj
+++ b/samples/binance/binance.csproj
@@ -2,7 +2,6 @@
Exe
- net6.0
diff --git a/samples/bitmex/bitmex.csproj b/samples/bitmex/bitmex.csproj
index a85d693..55b2c7f 100644
--- a/samples/bitmex/bitmex.csproj
+++ b/samples/bitmex/bitmex.csproj
@@ -2,7 +2,6 @@
Exe
- net6.0
diff --git a/samples/bittrex/Program.cs b/samples/bittrex/Program.cs
index 9d48157..4876042 100644
--- a/samples/bittrex/Program.cs
+++ b/samples/bittrex/Program.cs
@@ -15,7 +15,7 @@ private static async Task Main(string[] args)
if (__step_no == 0 || __step_no == 1)
{
var _tickers = await _public_api.FetchTickersAsync();
- if (_tickers.success == true)
+ if (_tickers.success)
{
var _btcusd_tickers = _tickers.result.Where(t => t.symbol.ToUpper().Contains("BTC"));
diff --git a/samples/bittrex/bittrex.csproj b/samples/bittrex/bittrex.csproj
index 327f81d..4e01c34 100644
--- a/samples/bittrex/bittrex.csproj
+++ b/samples/bittrex/bittrex.csproj
@@ -2,7 +2,6 @@
Exe
- net6.0
diff --git a/samples/kraken/kraken.csproj b/samples/kraken/kraken.csproj
index a85d693..55b2c7f 100644
--- a/samples/kraken/kraken.csproj
+++ b/samples/kraken/kraken.csproj
@@ -2,7 +2,6 @@
Exe
- net6.0
diff --git a/src/Properties/PublishProfiles/FolderProfile.pubxml b/src/Properties/PublishProfiles/FolderProfile.pubxml
index b273e6a..2f2d033 100644
--- a/src/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/src/Properties/PublishProfiles/FolderProfile.pubxml
@@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
Any CPU
D:\deploy\ccxt.net
FileSystem
- net6.0
+
false
\ No newline at end of file
diff --git a/src/ccxt.net.csproj b/src/ccxt.net.csproj
index 37f3a56..d554d82 100644
--- a/src/ccxt.net.csproj
+++ b/src/ccxt.net.csproj
@@ -1,7 +1,6 @@
- net6.0
CryptoCurrency eXchange Trading Library for .NET
CCXT
ODINSOFT
@@ -18,12 +17,11 @@
false
false
CCXT.NET
- true
+ false
1.4.13
RestSharp update and upgrade to .net core 6.
1.4.13.1
1.4.13.1
- latest
false
LICENSE.txt
README.md
@@ -31,16 +29,6 @@
git
-
- bin\Debug\net472\CCXT.NET.xml
- TRACE;DEBUG
-
-
-
- bin\Release\net472\CCXT.NET.xml
- TRACE;RELEASE
-
-
diff --git a/src/exchanges/chn/bitforex/bitforex.cs b/src/exchanges/chn/bitforex/bitforex.cs
index 2457413..ac727fe 100644
--- a/src/exchanges/chn/bitforex/bitforex.cs
+++ b/src/exchanges/chn/bitforex/bitforex.cs
@@ -149,7 +149,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
{
var _request = await base.CreatePostRequestAsync(endpoint, args);
- if (IsAuthentication == true)
+ if (IsAuthentication)
{
var _params = new Dictionary();
{
@@ -224,7 +224,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
if (response != null)
{
- if (response.IsSuccessful == true)
+ if (response.IsSuccessful)
{
var _json_result = this.DeserializeObject(response.Content);
@@ -243,7 +243,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
}
}
- if (_result.success == true && response.IsSuccessful == false)
+ if (_result.success && response.IsSuccessful == false)
{
_result.SetFailure(
response.ErrorMessage ?? response.StatusDescription,
diff --git a/src/exchanges/chn/bitforex/private/privateApi.cs b/src/exchanges/chn/bitforex/private/privateApi.cs
index af52df1..8795e71 100644
--- a/src/exchanges/chn/bitforex/private/privateApi.cs
+++ b/src/exchanges/chn/bitforex/private/privateApi.cs
@@ -64,7 +64,7 @@ public override async ValueTask FetchBalanceAsync(string base_name, str
var _result = new Balance();
var _currency_id = await publicApi.LoadCurrencyIdAsync(base_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -80,10 +80,10 @@ public override async ValueTask FetchBalanceAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _balance = privateClient.DeserializeObject(_json_value.Content);
- if (_balance.success == true)
+ if (_balance.success)
{
_balance.result.currency = base_name;
@@ -115,7 +115,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary FetchBalancesAsync(Dictionary(_json_value.Content);
{
diff --git a/src/exchanges/chn/bitforex/public/publicApi.cs b/src/exchanges/chn/bitforex/public/publicApi.cs
index 916dab8..2c04043 100644
--- a/src/exchanges/chn/bitforex/public/publicApi.cs
+++ b/src/exchanges/chn/bitforex/public/publicApi.cs
@@ -53,7 +53,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary(_json_value.Content);
@@ -70,7 +70,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary FetchTickerAsync(string base_name, strin
var _result = new Ticker(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -126,7 +126,7 @@ public override async ValueTask FetchTickerAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _ticker = publicClient.DeserializeObject(_json_value.Content);
{
@@ -159,7 +159,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
var _result = new OrderBooks(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -176,10 +176,10 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orderbooks = publicClient.DeserializeObject(_json_value.Content);
- if (_orderbooks.success == true)
+ if (_orderbooks.success)
{
var _ob_asks = _orderbooks.result.asks.OrderBy(o => o.price).Take(limits).ToList();
var _ob_bids = _orderbooks.result.bids.OrderByDescending(o => o.price).Take(limits).ToList();
@@ -243,7 +243,7 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
var _result = new OHLCVs(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -264,10 +264,10 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _ohlcvs = publicClient.DeserializeObject(_json_value.Content);
- if (_ohlcvs.success == true)
+ if (_ohlcvs.success)
{
_result.result.AddRange(
_ohlcvs.result
@@ -307,7 +307,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
var _result = new CompleteOrders(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -327,7 +327,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = publicClient.DeserializeObject(_json_value.Content);
{
diff --git a/src/exchanges/chn/bitforex/trade/tradeApi.cs b/src/exchanges/chn/bitforex/trade/tradeApi.cs
index 324a609..b80a537 100644
--- a/src/exchanges/chn/bitforex/trade/tradeApi.cs
+++ b/src/exchanges/chn/bitforex/trade/tradeApi.cs
@@ -66,7 +66,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -83,7 +83,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _order = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -117,7 +117,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -134,7 +134,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orders = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -173,7 +173,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
var _result = new MyTrades(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -193,7 +193,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -237,7 +237,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -258,7 +258,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _order = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -305,7 +305,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -321,10 +321,10 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true && _json_data.data == true)
+ if (_json_data.success && _json_data.data)
{
var _order = new BPlaceOrderItem
{
@@ -371,7 +371,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -406,13 +406,13 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
if (order_ids.Length > 0)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
foreach (var _j in _json_data.result)
_result.result.Add(_j);
@@ -426,7 +426,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true && _json_data.data == true)
+ if (_json_data.success && _json_data.data)
_result.SetSuccess();
else
_result.SetFailure();
diff --git a/src/exchanges/chn/gateio/gateio.cs b/src/exchanges/chn/gateio/gateio.cs
index 3b3d75a..62e39de 100644
--- a/src/exchanges/chn/gateio/gateio.cs
+++ b/src/exchanges/chn/gateio/gateio.cs
@@ -160,7 +160,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
{
var _request = await base.CreatePostRequestAsync(endpoint, args);
- if (IsAuthentication == true)
+ if (IsAuthentication)
{
var _post_params = _request.Parameters.ToDictionary(p => p.Name, p => p.Value);
@@ -208,7 +208,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
}
}
- if (_result.success == true && response.IsSuccessful == false)
+ if (_result.success && response.IsSuccessful == false)
{
_result.SetFailure(
response.ErrorMessage ?? response.StatusDescription,
diff --git a/src/exchanges/chn/gateio/private/privateApi.cs b/src/exchanges/chn/gateio/private/privateApi.cs
index 21d1182..23774d7 100644
--- a/src/exchanges/chn/gateio/private/privateApi.cs
+++ b/src/exchanges/chn/gateio/private/privateApi.cs
@@ -65,7 +65,7 @@ public override async ValueTask CreateAddressAsync(string currency_name
var _result = new Address();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -81,7 +81,7 @@ public override async ValueTask CreateAddressAsync(string currency_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _address = privateClient.DeserializeObject(_json_value.Content);
{
@@ -112,7 +112,7 @@ public override async ValueTask FetchAddressAsync(string currency_name,
var _result = new Address();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -128,7 +128,7 @@ public override async ValueTask FetchAddressAsync(string currency_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _address = privateClient.DeserializeObject(_json_value.Content);
{
@@ -162,7 +162,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
var _result = new Transfer();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -180,12 +180,12 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
var _withdraw = new GTransferItem();
- if (_json_data["result"].Value() == true)
+ if (_json_data["result"].Value())
{
_withdraw.timestamp = CUnixTime.NowMilli;
_withdraw.transferId = _withdraw.timestamp.ToString(); // transferId 없음
@@ -231,7 +231,7 @@ public override async ValueTask FetchAllTransfersAsync(string timefra
var _result = new Transfers();
var _markets = await publicApi.LoadMarketsAsync();
- if (_markets.success == true)
+ if (_markets.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -251,11 +251,11 @@ public override async ValueTask FetchAllTransfersAsync(string timefra
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
foreach (var _d in _json_data.deposits)
{
@@ -325,7 +325,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary FetchBalancesAsync(Dictionary(_json_value.Content);
{
@@ -345,7 +345,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary();
diff --git a/src/exchanges/chn/gateio/public/publicApi.cs b/src/exchanges/chn/gateio/public/publicApi.cs
index 2351b9a..8ae1ff5 100644
--- a/src/exchanges/chn/gateio/public/publicApi.cs
+++ b/src/exchanges/chn/gateio/public/publicApi.cs
@@ -53,7 +53,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary(_json_value.Content);
foreach (var _m in _markets.result)
@@ -125,7 +125,7 @@ public override async ValueTask FetchTickerAsync(string base_name, strin
var _result = new Ticker(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -136,7 +136,7 @@ public override async ValueTask FetchTickerAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _ticker = publicClient.DeserializeObject(_json_value.Content);
{
@@ -177,7 +177,7 @@ public override async ValueTask FetchTickersAsync(Dictionary FetchTickersAsync(Dictionary>(_json_value.Content);
{
@@ -231,7 +231,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
var _result = new OrderBooks(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -242,7 +242,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orderbooks = publicClient.DeserializeObject(_json_value.Content);
{
@@ -290,7 +290,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
var _result = new CompleteOrders(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -316,7 +316,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = publicClient.DeserializeObject(_json_value.Content);
{
diff --git a/src/exchanges/chn/gateio/trade/tradeApi.cs b/src/exchanges/chn/gateio/trade/tradeApi.cs
index daa5c3d..5e41842 100644
--- a/src/exchanges/chn/gateio/trade/tradeApi.cs
+++ b/src/exchanges/chn/gateio/trade/tradeApi.cs
@@ -66,7 +66,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -83,11 +83,11 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _order = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_order.success == true)
+ if (_order.success)
{
_order.result.amount = _order.result.price * _order.result.quantity;
_order.result.orderType = OrderType.Limit;
@@ -120,7 +120,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -136,11 +136,11 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orders = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_orders.success == true)
+ if (_orders.success)
{
foreach (var _o in _orders.result)
{
@@ -177,7 +177,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
var _result = new MyTrades(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -196,11 +196,11 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _trades = _json_data.result
.Where(t => t.timestamp >= since)
@@ -241,7 +241,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -261,7 +261,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -305,7 +305,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -322,11 +322,11 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
_json_data.price = price;
_json_data.quantity = quantity;
@@ -365,7 +365,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -382,7 +382,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
}
diff --git a/src/exchanges/chn/huobi/huobi.cs b/src/exchanges/chn/huobi/huobi.cs
index 9ec8b51..36c44fe 100644
--- a/src/exchanges/chn/huobi/huobi.cs
+++ b/src/exchanges/chn/huobi/huobi.cs
@@ -204,7 +204,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
{
var _request = await base.CreatePostRequestAsync(endpoint, args);
- if (IsAuthentication == true)
+ if (IsAuthentication)
{
var _params = new Dictionary();
{
@@ -237,7 +237,7 @@ public override async ValueTask CreateGetRequestAsync(string endpoi
{
var _request = await base.CreateGetRequestAsync($"{endpoint}", args);
- if (IsAuthentication == true)
+ if (IsAuthentication)
{
var _params = new Dictionary();
{
@@ -277,7 +277,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
if (response != null)
{
- if (response.IsSuccessful == true)
+ if (response.IsSuccessful)
{
var _json_result = this.DeserializeObject(response.Content);
@@ -292,7 +292,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
}
}
- if (_result.success == true && response.IsSuccessful == false)
+ if (_result.success && response.IsSuccessful == false)
{
_result.SetFailure(
response.ErrorMessage ?? response.StatusDescription,
diff --git a/src/exchanges/chn/huobi/private/privateApi.cs b/src/exchanges/chn/huobi/private/privateApi.cs
index 88335e7..a6aa55b 100644
--- a/src/exchanges/chn/huobi/private/privateApi.cs
+++ b/src/exchanges/chn/huobi/private/privateApi.cs
@@ -67,7 +67,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
var _result = new Transfer();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -87,7 +87,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -136,7 +136,7 @@ public override async ValueTask CancelCoinWithdrawAsync(string currenc
var _result = new Transfer();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -147,10 +147,10 @@ public override async ValueTask CancelCoinWithdrawAsync(string currenc
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _transfer = new HTransferItem
{
@@ -200,7 +200,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
var _result = new Transfers();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
var _params = new Dictionary();
{
@@ -224,7 +224,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -250,7 +250,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_params.Add("type", "withdraw");
// TransactionType.Withdrawal
- if (_result.success == true)
+ if (_result.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -259,7 +259,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -299,7 +299,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary FetchBalancesAsync(Dictionary(_json_value.Content);
{
@@ -355,7 +355,7 @@ public async Task GetAccounts(Dictionary args = null)
var _result = new HAccounts();
var _markets = await publicApi.LoadMarketsAsync();
- if (_markets.success == true)
+ if (_markets.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -366,11 +366,11 @@ public async Task GetAccounts(Dictionary args = null)
// _result.rawJson = _json_value.Content;
//#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _accounts = privateClient.DeserializeObject(_json_value.Content);
- if (_accounts.success == true)
+ if (_accounts.success)
_result = _accounts;
}
diff --git a/src/exchanges/chn/huobi/public/publicApi.cs b/src/exchanges/chn/huobi/public/publicApi.cs
index 5934dd7..edc60eb 100644
--- a/src/exchanges/chn/huobi/public/publicApi.cs
+++ b/src/exchanges/chn/huobi/public/publicApi.cs
@@ -53,7 +53,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary(_json_value.Content);
@@ -63,7 +63,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary FetchTickerAsync(string base_name, strin
var _result = new Ticker(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -122,7 +122,7 @@ public override async ValueTask FetchTickerAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _ticker = publicClient.DeserializeObject(_json_value.Content);
{
@@ -154,7 +154,7 @@ public override async ValueTask FetchTickersAsync(Dictionary FetchTickersAsync(Dictionary(_json_value.Content);
{
@@ -205,7 +205,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
var _result = new OrderBooks(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -222,10 +222,10 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orderbooks = publicClient.DeserializeObject(_json_value.Content);
- if (_orderbooks.success == true)
+ if (_orderbooks.success)
{
var _ob_asks = _orderbooks.result.asks.OrderBy(o => o.price).Take(limits).ToList();
var _ob_bids = _orderbooks.result.bids.OrderByDescending(o => o.price).Take(limits).ToList();
@@ -289,7 +289,7 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
var _result = new OHLCVs(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -310,10 +310,10 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _ohlcvs = publicClient.DeserializeObject(_json_value.Content);
- if (_ohlcvs.success == true)
+ if (_ohlcvs.success)
{
_result.result.AddRange(
_ohlcvs.result
@@ -353,7 +353,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
var _result = new CompleteOrders(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -372,7 +372,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = publicClient.DeserializeObject(_json_value.Content);
{
diff --git a/src/exchanges/chn/huobi/trade/tradeApi.cs b/src/exchanges/chn/huobi/trade/tradeApi.cs
index ec3418c..5e8d5fd 100644
--- a/src/exchanges/chn/huobi/trade/tradeApi.cs
+++ b/src/exchanges/chn/huobi/trade/tradeApi.cs
@@ -68,7 +68,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -79,7 +79,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orderItem = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -114,7 +114,7 @@ public override async ValueTask FetchMyOrdersAsync(string base_name, s
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -134,7 +134,7 @@ public override async ValueTask FetchMyOrdersAsync(string base_name, s
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -173,7 +173,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
if (args.ContainsKey("account-id") && args["account-id"].ToString() != "")
{
@@ -192,7 +192,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orders = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -237,7 +237,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
var _result = new MyTrades(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -257,7 +257,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -300,7 +300,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
if (args.ContainsKey("account-id") && args["account-id"].ToString() != "")
{
@@ -325,7 +325,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _order = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -372,7 +372,7 @@ public override async ValueTask CreateMarketOrderAsync(string base_name
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
if (args.ContainsKey("account-id") && args["account-id"].ToString() != "")
{
@@ -396,7 +396,7 @@ public override async ValueTask CreateMarketOrderAsync(string base_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _order = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -444,7 +444,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
tradeClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -455,7 +455,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
@@ -500,7 +500,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
if (order_ids.Length > 0)
{
@@ -518,11 +518,11 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
foreach (var _cancelOrder in _json_data.result)
{
@@ -557,11 +557,11 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
_result.rawJson = _json_value.Content;
#endif
var _json_result = tradeClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = tradeClient.DeserializeObject(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
_result.result.Add(_json_data.result);
}
@@ -598,7 +598,7 @@ public override async ValueTask CancelAllOrdersAsync(Dictionary CancelAllOrdersAsync(Dictionary(_json_value.Content);
{
- if (_json_data.success == true)
+ if (_json_data.success)
{
_result.result.Add(_json_data.result);
}
diff --git a/src/exchanges/chn/okex/okex.cs b/src/exchanges/chn/okex/okex.cs
index 1ed5376..d92f2f7 100644
--- a/src/exchanges/chn/okex/okex.cs
+++ b/src/exchanges/chn/okex/okex.cs
@@ -185,7 +185,7 @@ public MD5 MD5Crypto
var _result = (endPoint: spot_url, args);
var _omarket = market as OMarketItem;
- if (_omarket.future == true)
+ if (_omarket.future)
{
_result.endPoint = futures_url;
@@ -206,7 +206,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
{
var _request = await base.CreatePostRequestAsync(endpoint, args);
- if (IsAuthentication == true)
+ if (IsAuthentication)
{
var _params = new Dictionary();
{
@@ -229,7 +229,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
_post_data += $"&sign={_signature.ToUpper()}";
}
- _request.AddParameter("application/x-www-form-urlencoded", _post_data, ParameterType.RequestBody);
+ _request.AddParameter("application/x-www-form-urlencoded", _post_data, ParameterType.RequestBody);
}
return await Task.FromResult(_request);
@@ -268,7 +268,7 @@ public override async ValueTask CreatePostRequestAsync(string endpo
///
public new ErrorCode GetErrorMessage(int error_code)
{
- return ErrorMessages.ContainsKey(error_code) == true
+ return ErrorMessages.ContainsKey(error_code)
? ErrorMessages[error_code]
: ErrorCode.ExchangeError;
}
@@ -295,7 +295,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
if (_json_error != null)
{
var _error_number = _json_error.Value();
- if (ErrorMessages.ContainsKey(_error_number) == true)
+ if (ErrorMessages.ContainsKey(_error_number))
_error_code = GetErrorMessage(_error_number);
_result.SetFailure(_error_msg, _error_code, _error_number);
@@ -311,7 +311,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
}
}
- if (_result.success == true && response.IsSuccessful == false)
+ if (_result.success && response.IsSuccessful == false)
{
_result.SetFailure(
response.ErrorMessage ?? response.StatusDescription,
diff --git a/src/exchanges/chn/okex/private/privateApi.cs b/src/exchanges/chn/okex/private/privateApi.cs
index 194b576..24ecd00 100644
--- a/src/exchanges/chn/okex/private/privateApi.cs
+++ b/src/exchanges/chn/okex/private/privateApi.cs
@@ -72,7 +72,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
var _result = new Transfer();
var _market = await publicApi.LoadMarketAsync(_result.MakeMarketId(currency_name, "USDT"));
- if (_market.success == true)
+ if (_market.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -92,10 +92,10 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _withdraw = new OTransferItem
{
@@ -146,7 +146,7 @@ public override async ValueTask CancelCoinWithdrawAsync(string currenc
var _result = new Transfer();
var _market = await publicApi.LoadMarketAsync(_result.MakeMarketId(currency_name, "USDT"));
- if (_market.success == true)
+ if (_market.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -163,10 +163,10 @@ public override async ValueTask CancelCoinWithdrawAsync(string currenc
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _transfer = new OTransferItem
{
@@ -215,7 +215,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
var _result = new Transfers();
var _market = await publicApi.LoadMarketAsync(_result.MakeMarketId(currency_name, "USD"));
- if (_market.success == true)
+ if (_market.success)
{
var _timestamp = privateClient.ExchangeInfo.GetTimestamp(timeframe);
var _timeframe = privateClient.ExchangeInfo.GetTimeframe(timeframe);
@@ -239,7 +239,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_deposits = privateClient.DeserializeObject(_json_value.Content);
{
@@ -265,7 +265,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_params.Add("type", 1); // 0:deposits 1 :withdraw
// TransactionType.Withdrawal
- if (_result.success == true)
+ if (_result.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -274,7 +274,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_withdraws = privateClient.DeserializeObject(_json_value.Content);
{
@@ -316,7 +316,7 @@ public override async ValueTask FetchBalanceAsync(string base_name, str
var _result = new Balance();
var _currency_id = await publicApi.LoadCurrencyIdAsync(base_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -327,12 +327,12 @@ public override async ValueTask FetchBalanceAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
var _balances = privateClient.DeserializeObject>(_json_data["info"]["funds"].ToString());
- if (_balances["free"].ContainsKey(_currency_id.result) == true)
+ if (_balances["free"].ContainsKey(_currency_id.result))
{
var _balance = new OBalanceItem()
{
@@ -372,7 +372,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary FetchBalancesAsync(Dictionary(_json_value.Content);
{
diff --git a/src/exchanges/chn/okex/public/publicApi.cs b/src/exchanges/chn/okex/public/publicApi.cs
index 36c3b83..a1b0198 100644
--- a/src/exchanges/chn/okex/public/publicApi.cs
+++ b/src/exchanges/chn/okex/public/publicApi.cs
@@ -76,7 +76,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary(_json_value.Content);
foreach (var _m in _markets.result)
@@ -132,7 +132,7 @@ public override async ValueTask FetchMarketsAsync(Dictionary FetchTickerAsync(string base_name, strin
var _result = new Ticker(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexapiClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -199,7 +199,7 @@ public override async ValueTask FetchTickerAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexapiClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexapiClient.DeserializeObject(_json_value.Content);
{
@@ -232,7 +232,7 @@ public override async ValueTask FetchTickersAsync(Dictionary FetchTickersAsync(Dictionary(_json_value.Content);
{
@@ -278,7 +278,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
var _result = new OrderBooks(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexapiClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -297,7 +297,7 @@ public override async ValueTask FetchOrderBooksAsync(string base_nam
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexapiClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _orderbook = okexapiClient.DeserializeObject(_json_value.Content);
{
@@ -335,7 +335,7 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
var _result = new OHLCVs(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexapiClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -361,7 +361,7 @@ public override async ValueTask FetchOHLCVsAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexapiClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexapiClient.DeserializeObject>(_json_value.Content);
@@ -407,7 +407,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
var _result = new CompleteOrders(base_name, quote_name);
var _market = await this.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexapiClient.ExchangeInfo.ApiCallWait(TradeType.Public);
@@ -428,7 +428,7 @@ public override async ValueTask FetchCompleteOrdersAsync(string
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexapiClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexapiClient.DeserializeObject>(_json_value.Content);
{
diff --git a/src/exchanges/chn/okex/trade/tradeApi.cs b/src/exchanges/chn/okex/trade/tradeApi.cs
index 99b34f2..23e66b7 100644
--- a/src/exchanges/chn/okex/trade/tradeApi.cs
+++ b/src/exchanges/chn/okex/trade/tradeApi.cs
@@ -82,7 +82,7 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -101,10 +101,10 @@ public override async ValueTask FetchMyOrderAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _orders = _json_data.result.Where(o => o.orderId == order_id);
if (_orders.Count() > 0)
@@ -148,7 +148,7 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -167,10 +167,10 @@ public override async ValueTask FetchOpenOrdersAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _orders = _json_data.result
.Where(o => o.symbol == _market.result.symbol)
@@ -213,7 +213,7 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
var _result = new MyTrades(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -237,10 +237,10 @@ public override async ValueTask FetchMyTradesAsync(string base_name, s
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
- if (_json_data.success == true)
+ if (_json_data.success)
{
var _trades = _json_data.result
.Where(t => t.timestamp >= since)
@@ -286,7 +286,7 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -309,11 +309,11 @@ public override async ValueTask CreateLimitOrderAsync(string base_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
- if (_json_data.result == true)
+ if (_json_data.result)
{
var _order = new OPlaceOrderItem
{
@@ -361,7 +361,7 @@ public override async ValueTask CreateMarketOrderAsync(string base_name
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -383,11 +383,11 @@ public override async ValueTask CreateMarketOrderAsync(string base_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
- if (_json_data.result == true)
+ if (_json_data.result)
{
var _order = new OPlaceOrderItem
{
@@ -436,7 +436,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
var _result = new MyOrder(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -455,7 +455,7 @@ public override async ValueTask CancelOrderAsync(string base_name, stri
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
{
@@ -523,7 +523,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
var _result = new MyOrders(base_name, quote_name);
var _market = await publicApi.LoadMarketAsync(_result.marketId);
- if (_market.success == true)
+ if (_market.success)
{
okexClient.ExchangeInfo.ApiCallWait(TradeType.Trade);
@@ -542,7 +542,7 @@ public override async ValueTask CancelOrdersAsync(string base_name, st
_result.rawJson = _json_value.Content;
#endif
var _json_result = okexClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = okexClient.DeserializeObject(_json_value.Content);
{
diff --git a/src/exchanges/chn/zb/private/privateApi.cs b/src/exchanges/chn/zb/private/privateApi.cs
index feba3fb..23e6749 100644
--- a/src/exchanges/chn/zb/private/privateApi.cs
+++ b/src/exchanges/chn/zb/private/privateApi.cs
@@ -65,7 +65,7 @@ public override async ValueTask FetchAddressAsync(string currency_name,
var _result = new Address();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -82,7 +82,7 @@ public override async ValueTask FetchAddressAsync(string currency_name,
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -117,7 +117,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
var _result = new Transfer();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -138,7 +138,7 @@ public override async ValueTask CoinWithdrawAsync(string currency_name
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -193,7 +193,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
var _result = new Transfers();
var _currency_id = await publicApi.LoadCurrencyIdAsync(currency_name);
- if (_currency_id.success == true)
+ if (_currency_id.success)
{
var _params = new Dictionary();
{
@@ -214,7 +214,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -226,7 +226,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
foreach (var _d in _deposits)
{
#if DEBUG
- if (String.IsNullOrEmpty(_d.transactionId) == true)
+ if (String.IsNullOrEmpty(_d.transactionId))
continue;
#endif
_d.transactionType = TransactionType.Deposit;
@@ -244,7 +244,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_params.Add("method", "getWithdrawRecord");
// TransactionType.Withdrawal
- if (_result.success == true)
+ if (_result.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);
@@ -253,7 +253,7 @@ public override async ValueTask FetchTransfersAsync(string currency_n
_result.rawJson += _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
- if (_json_result.success == true)
+ if (_json_result.success)
{
var _json_data = privateClient.DeserializeObject(_json_value.Content);
{
@@ -294,7 +294,7 @@ public override async ValueTask FetchBalancesAsync(Dictionary FetchBalancesAsync(Dictionary