mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-16 16:10:53 +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
59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Text;
|
|
|
|
namespace CryptoExchange.Net.SharedApis
|
|
{
|
|
/// <summary>
|
|
/// Symbol and asset catalog for a shared client
|
|
/// </summary>
|
|
public class SharedSymbolCatalog
|
|
{
|
|
/// <summary>
|
|
/// Exchange name
|
|
/// </summary>
|
|
public string Exchange { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// Assets supported
|
|
/// </summary>
|
|
public IReadOnlyDictionary<string, SharedAssetInfo> Assets { get; set; } = new Dictionary<string, SharedAssetInfo>();
|
|
/// <summary>
|
|
/// Symbols supported
|
|
/// </summary>
|
|
public IReadOnlyDictionary<string, SharedSpotSymbol> Symbols { get; set; } = new Dictionary<string, SharedSpotSymbol>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Asset info
|
|
/// </summary>
|
|
[DebuggerDisplay("{DebugView,nq}")]
|
|
public class SharedAssetInfo
|
|
{
|
|
private string DebugView => $"{Name} - {Type}{(SubType == null ? "": $" {SubType}")}";
|
|
|
|
/// <summary>
|
|
/// Asset name
|
|
/// </summary>
|
|
public string Name { get; set; }
|
|
/// <summary>
|
|
/// Asset type
|
|
/// </summary>
|
|
public SharedAssetType Type { get; set; }
|
|
/// <summary>
|
|
/// Asset sub type
|
|
/// </summary>
|
|
public SharedAssetSubType? SubType { get; set; }
|
|
|
|
/// <summary>
|
|
/// ctor
|
|
/// </summary>
|
|
public SharedAssetInfo(string name, SharedAssetType type, SharedAssetSubType? subType)
|
|
{
|
|
Name = name;
|
|
Type = type;
|
|
SubType = subType;
|
|
}
|
|
}
|
|
}
|