diff --git a/Binance.Net.UnitTests/Endpoints/General/AutoInvest/GetSubscriptionTransactionHistory.txt b/Binance.Net.UnitTests/Endpoints/General/AutoInvest/GetSubscriptionTransactionHistory.txt index 45367637..eb80cc01 100644 --- a/Binance.Net.UnitTests/Endpoints/General/AutoInvest/GetSubscriptionTransactionHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/General/AutoInvest/GetSubscriptionTransactionHistory.txt @@ -1,6 +1,9 @@ GET /sapi/v1/lending/auto-invest/history/list true +{ + "total": 1, + "list": [ { "id":1111, @@ -22,4 +25,6 @@ true "executionType":"RECURRING", "subscriptionCycle": "WEEKLY" } -] \ No newline at end of file +] + +} \ No newline at end of file diff --git a/Binance.Net/Binance.Net.xml b/Binance.Net/Binance.Net.xml index 5ecb9782..6eee5641 100644 --- a/Binance.Net/Binance.Net.xml +++ b/Binance.Net/Binance.Net.xml @@ -15409,6 +15409,21 @@ Asset value in USD + + + Transactions + + + + + Total + + + + + Results + + Plan transaction info diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiAutoInvest.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiAutoInvest.cs index 6d3eda17..b8b8c593 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiAutoInvest.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiAutoInvest.cs @@ -2,6 +2,7 @@ using Binance.Net.Enums; using Binance.Net.Interfaces.Clients.GeneralApi; using Binance.Net.Objects.Models; +using Binance.Net.Objects.Models.Spot; using Binance.Net.Objects.Models.Spot.AutoInvest; using Binance.Net.Objects.Models.Spot.Loans; @@ -192,7 +193,7 @@ public async Task> RedeemIndexL #region Get Subscription Transaction History /// - public async Task>> GetSubscriptionTransactionHistoryAsync(long? planId = null, DateTime? startTime = null, DateTime? endTime = null, string? targetAsset = null, AutoInvestPlanType? planType = null, int? page = null, int? pageSize = null, CancellationToken ct = default) + public async Task> GetSubscriptionTransactionHistoryAsync(long? planId = null, DateTime? startTime = null, DateTime? endTime = null, string? targetAsset = null, AutoInvestPlanType? planType = null, int? page = null, int? pageSize = null, CancellationToken ct = default) { var parameters = new ParameterCollection(); parameters.AddOptional("planId", planId); @@ -200,10 +201,10 @@ public async Task>> parameters.AddOptionalMillisecondsString("endTime", endTime); parameters.AddOptional("targetAsset", targetAsset); parameters.AddOptionalEnum("planType", planType); - parameters.AddOptional("page", page); - parameters.AddOptional("pageSize", pageSize); + parameters.AddOptional("current", page); + parameters.AddOptional("size", pageSize); var request = _definitions.GetOrCreate(HttpMethod.Get, "/sapi/v1/lending/auto-invest/history/list", BinanceExchange.RateLimiter.SpotRestIp, 1, true); - var result = await _baseClient.SendAsync>(request, parameters, ct).ConfigureAwait(false); + var result = await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false); return result; } diff --git a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiAutoInvest.cs b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiAutoInvest.cs index c0ff9e1d..00cea2e8 100644 --- a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiAutoInvest.cs +++ b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiAutoInvest.cs @@ -122,7 +122,7 @@ public interface IBinanceRestClientGeneralApiAutoInvest /// Current page /// Page size /// Cancellation token - Task>> GetSubscriptionTransactionHistoryAsync(long? planId = null, DateTime? startTime = null, DateTime? endTime = null, string? targetAsset = null, AutoInvestPlanType? planType = null, int? page = null, int? pageSize = null, CancellationToken ct = default); + Task> GetSubscriptionTransactionHistoryAsync(long? planId = null, DateTime? startTime = null, DateTime? endTime = null, string? targetAsset = null, AutoInvestPlanType? planType = null, int? page = null, int? pageSize = null, CancellationToken ct = default); /// /// Get one time transaction status diff --git a/Binance.Net/Objects/Models/Spot/AutoInvest/BinanceAutoInvestPlanTransaction.cs b/Binance.Net/Objects/Models/Spot/AutoInvest/BinanceAutoInvestPlanTransaction.cs index c4e3a404..ab7ab8a8 100644 --- a/Binance.Net/Objects/Models/Spot/AutoInvest/BinanceAutoInvestPlanTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/AutoInvest/BinanceAutoInvestPlanTransaction.cs @@ -5,6 +5,23 @@ namespace Binance.Net.Objects.Models.Spot.AutoInvest { + /// + /// Transactions + /// + public record BinanceAutoInvestPlanTransactions + { + /// + /// Total + /// + [JsonPropertyName("total")] + public int Total { get; set; } + /// + /// Results + /// + [JsonPropertyName("list")] + public IEnumerable List { get; set; } = Array.Empty(); + } + /// /// Plan transaction info ///