1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-11-05 12:57:56 +00:00

Added SharedSymbolModel base class to SharedFuturesKline, SharedKline, SharedTrade models

This commit is contained in:
Jkorf 2025-11-03 11:25:10 +01:00
parent 8d5b6a53f3
commit 1bfdec1484
3 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// Mark/index price kline
/// </summary>
public record SharedFuturesKline
public record SharedFuturesKline : SharedSymbolModel
{
/// <summary>
/// Open time
@ -31,7 +31,8 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// ctor
/// </summary>
public SharedFuturesKline(DateTime openTime, decimal closePrice, decimal highPrice, decimal lowPrice, decimal openPrice)
public SharedFuturesKline(SharedSymbol? sharedSymbol, string symbol, DateTime openTime, decimal closePrice, decimal highPrice, decimal lowPrice, decimal openPrice)
: base(sharedSymbol, symbol)
{
OpenTime = openTime;
ClosePrice = closePrice;

View File

@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// Kline info
/// </summary>
public record SharedKline
public record SharedKline : SharedSymbolModel
{
/// <summary>
/// Open time
@ -35,7 +35,8 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// ctor
/// </summary>
public SharedKline(DateTime openTime, decimal closePrice, decimal highPrice, decimal lowPrice, decimal openPrice, decimal volume)
public SharedKline(SharedSymbol? sharedSymbol, string symbol, DateTime openTime, decimal closePrice, decimal highPrice, decimal lowPrice, decimal openPrice, decimal volume)
: base(sharedSymbol, symbol)
{
OpenTime = openTime;
ClosePrice = closePrice;

View File

@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// Public trade info
/// </summary>
public record SharedTrade
public record SharedTrade : SharedSymbolModel
{
/// <summary>
/// Quantity of the trade
@ -27,7 +27,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary>
/// ctor
/// </summary>
public SharedTrade(decimal quantity, decimal price, DateTime timestamp)
public SharedTrade(SharedSymbol? sharedSymbol, string symbol, decimal quantity, decimal price, DateTime timestamp) : base(sharedSymbol, symbol)
{
Quantity = quantity;
Price = price;