1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-25 04:21:03 +00:00
This commit is contained in:
JKorf
2026-09-05 20:28:11 +02:00
parent 431ef93611
commit f215b729ed
263 changed files with 1313 additions and 391 deletions
@@ -12,10 +12,15 @@ namespace CryptoExchange.Net.SharedApis
/// <inheritdoc />
public override string Description => "Retrieve trading fee information";
private static readonly RequestParameterDescription[] _defaultParameterRules = new[]
{
RequestParameterRule<GetFeeRequest>.Required(x => x.Symbol, "The symbol to retrieve trading fees for", new SharedSymbol(TradingMode.Spot, "ETH", "USDT")),
};
/// <summary>
/// ctor
/// </summary>
public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFeesRest.GetFeesAsync))
public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFeesRest.GetFeesAsync), _defaultParameterRules)
{
}
}
@@ -0,0 +1,17 @@
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Request to retrieve trading fees
/// </summary>
public record GetFeeRequest : SharedSymbolRequest
{
/// <summary>
/// ctor
/// </summary>
/// <param name="symbol">Symbol to retrieve fees for</param>
/// <param name="exchangeParameters">Exchange specific parameters</param>
public GetFeeRequest(SharedSymbol symbol, ExchangeParameters? exchangeParameters = null) : base(symbol, exchangeParameters)
{
}
}
}
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Fee request options.<br />
/// Use <see cref="CapabilityOptions.RequiredRequestParameters"/>, <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
/// Use <see cref="CapabilityOptions.RequestParameterRules"/> and <see cref="CapabilityOptions.ExchangeParameterRules"/> to check for required and optional parameters for the request. <br />
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
/// </summary>
GetFeeOptions GetFeeOptions { get; }