-
Notifications
You must be signed in to change notification settings - Fork 51
/
ITradeStrategy.cs
61 lines (37 loc) · 2.13 KB
/
ITradeStrategy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using DevelopmentInProgress.TradeView.Core.Enums;
using DevelopmentInProgress.TradeView.Core.Events;
using DevelopmentInProgress.TradeView.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace DevelopmentInProgress.TradeView.Core.TradeStrategy
{
public interface ITradeStrategy
{
Strategy Strategy { get; }
event EventHandler<StrategyNotificationEventArgs> StrategyNotificationEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyAccountInfoEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyOrderBookEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyTradeEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyCandlesticksEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyStatisticsEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyCustomNotificationEvent;
event EventHandler<StrategyNotificationEventArgs> StrategyParameterUpdateEvent;
void SetStrategy(Strategy strategy);
Task<Strategy> RunAsync(CancellationToken cancellationToken);
Task AddExchangeService(IEnumerable<StrategySubscription> strategySubscriptions, Exchange exchange, IExchangeService exchangeService);
Task<bool> TryStopStrategy(string strategyParameters);
Task<bool> TryUpdateStrategyAsync(string strategyParameters);
void SubscribeAccountInfo(AccountInfoEventArgs accountInfoEventArgs);
void SubscribeAccountInfoException(Exception exception);
void SubscribeTrades(TradeEventArgs tradeEventArgs);
void SubscribeTradesException(Exception exception);
void SubscribeOrderBook(OrderBookEventArgs orderBookEventArgs);
void SubscribeOrderBookException(Exception exception);
void SubscribeStatistics(StatisticsEventArgs statisticsEventArgs);
void SubscribeStatisticsException(Exception exception);
void SubscribeCandlesticks(CandlestickEventArgs candlestickEventArgs);
void SubscribeCandlesticksException(Exception exception);
}
}