IPortfolioManager
StockSharp.MatchingEngine
Interface for managing multiple portfolios. Abstracts portfolio state management to support both emulated and real portfolios.
Methoden
Clear()
Clear all portfolio state.
GetAllPortfolios() : IEnumerable<IPortfolio>
Get all portfolios.
GetPortfolio(string) : IPortfolio
Get or create a portfolio by name.
- name
- Portfolio name.
Rückgabe: Portfolio instance.
HasPortfolio(string) : bool
Check if portfolio exists.
- name
- Portfolio name.
Rückgabe: True if exists.
ValidateFunds(string, SecurityId, decimal, decimal) : InvalidOperationException
Validate that portfolio has sufficient funds for order registration.
- portfolioName
- Portfolio name.
- securityId
- Security ID (for per-position leverage).
- price
- Order price.
- volume
- Order volume.
Rückgabe: Error if insufficient funds, null otherwise.