mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-09-03 06:01:40 +00:00
Added BaseAndQuoteAssetAndContracts value to SharedQuantityType enum
This commit is contained in:
parent
122a6cad43
commit
65457d8df2
@ -20,6 +20,10 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Quantity can be either base or quote quantity
|
/// Quantity can be either base or quote quantity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BaseAndQuoteAsset
|
BaseAndQuoteAsset,
|
||||||
|
/// <summary>
|
||||||
|
/// Quantity can be either base or quote quantity, or in contracts
|
||||||
|
/// </summary>
|
||||||
|
BaseAndQuoteAssetAndContracts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,9 @@ namespace CryptoExchange.Net.SharedApis
|
|||||||
if (supportedType == quantityType)
|
if (supportedType == quantityType)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (supportedType == SharedQuantityType.BaseAndQuoteAssetAndContracts)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (supportedType == SharedQuantityType.BaseAndQuoteAsset && (quantityType == SharedQuantityType.BaseAsset || quantityType == SharedQuantityType.QuoteAsset))
|
if (supportedType == SharedQuantityType.BaseAndQuoteAsset && (quantityType == SharedQuantityType.BaseAsset || quantityType == SharedQuantityType.QuoteAsset))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -77,7 +80,7 @@ namespace CryptoExchange.Net.SharedApis
|
|||||||
public Error? Validate(SharedOrderSide side, SharedOrderType type, SharedQuantity? quantity)
|
public Error? Validate(SharedOrderSide side, SharedOrderType type, SharedQuantity? quantity)
|
||||||
{
|
{
|
||||||
var supportedType = GetSupportedQuantityType(side, type);
|
var supportedType = GetSupportedQuantityType(side, type);
|
||||||
if (supportedType == SharedQuantityType.BaseAndQuoteAsset)
|
if (supportedType == SharedQuantityType.BaseAndQuoteAsset || supportedType == SharedQuantityType.BaseAndQuoteAssetAndContracts)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (supportedType == SharedQuantityType.BaseAndQuoteAsset && quantity != null && quantity.QuantityInBaseAsset == null && quantity.QuantityInQuoteAsset == null)
|
if (supportedType == SharedQuantityType.BaseAndQuoteAsset && quantity != null && quantity.QuantityInBaseAsset == null && quantity.QuantityInQuoteAsset == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user