Skip to content

Commit

Permalink
Removed restClient.SpotApi.Account.GetAutoConvertStableCoinConfigAsyn…
Browse files Browse the repository at this point in the history
…c, SetAutoConvertStableCoinConfigAsync and ConvertBusdAsync as theyre deprecated
  • Loading branch information
JKorf committed Nov 25, 2024
1 parent 7de6458 commit 0fe35d6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 128 deletions.
1 change: 0 additions & 1 deletion Binance.Net.UnitTests/BinanceRestIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public async Task TestSpotAccount()
await RunAndCheckResult(client => client.SpotApi.Account.GetRebateHistoryAsync(default, default, default, default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetPortfolioMarginCollateralRateAsync(default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetPortfolioMarginBankruptcyLoanAsync(default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetAutoConvertStableCoinConfigAsync(default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetBusdConvertHistoryAsync(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow, default, default, default, default, default, default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetCloudMiningHistoryAsync(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow, default, default, default, default, default, default, default), true);
await RunAndCheckResult(client => client.SpotApi.Account.GetIsolatedMarginFeeDataAsync(default, default, default, default), true);
Expand Down
3 changes: 0 additions & 3 deletions Binance.Net.UnitTests/RestRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public async Task ValidateSpotAccountCalls()
await tester.ValidateAsync(client => client.SpotApi.Account.GetPortfolioMarginAccountInfoAsync(), "GetPortfolioMarginAccountInfo");
await tester.ValidateAsync(client => client.SpotApi.Account.GetPortfolioMarginBankruptcyLoanAsync(), "GetPortfolioMarginBankruptcyLoan");
await tester.ValidateAsync(client => client.SpotApi.Account.PortfolioMarginBankruptcyLoanRepayAsync(), "PortfolioMarginBankruptcyLoanRepay");
await tester.ValidateAsync(client => client.SpotApi.Account.GetAutoConvertStableCoinConfigAsync(), "GetAutoConvertStableCoinConfig");
await tester.ValidateAsync(client => client.SpotApi.Account.SetAutoConvertStableCoinConfigAsync("ETH", true), "SetAutoConvertStableCoinConfig");
await tester.ValidateAsync(client => client.SpotApi.Account.ConvertBusdAsync("1", "ETH", 1, "USDT"), "ConvertBusd");
await tester.ValidateAsync(client => client.SpotApi.Account.GetBusdConvertHistoryAsync(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow), "GetBusdConvertHistory");
await tester.ValidateAsync(client => client.SpotApi.Account.GetCloudMiningHistoryAsync(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow), "GetCloudMiningHistory");
await tester.ValidateAsync(client => client.SpotApi.Account.GetIsolatedMarginFeeDataAsync(), "GetIsolatedMarginFeeData");
Expand Down
42 changes: 0 additions & 42 deletions Binance.Net/Binance.Net.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1403,15 +1403,6 @@
<member name="M:Binance.Net.Clients.SpotApi.BinanceRestClientSpotApiAccount.PortfolioMarginBankruptcyLoanRepayAsync(System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.SpotApi.BinanceRestClientSpotApiAccount.GetAutoConvertStableCoinConfigAsync(System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.SpotApi.BinanceRestClientSpotApiAccount.SetAutoConvertStableCoinConfigAsync(System.String,System.Boolean,System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.SpotApi.BinanceRestClientSpotApiAccount.ConvertBusdAsync(System.String,System.String,System.Decimal,System.String,System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.SpotApi.BinanceRestClientSpotApiAccount.GetBusdConvertHistoryAsync(System.DateTime,System.DateTime,System.Nullable{System.Int64},System.String,System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
Expand Down Expand Up @@ -9363,39 +9354,6 @@
<param name="ct">Cancellation token</param>
<returns></returns>
</member>
<member name="M:Binance.Net.Interfaces.Clients.SpotApi.IBinanceRestClientSpotApiAccount.GetAutoConvertStableCoinConfigAsync(System.Nullable{System.Int64},System.Threading.CancellationToken)">
<summary>
Get auto conversion settings
<para><a href="https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data" /></para>
</summary>
<param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
<param name="ct">Cancellation token</param>
<returns></returns>
</member>
<member name="M:Binance.Net.Interfaces.Clients.SpotApi.IBinanceRestClientSpotApiAccount.SetAutoConvertStableCoinConfigAsync(System.String,System.Boolean,System.Nullable{System.Int64},System.Threading.CancellationToken)">
<summary>
Set auto conversion configuration
<para><a href="https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data" /></para>
</summary>
<param name="asset">Asset to configure (USDC, USDP or TUSD)</param>
<param name="enable">Enable or not</param>
<param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
<param name="ct">Cancellation token</param>
<returns></returns>
</member>
<member name="M:Binance.Net.Interfaces.Clients.SpotApi.IBinanceRestClientSpotApiAccount.ConvertBusdAsync(System.String,System.String,System.Decimal,System.String,System.Nullable{System.Int64},System.Threading.CancellationToken)">
<summary>
Convert transfer, convert between BUSD and stablecoins.
<para><a href="https://binance-docs.github.io/apidocs/spot/en/#busd-convert-trade" /></para>
</summary>
<param name="clientTransferId">The unique user-defined transaction id, min length 20</param>
<param name="asset">The current asset, for example `ETH`</param>
<param name="quantity">Quantity</param>
<param name="targetAsset"> Target asset you want to convert</param>
<param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
<param name="ct">Cancellation token</param>
<returns></returns>
</member>
<member name="M:Binance.Net.Interfaces.Clients.SpotApi.IBinanceRestClientSpotApiAccount.GetBusdConvertHistoryAsync(System.DateTime,System.DateTime,System.Nullable{System.Int64},System.String,System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<summary>
Get Busd convert history
Expand Down
49 changes: 0 additions & 49 deletions Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,55 +1142,6 @@ public async Task<WebCallResult<BinanceTransaction>> PortfolioMarginBankruptcyLo

#endregion

#region Get Auto Conversion config

/// <inheritdoc />
public async Task<WebCallResult<BinanceAutoConversionSettings>> GetAutoConvertStableCoinConfigAsync(long? receiveWindow = null, CancellationToken ct = default)
{
var parameters = new ParameterCollection();
parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
var request = _definitions.GetOrCreate(HttpMethod.Get, "sapi/v1/capital/contract/convertible-coins", BinanceExchange.RateLimiter.SpotRestUid, 600, true);
return await _baseClient.SendAsync<BinanceAutoConversionSettings>(request, parameters, ct).ConfigureAwait(false);
}

#endregion

#region Set Auto Conversion config

/// <inheritdoc />
public async Task<WebCallResult> SetAutoConvertStableCoinConfigAsync(string asset, bool enable, long? receiveWindow = null, CancellationToken ct = default)
{
var parameters = new ParameterCollection()
{
{ "coin", asset },
{ "enable", enable }
};
parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/capital/contract/convertible-coins", BinanceExchange.RateLimiter.SpotRestUid, 600, true);
return await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false);
}

#endregion

#region Convert BUSD

/// <inheritdoc />
public async Task<WebCallResult<BinanceBusdConvertResult>> ConvertBusdAsync(string clientTransferId, string asset, decimal quantity, string targetAsset, long? receiveWindow = null, CancellationToken ct = default)
{
var parameters = new ParameterCollection()
{
{ "clientTranId", clientTransferId },
{ "asset", asset },
{ "amount", quantity },
{ "targetAsset", targetAsset }
};
parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/asset/convert-transfer", BinanceExchange.RateLimiter.SpotRestUid, 5, true);
return await _baseClient.SendAsync<BinanceBusdConvertResult>(request, parameters, ct).ConfigureAwait(false);
}

#endregion

#region Convert BUSD history

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,39 +728,6 @@ Task<WebCallResult<CreateIsolatedMarginAccountResult>> DisableIsolatedMarginAcco
/// <returns></returns>
Task<WebCallResult<BinanceTransaction>> PortfolioMarginBankruptcyLoanRepayAsync(long? receiveWindow = null, CancellationToken ct = default);

/// <summary>
/// Get auto conversion settings
/// <para><a href="https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data" /></para>
/// </summary>
/// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<BinanceAutoConversionSettings>> GetAutoConvertStableCoinConfigAsync(long? receiveWindow = null, CancellationToken ct = default);

/// <summary>
/// Set auto conversion configuration
/// <para><a href="https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data" /></para>
/// </summary>
/// <param name="asset">Asset to configure (USDC, USDP or TUSD)</param>
/// <param name="enable">Enable or not</param>
/// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult> SetAutoConvertStableCoinConfigAsync(string asset, bool enable, long? receiveWindow = null, CancellationToken ct = default);

/// <summary>
/// Convert transfer, convert between BUSD and stablecoins.
/// <para><a href="https://binance-docs.github.io/apidocs/spot/en/#busd-convert-trade" /></para>
/// </summary>
/// <param name="clientTransferId">The unique user-defined transaction id, min length 20</param>
/// <param name="asset">The current asset, for example `ETH`</param>
/// <param name="quantity">Quantity</param>
/// <param name="targetAsset"> Target asset you want to convert</param>
/// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
/// <param name="ct">Cancellation token</param>
/// <returns></returns>
Task<WebCallResult<BinanceBusdConvertResult>> ConvertBusdAsync(string clientTransferId, string asset, decimal quantity, string targetAsset, long? receiveWindow = null, CancellationToken ct = default);

/// <summary>
/// Get Busd convert history
/// <para><a href="https://binance-docs.github.io/apidocs/spot/en/#busd-convert-history-user_data" /></para>
Expand Down

0 comments on commit 0fe35d6

Please sign in to comment.