Click or drag to resize

IPositionProviderGetPosition Method

To get the position by portfolio and instrument.

Namespace:  StockSharp.BusinessEntities
Assembly:  StockSharp.BusinessEntities (in StockSharp.BusinessEntities.dll) Version: 4.4.17.0 (4.4.17)
Syntax
C#
Position GetPosition(
	Portfolio portfolio,
	Security security,
	string clientCode = "",
	string depoName = ""
)

Parameters

portfolio
Type: StockSharp.BusinessEntitiesPortfolio
The portfolio on which the position should be found.
security
Type: StockSharp.BusinessEntitiesSecurity
The instrument on which the position should be found.
clientCode (Optional)
Type: SystemString
The client code.
depoName (Optional)
Type: SystemString
The depository name where the stock is located physically. By default, an empty string is passed, which means the total position by all depositories.

Return Value

Type: Position
Position.
See Also