Skip to content

Commit

Permalink
Added page parameter to restClient.UsdFuturesApi.Account.GetIncomeHis…
Browse files Browse the repository at this point in the history
…toryAsync endpoint
  • Loading branch information
JKorf committed Nov 8, 2024
1 parent 2a0f2c7 commit 87efe1f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Binance.Net.UnitTests/BinanceRestIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public async Task TestUsdFuturesAccount()
{
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetPositionModeAsync(default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetMarginChangeHistoryAsync("ETHUSDT", default, default, default, default, default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetIncomeHistoryAsync(default, default, default, default, default, default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetIncomeHistoryAsync(default, default, default, default, default, default, default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetBracketsAsync(default, default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetPositionAdlQuantileEstimationAsync(default, default, default), true);
await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetAccountInfoV2Async(default, default), true);
Expand Down
5 changes: 3 additions & 2 deletions Binance.Net/Binance.Net.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@
<member name="M:Binance.Net.Clients.UsdFuturesApi.BinanceRestClientUsdFuturesApiAccount.GetMarginChangeHistoryAsync(System.String,System.Nullable{Binance.Net.Enums.FuturesMarginChangeDirectionType},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.UsdFuturesApi.BinanceRestClientUsdFuturesApiAccount.GetIncomeHistoryAsync(System.String,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<member name="M:Binance.Net.Clients.UsdFuturesApi.BinanceRestClientUsdFuturesApiAccount.GetIncomeHistoryAsync(System.String,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<inheritdoc />
</member>
<member name="M:Binance.Net.Clients.UsdFuturesApi.BinanceRestClientUsdFuturesApiAccount.GetBracketsAsync(System.String,System.Nullable{System.Int64},System.Threading.CancellationToken)">
Expand Down Expand Up @@ -11497,7 +11497,7 @@
<param name="ct">Cancellation token</param>
<returns>List of all margin changes for the symbol</returns>
</member>
<member name="M:Binance.Net.Interfaces.Clients.UsdFuturesApi.IBinanceRestClientUsdFuturesApiAccount.GetIncomeHistoryAsync(System.String,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<member name="M:Binance.Net.Interfaces.Clients.UsdFuturesApi.IBinanceRestClientUsdFuturesApiAccount.GetIncomeHistoryAsync(System.String,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int64},System.Threading.CancellationToken)">
<summary>
Gets the income history for the futures account
<para><a href="https://binance-docs.github.io/apidocs/futures/en/#get-income-history-user_data" /></para>
Expand All @@ -11507,6 +11507,7 @@
<param name="startTime">Time to start getting income history from</param>
<param name="endTime">Time to stop getting income history from</param>
<param name="limit">Max number of results</param>
<param name="page">Page number</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>The income history for the futures account</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public async Task<WebCallResult<IEnumerable<BinanceFuturesMarginChangeHistoryRes
#region Get Income History

/// <inheritdoc />
public async Task<WebCallResult<IEnumerable<BinanceFuturesIncomeHistory>>> GetIncomeHistoryAsync(string? symbol = null, string? incomeType = null, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, long? receiveWindow = null, CancellationToken ct = default)
public async Task<WebCallResult<IEnumerable<BinanceFuturesIncomeHistory>>> GetIncomeHistoryAsync(string? symbol = null, string? incomeType = null, DateTime? startTime = null, DateTime? endTime = null, int? page = null, int? limit = null, long? receiveWindow = null, CancellationToken ct = default)
{
limit?.ValidateIntBetween(nameof(limit), 1, 1000);

Expand All @@ -138,6 +138,7 @@ public async Task<WebCallResult<IEnumerable<BinanceFuturesIncomeHistory>>> GetIn
parameters.AddOptionalParameter("incomeType", incomeType);
parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime));
parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime));
parameters.AddOptionalParameter("page", page);
parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));
parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ Task<WebCallResult<IEnumerable<BinancePositionDetailsUsdt>>> GetPositionInformat
/// <param name="startTime">Time to start getting income history from</param>
/// <param name="endTime">Time to stop getting income history from</param>
/// <param name="limit">Max number of results</param>
/// <param name="page">Page number</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>The income history for the futures account</returns>
Task<WebCallResult<IEnumerable<BinanceFuturesIncomeHistory>>> GetIncomeHistoryAsync(string? symbol = null, string? incomeType = null, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, long? receiveWindow = null, CancellationToken ct = default);
Task<WebCallResult<IEnumerable<BinanceFuturesIncomeHistory>>> GetIncomeHistoryAsync(string? symbol = null, string? incomeType = null, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, int? page = null, long? receiveWindow = null, CancellationToken ct = default);

/// <summary>
/// Gets Notional and Leverage Brackets.
Expand Down

0 comments on commit 87efe1f

Please sign in to comment.