mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-14 01:42:55 +00:00
fcb36f7ee0
Added SpotSymbolCatalog to Shared ISpotSymbolRestClient interface Added FuturesSymbolCatalog to Shared IFuturesSymbolRestClient interface Added BaseAssetType, BaseAssetSubType, QuoteAssetType and QuoteAssetSubType to GetSymbolsRequest model Added DisplayName to SharedSpotSymbol and SharedFuturesSymbol models Added BaseAssetType, BaseAssetSubType, QuoteAssetType and QuoteAssetSubType to SharedSpotSymbol and SharedFuturesSymbol models Added IsStableCoin, IsCommodity and IsEquity helper methods to LibraryHelpers
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
|
|
namespace CryptoExchange.Net.SharedApis
|
|
{
|
|
/// <summary>
|
|
/// Futures symbol info
|
|
/// </summary>
|
|
[DebuggerDisplay("{DebugView,nq}")]
|
|
public record SharedFuturesSymbol : SharedSpotSymbol
|
|
{
|
|
private string DebugView => $"{TradingMode} {(DisplayName ?? Name)} - {BaseAssetType}{(BaseAssetSubType == null ? "" : " " + BaseAssetSubType)}{(DeliveryTime != null ? $" Delivery: {DeliveryTime:yyyy-MM-dd}": "")}";
|
|
|
|
/// <summary>
|
|
/// The size of a single contract
|
|
/// </summary>
|
|
public decimal? ContractSize { get; set; }
|
|
/// <summary>
|
|
/// Delivery time of the contract
|
|
/// </summary>
|
|
public DateTime? DeliveryTime { get; set; }
|
|
/// <summary>
|
|
/// Max short leverage setting
|
|
/// </summary>
|
|
public decimal? MaxShortLeverage { get; set; }
|
|
/// <summary>
|
|
/// Max long leverage setting
|
|
/// </summary>
|
|
public decimal? MaxLongLeverage { get; set; }
|
|
|
|
/// <summary>
|
|
/// ctor
|
|
/// </summary>
|
|
public SharedFuturesSymbol(TradingMode symbolType, string baseAsset, string quoteAsset, string symbol, bool trading) : base(baseAsset, quoteAsset, symbol, trading, symbolType)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override SharedSymbol SharedSymbol => new SharedSymbol(TradingMode, BaseAsset.ToUpperInvariant(), QuoteAsset.ToUpperInvariant(), DeliveryTime) { SymbolName = Name };
|
|
}
|
|
}
|