22 lines
881 B
C#
22 lines
881 B
C#
using KLHZ.Trader.Core.Contracts.Common.Enums;
|
|
using KLHZ.Trader.Core.Exchange.Models.AssetsAccounting;
|
|
using System.Collections.Immutable;
|
|
|
|
namespace KLHZ.Trader.Core.Exchange.Interfaces
|
|
{
|
|
public interface IManagedAccount
|
|
{
|
|
public decimal Balance { get; }
|
|
public decimal Total { get; }
|
|
bool Initialized { get; }
|
|
string AccountId { get; }
|
|
string? AccountName { get; }
|
|
Task Init(string accountId, string? accountName = null);
|
|
Task LoadPortfolio();
|
|
ImmutableDictionary<string, Asset> Assets { get; }
|
|
public Task OpenPosition(string figi, PositionType positionType, decimal stopLossShift, decimal takeProfitShift, long count = 1);
|
|
public Task ClosePosition(string figi);
|
|
public Task ResetStops(string figi, decimal stopLossShift, decimal takeProfitShift);
|
|
}
|
|
}
|