mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 07:56:12 +00:00
Added PriceSignificationFigures to SharedSpotSymbol model
This commit is contained in:
parent
cf397af3ab
commit
2af1520ecc
@ -261,6 +261,7 @@ namespace CryptoExchange.Net
|
||||
if (price != null)
|
||||
{
|
||||
adjustedPrice = AdjustValueStep(0, decimal.MaxValue, symbol.PriceStep, RoundingType.Down, price.Value);
|
||||
adjustedPrice = symbol.PriceSignificantFigures.HasValue ? RoundToSignificantDigits(adjustedPrice.Value, symbol.PriceSignificantFigures.Value, RoundingType.Closest) : adjustedPrice;
|
||||
adjustedPrice = symbol.PriceDecimals.HasValue ? RoundDown(price.Value, symbol.PriceDecimals.Value) : adjustedPrice;
|
||||
if (adjustedPrice != 0 && adjustedPrice * quantity < symbol.MinNotionalValue)
|
||||
{
|
||||
|
@ -46,6 +46,10 @@
|
||||
/// </summary>
|
||||
public int? PriceDecimals { get; set; }
|
||||
/// <summary>
|
||||
/// The max amount of significant figures to use for price. For example with value of 5 these values are valid: 0.00001, 0.12300, 123.53, 12345, but this is not: 12345.1
|
||||
/// </summary>
|
||||
public int? PriceSignificantFigures { get; set; }
|
||||
/// <summary>
|
||||
/// Whether the symbol is currently available for trading
|
||||
/// </summary>
|
||||
public bool Trading { get; set; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user