IPositionProvider

StockSharp.BusinessEntities

The position provider interface.

Properties

Positions
public IEnumerable<Position> Positions { get; }
value = iPositionProvider.Positions

Get all positions.

Methods

GetPosition
public Position GetPosition(Portfolio portfolio, Security security, string strategyId, Sides? side, string clientCode, string depoName, TPlusLimits? limitType)
result = iPositionProvider.GetPosition(portfolio, security, strategyId, side, clientCode, depoName, limitType)

To get the position by portfolio and instrument.

portfolio
The portfolio on which the position should be found.
security
The instrument on which the position should be found.
strategyId
Strategy ID.
side
Side.
clientCode
The client code.
depoName
The depository name where the stock is located physically. By default, an empty string is passed, which means the total position by all depositories.
limitType
Limit type for Т+ market.

Returns: Position.

Events

NewPosition
public event Action<Position> NewPosition
iPositionProvider.NewPosition += handler

New position received.

PositionChanged
public event Action<Position> PositionChanged
iPositionProvider.PositionChanged += handler

Position changed.