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