#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
Viewing or use of this code requires your acceptance of the license
agreement found at https://github.com/StockSharp/StockSharp/blob/master/LICENSE
Removal of this comment is a violation of the license agreement.
Project: StockSharp.Community.Community
File: IStrategyService.cs
Created: 2015, 11, 11, 2:32 PM
Copyright 2010 by StockSharp, LLC
*******************************************************************************************/
#endregion S# License
namespace StockSharp.Community
{
using System;
using System.Collections.Generic;
using System.ServiceModel;
///
/// The interface describing the strategy store service.
///
[ServiceContract(Namespace = "http://stocksharp.com/services/strategyservice.svc")]
public interface IStrategyService
{
///
/// To add the strategy to the store.
///
/// Session ID.
/// Create strategy in English store.
/// The strategy data.
/// The strategy identifier.
[OperationContract]
long CreateStrategy(Guid sessionId, bool isEnglish, StrategyData strategy);
///
/// To update the strategy in the store.
///
/// Session ID.
/// The strategy data.
/// The execution result code.
[OperationContract]
byte UpdateStrategy(Guid sessionId, StrategyData strategy);
///
/// To remove the strategy from the store.
///
/// Session ID.
/// The strategy identifier.
/// The execution result code.
[OperationContract]
byte DeleteStrategy(Guid sessionId, long strategyId);
///
/// To get all strategies identifiers.
///
/// Last time of calling the method.
/// Request strategies in English store.
/// Strategies identifiers and revisions.
[OperationContract]
IEnumerable> GetStrategies(DateTime lastCheckTime, bool isEnglish);
///
/// To get the name and description of strategies.
///
/// Strategies identifiers.
/// Information about strategies.
[OperationContract]
IEnumerable GetDescription(long[] strategyIds);
///
/// To get active subscriptions signed by .
///
/// Session ID.
/// Last time of calling the method.
/// Active subscriptions.
[OperationContract]
IEnumerable GetSubscriptions(Guid sessionId, DateTime lastCheckTime);
///
/// To subscribe for the strategy.
///
/// Session ID.
/// The strategy identifier.
/// Is auto renewable subscription.
/// The strategy subscription.
[OperationContract]
StrategySubscription Subscribe(Guid sessionId, long strategyId, bool isAutoRenew);
///
/// To unsubscribe from the strategy.
///
/// Session ID.
/// The subscription identifier.
/// The execution result code.
[OperationContract]
byte UnSubscribe(Guid sessionId, long subscriptionId);
///
/// To find backtesting session.
///
/// Session ID.
/// Minimum creation date.
/// Maximum creation date.
/// Found sessions.
[OperationContract]
StrategyBacktest[] GetBacktests(Guid sessionId, DateTime from, DateTime to);
///
/// To get an approximate of money to spend for the specified backtesting configuration.
///
/// Session ID.
/// Backtesting session.
/// An approximate of money.
[OperationContract]
decimal GetApproximateAmount(Guid sessionId, StrategyBacktest backtest);
///
/// To start backtesing.
///
/// Session ID.
/// Backtesting session.
/// The backtesting session identifier.
[OperationContract]
long StartBacktest(Guid sessionId, StrategyBacktest backtest);
///
/// To stop the backtesing.
///
/// Session ID.
/// The backtesting session identifier.
/// The execution result code.
[OperationContract]
byte StopBacktest(Guid sessionId, long backtestId);
///
/// To get the count of completed iterations.
///
/// Session ID.
/// The backtesting session identifier.
/// The count of completed iterations.
[OperationContract]
int GetCompletedIterationCount(Guid sessionId, long backtestId);
///
/// To get the identifier of formatted file.
///
/// Session ID.
/// The backtesting session identifier.
/// Identifier of formatted file.
[OperationContract]
long? GetBacktestResult(Guid sessionId, long backtestId);
}
}