Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ public async Task<WebCallResult<BinanceFuturesFundingInfo[]>> GetFundingInfoAsyn
#region Get Funding Rate History

/// <inheritdoc />
public async Task<WebCallResult<BinanceFuturesFundingRateHistory[]>> GetFundingRatesAsync(string symbol, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, CancellationToken ct = default)
public async Task<WebCallResult<BinanceFuturesFundingRateHistory[]>> GetFundingRatesAsync(string? symbol, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, CancellationToken ct = default)
{
limit?.ValidateIntBetween(nameof(limit), 1, 1000);
var parameters = new ParameterCollection {
{ "symbol", symbol }
};
var parameters = new ParameterCollection();

parameters.AddOptionalParameter("symbol", symbol);
parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime));
parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime));
parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,21 @@ public interface IBinanceRestClientUsdFuturesApiExchangeData
Task<WebCallResult<BinanceFuturesFundingInfo[]>> GetFundingInfoAsync(CancellationToken ct = default);

/// <summary>
/// Get funding rate history for the provided symbol
/// Get funding rate history for the provided symbol or for all symbols
/// <para>
/// Docs:<br />
/// <a href="https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History" /><br />
/// Endpoint:<br />
/// GET /fapi/v1/fundingRate
/// </para>
/// </summary>
/// <param name="symbol">["<c>symbol</c>"] The symbol to get the data for, for example `ETHUSDT`</param>
/// <param name="symbol">["<c>symbol</c>"] The symbol to get the data for, for example `ETHUSDT`. Or null to get the data for all symbols</param>
/// <param name="startTime">["<c>startTime</c>"] Start time to get funding rate history</param>
/// <param name="endTime">["<c>endTime</c>"] End time to get funding rate history</param>
/// <param name="limit">["<c>limit</c>"] Max number of results</param>
/// <param name="limit">["<c>limit</c>"] Max number of results. Default 100, max 1000</param>
/// <param name="ct">Cancellation token</param>
/// <returns>The funding rate history for the provided symbol</returns>
Task<WebCallResult<BinanceFuturesFundingRateHistory[]>> GetFundingRatesAsync(string symbol, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, CancellationToken ct = default);
Task<WebCallResult<BinanceFuturesFundingRateHistory[]>> GetFundingRatesAsync(string? symbol, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, CancellationToken ct = default);

/// <summary>
/// Gets Top Trader Long/Short Ratio (Accounts)
Expand Down
Loading