mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-10-27 08:27:19 +00:00
Added ITrackerFactory interface
This commit is contained in:
parent
d88fb0d356
commit
aba6b773ce
45
CryptoExchange.Net/Interfaces/ITrackerFactory.cs
Normal file
45
CryptoExchange.Net/Interfaces/ITrackerFactory.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using CryptoExchange.Net.SharedApis;
|
||||||
|
using CryptoExchange.Net.Trackers.Klines;
|
||||||
|
using CryptoExchange.Net.Trackers.Trades;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CryptoExchange.Net.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Tracker factory
|
||||||
|
/// </summary>
|
||||||
|
public interface ITrackerFactory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the factory supports creating a KlineTracker instance for this symbol and interval
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="symbol">The symbol</param>
|
||||||
|
/// <param name="interval">The kline interval</param>
|
||||||
|
bool CanCreateKlineTracker(SharedSymbol symbol, SharedKlineInterval interval);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new kline tracker
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="symbol">The symbol</param>
|
||||||
|
/// <param name="interval">Kline interval</param>
|
||||||
|
/// <param name="limit">The max amount of klines to retain</param>
|
||||||
|
/// <param name="period">The max period the data should be retained</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
IKlineTracker CreateKlineTracker(SharedSymbol symbol, SharedKlineInterval interval, int? limit = null, TimeSpan? period = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the factory supports creating a TradeTracker instance for this symbol
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="symbol">The symbol</param>
|
||||||
|
bool CanCreateTradeTracker(SharedSymbol symbol);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new trade tracker for a symbol
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="symbol">The symbol</param>
|
||||||
|
/// <param name="limit">The max amount of trades to retain</param>
|
||||||
|
/// <param name="period">The max period the data should be retained</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
ITradeTracker CreateTradeTracker(SharedSymbol symbol, int? limit = null, TimeSpan? period = null);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user