mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +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)
|
if (price != null)
|
||||||
{
|
{
|
||||||
adjustedPrice = AdjustValueStep(0, decimal.MaxValue, symbol.PriceStep, RoundingType.Down, price.Value);
|
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;
|
adjustedPrice = symbol.PriceDecimals.HasValue ? RoundDown(price.Value, symbol.PriceDecimals.Value) : adjustedPrice;
|
||||||
if (adjustedPrice != 0 && adjustedPrice * quantity < symbol.MinNotionalValue)
|
if (adjustedPrice != 0 && adjustedPrice * quantity < symbol.MinNotionalValue)
|
||||||
{
|
{
|
||||||
|
@ -46,6 +46,10 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? PriceDecimals { get; set; }
|
public int? PriceDecimals { get; set; }
|
||||||
/// <summary>
|
/// <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
|
/// Whether the symbol is currently available for trading
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Trading { get; set; }
|
public bool Trading { get; set; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user