StockSharp.BusinessEntities
5.0.227
Prefix Reserved
dotnet add package StockSharp.BusinessEntities --version 5.0.227
NuGet\Install-Package StockSharp.BusinessEntities -Version 5.0.227
<PackageReference Include="StockSharp.BusinessEntities" Version="5.0.227" />
<PackageVersion Include="StockSharp.BusinessEntities" Version="5.0.227" />
<PackageReference Include="StockSharp.BusinessEntities" />
paket add StockSharp.BusinessEntities --version 5.0.227
#r "nuget: StockSharp.BusinessEntities, 5.0.227"
#:package StockSharp.BusinessEntities@5.0.227
#addin nuget:?package=StockSharp.BusinessEntities&version=5.0.227
#tool nuget:?package=StockSharp.BusinessEntities&version=5.0.227
StockSharp.BusinessEntities
StockSharp.BusinessEntities is the core library that defines the trading entities used throughout the S# platform. It contains models describing exchanges, instruments, orders, trades and other objects along with provider interfaces for market data and order management.
Key classes
- Exchange and ExchangeBoard — descriptions of an exchange and a specific electronic board.
- Security — represents a financial instrument with fields such as symbol, type, price step and currency.
- Portfolio and Position — trading account information and open positions.
- Order, MyTrade and Trade — objects that reflect registered orders and trades.
- MarketDepth — order book (best bid/ask and current quotes).
- News — news item information.
- Candle and its derivations (e.g.
TimeFrameCandle,TickCandle) — candle models for analyzing market data.
Provider interfaces
The library declares base interfaces for interacting with various data sources and trading systems:
IConnectoris the main interface combining connectivity, subscriptions, orders and data access. It inherits fromIMarketDataProvider,ITransactionProvider,ISecurityProviderand others. A fragment of the interface:
public interface IConnector : IMessageTransport, IAsyncPersistable, ILogReceiver,
IMarketDataProvider, ITransactionProvider, ISecurityProvider,
ISubscriptionProvider, ITimeProvider,
IPortfolioProvider, IPositionProvider
{
event Action<Message> NewMessage;
event Action Connected;
event Action Disconnected;
// ...
}
IMarketDataProvider— receiving market data and price levels.ITransactionProvider— registering, canceling and modifying orders.ISubscriptionProvider— managing real‑time data subscriptions.ISecurityProvider,IPortfolioProvider,IPositionProvider— access to lists of securities, portfolios and positions.ITimeProvider— current time source.
Extensions and helpers
EntitiesExtensions.cs contains many utilities:
- Converting price values to pips or points.
- Cloning and re-registering orders.
- Transforming entities to
StockSharp.Messagestypes. - Enumerating all registered exchanges and boards.
Example method:
public static IEnumerable<Exchange> EnumerateExchanges()
=> typeof(Exchange)
.GetMembers<PropertyInfo>(_publicStatic, typeof(Exchange))
.Select(prop => (Exchange)prop.GetValue(null, null));
Project structure
BusinessEntities.csproj connects shared settings and package dependencies:
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\props\common_target_net.props" />
<PropertyGroup>
<ProjectGuid>{DCE69DB8-53CA-4B7F-9368-02F175A31074}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Ecng.Configuration" Version="$(EcngVer)" />
<PackageReference Include="Ecng.Drawing" Version="$(EcngVer)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Messages\Messages.csproj" />
</ItemGroup>
</Project>
Usage
BusinessEntities is used in all Samples projects and production connectors. Add the project to your solution or install the package from the private S# NuGet feed. You can then create Security objects, subscribe to data through the interfaces and register orders.
Example
A code fragment for subscribing to an instrument and receiving market data can be found in Samples/01_Basic/01_ConnectAndDownloadInstruments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Ecng.Configuration (>= 1.0.281)
- Ecng.Drawing (>= 1.0.201)
- StockSharp.Messages (>= 5.0.251)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on StockSharp.BusinessEntities:
| Package | Downloads |
|---|---|
|
StockSharp.Alerts.Interfaces
S#.Alerts.Interfaces More info on web site https://stocksharp.com/store/ |
|
|
StockSharp.Charting.Interfaces
S#.Charting.Interfaces More info on web site https://stocksharp.com/store/ |
|
|
StockSharp.Xaml.Shared
Shared XAML controls. More info on web site https://stocksharp.com/store/ |
|
|
TradeSystemsCommon.Tools
Package Description |
|
|
StockSharp.Xaml.Charting.Avalonia
Avalonia charting controls. More info on web site https://stocksharp.com/store/ |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.227 | 56 | 10/24/2026 |
| 5.0.226 | 526 | 9/13/2026 |
| 5.0.225 | 356 | 9/9/2026 |
| 5.0.224 | 324 | 8/26/2026 |
| 5.0.223 | 242 | 8/26/2026 |
| 5.0.222 | 331 | 8/20/2026 |
| 5.0.221 | 380 | 8/18/2026 |
| 5.0.220 | 289 | 8/15/2026 |
| 5.0.219 | 262 | 8/11/2026 |
| 5.0.218 | 303 | 7/30/2026 |
| 5.0.217 | 276 | 7/28/2026 |
| 5.0.216 | 6,218 | 9/11/2025 |
| 5.0.215 | 844 | 9/1/2025 |
| 5.0.214 | 685 | 8/30/2025 |
| 5.0.213 | 893 | 8/10/2025 |
| 5.0.212 | 1,218 | 7/23/2025 |
| 5.0.211 | 1,017 | 7/20/2025 |
| 5.0.210 | 1,511 | 7/14/2025 |
| 5.0.209 | 624 | 7/8/2025 |
| 5.0.208 | 624 | 7/4/2025 |
Localize public core enum captions with Display resources
Unwind the blocking waits left by the async rework and fix what it uncovered
Move instrument lookups and persistence to async
Await security lookups instead of blocking on them
Report the emulated account to the connector, floating profit included
Make candle and storage processing reliable
Correct message and entity contracts
Updated Ecng.Configuration to 1.0.281.
Updated Ecng.Drawing to 1.0.201.