StockSharp.BusinessEntities 5.0.216

Prefix Reserved
dotnet add package StockSharp.BusinessEntities --version 5.0.216
                    
NuGet\Install-Package StockSharp.BusinessEntities -Version 5.0.216
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StockSharp.BusinessEntities" Version="5.0.216" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.BusinessEntities" Version="5.0.216" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.BusinessEntities" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StockSharp.BusinessEntities --version 5.0.216
                    
#r "nuget: StockSharp.BusinessEntities, 5.0.216"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StockSharp.BusinessEntities@5.0.216
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StockSharp.BusinessEntities&version=5.0.216
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.BusinessEntities&version=5.0.216
                    
Install as a Cake Tool

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:

  • IConnector is the main interface combining connectivity, subscriptions, orders and data access. It inherits from IMarketDataProvider, ITransactionProvider, ISecurityProvider and others. A fragment of the interface:
public interface IConnector : IMessageChannel, IPersistable, 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.Messages types.
  • 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="..\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 Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 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/

TradeSystemsCommon.Tools

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.216 2,628 9/11/2025
5.0.215 618 9/1/2025
5.0.214 583 8/30/2025
5.0.213 779 8/10/2025
5.0.212 1,123 7/23/2025
5.0.211 902 7/20/2025
5.0.210 642 7/14/2025
5.0.209 545 7/8/2025
5.0.208 519 7/4/2025
5.0.207 545 6/30/2025
5.0.206 1,022 6/20/2025
5.0.205 535 6/18/2025
5.0.204 653 6/2/2025
5.0.203 778 5/14/2025
5.0.202 1,407 3/29/2025
5.0.201 490 3/27/2025
5.0.200 1,210 2/26/2025
5.0.199 1,049 2/15/2025
5.0.198 603 2/14/2025
5.0.197 1,108 1/7/2025
5.0.196 784 12/30/2024
5.0.195 1,325 11/18/2024
5.0.194 581 11/16/2024
5.0.193 1,066 10/14/2024
5.0.192 589 10/9/2024
5.0.191 571 10/7/2024
5.0.190 555 10/3/2024
5.0.189 697 9/23/2024
5.0.188 593 9/18/2024
5.0.187 595 9/16/2024
5.0.186 756 9/8/2024
5.0.185 1,049 8/24/2024
5.0.184 845 8/9/2024
5.0.183 923 8/1/2024
5.0.182 511 7/28/2024
5.0.181 836 7/4/2024
5.0.180 783 6/23/2024
5.0.179 704 6/13/2024
5.0.178 793 5/30/2024
5.0.177 543 5/22/2024
5.0.176 732 5/13/2024
5.0.175 843 5/5/2024
5.0.174 657 4/26/2024
5.0.173 656 4/25/2024
5.0.172 697 4/12/2024
5.0.171 801 4/4/2024
5.0.170 1,013 3/12/2024
5.0.169 1,687 2/21/2024
5.0.168 1,045 2/14/2024
5.0.167 954 2/12/2024
5.0.166 1,258 2/6/2024
5.0.165 1,338 1/31/2024
5.0.164 2,136 1/10/2024
5.0.163 1,623 12/15/2023
5.0.162 1,475 12/8/2023
5.0.161 1,598 11/28/2023
5.0.160 1,322 11/28/2023
5.0.159 2,580 10/8/2023
5.0.158 1,609 9/29/2023
5.0.157 1,711 9/19/2023
5.0.156 1,200 9/18/2023
5.0.155 2,354 7/30/2023
5.0.154 1,963 7/10/2023
5.0.153 1,722 7/8/2023
5.0.152 1,793 7/5/2023
5.0.151 1,763 6/22/2023
5.0.150 1,811 6/19/2023
5.0.149 2,258 5/14/2023
5.0.148 1,878 5/8/2023
5.0.147 2,127 4/21/2023
5.0.146 2,320 4/17/2023
5.0.145 2,170 4/7/2023
5.0.144 2,130 4/3/2023
5.0.143 2,662 3/6/2023
5.0.142 3,018 2/23/2023
5.0.141 2,372 2/13/2023
5.0.140 3,188 2/9/2023
5.0.139 3,057 2/8/2023
5.0.138 3,165 2/2/2023
5.0.137 3,273 1/30/2023
5.0.136 4,243 1/3/2023
5.0.135 3,424 12/30/2022
5.0.134 4,015 12/12/2022
5.0.133 3,758 12/8/2022
5.0.132 4,452 11/11/2022
5.0.131 19,191 11/1/2022
5.0.130 21,474 10/16/2022
5.0.129 43,206 9/8/2022
5.0.128 43,058 8/29/2022
5.0.127 43,465 8/24/2022
5.0.126 44,122 7/26/2022
5.0.125 43,154 7/19/2022
5.0.124 44,722 5/13/2022
5.0.123 43,010 4/30/2022
5.0.122 8,043 3/29/2022
5.0.121 44,818 3/25/2022
5.0.120 43,790 3/17/2022
5.0.119 43,029 2/15/2022
5.0.118 45,669 2/11/2022
5.0.117 7,889 2/2/2022
5.0.116 7,855 1/28/2022
5.0.115 42,936 1/26/2022
5.0.114 42,328 1/21/2022
5.0.113 42,219 1/21/2022
5.0.112 40,845 1/13/2022
5.0.111 26,703 12/29/2021
5.0.110 26,613 12/20/2021
5.0.109 26,694 12/11/2021
5.0.108 26,523 12/6/2021
5.0.107 28,328 11/29/2021
5.0.106 26,458 11/22/2021
5.0.105 27,357 11/13/2021
5.0.104 29,110 11/8/2021
5.0.103 29,895 11/5/2021
5.0.102 30,186 10/21/2021
5.0.101 29,283 10/14/2021
5.0.100 29,301 10/14/2021
5.0.99 2,162 10/13/2021
5.0.98 4,443 10/13/2021
5.0.97 29,973 10/11/2021
5.0.96 32,052 10/8/2021
5.0.95 4,075 10/7/2021
5.0.94 29,925 10/7/2021
5.0.93 31,110 9/23/2021
5.0.92 29,494 9/7/2021
5.0.91 30,383 7/31/2021
5.0.90 28,908 7/30/2021
5.0.89 28,585 7/30/2021
5.0.88 28,547 7/19/2021
5.0.87 29,091 7/13/2021
5.0.86 29,119 7/5/2021
5.0.85 30,433 6/16/2021
5.0.84 29,812 6/4/2021
5.0.83 29,270 5/15/2021
5.0.82 29,478 4/30/2021
5.0.81 29,331 4/26/2021
5.0.80 29,676 4/19/2021
5.0.79 28,977 4/16/2021
5.0.78 28,840 4/13/2021
5.0.77 28,606 4/12/2021
5.0.76 29,475 4/8/2021
5.0.75 28,894 4/7/2021
5.0.74 28,672 4/6/2021
5.0.73 29,019 3/29/2021
5.0.72 29,136 3/28/2021
5.0.71 29,170 3/26/2021
5.0.70 28,692 3/26/2021
5.0.69 28,834 3/24/2021
5.0.68 28,314 3/23/2021
5.0.67 27,229 3/18/2021
5.0.66 26,927 3/17/2021
5.0.65 27,425 3/12/2021
5.0.64 27,269 3/4/2021
5.0.63 3,060 3/4/2021
5.0.62 27,203 2/26/2021
5.0.61 27,512 2/17/2021
5.0.60 26,939 2/15/2021
5.0.59 26,715 2/13/2021
5.0.58 27,024 2/12/2021
5.0.57 27,511 2/7/2021
5.0.56 27,052 2/2/2021
5.0.55 27,006 2/2/2021
5.0.54 27,595 1/26/2021
5.0.53 27,093 1/25/2021
5.0.52 26,805 1/25/2021
5.0.51 27,428 1/21/2021
5.0.50 26,952 1/20/2021
5.0.49 26,825 1/19/2021
5.0.48 25,897 1/16/2021
5.0.47 27,419 1/14/2021
5.0.46 28,007 12/29/2020
5.0.45 28,197 12/23/2020
5.0.44 27,532 12/18/2020
5.0.43 53,796 12/14/2020
5.0.42 30,482 12/10/2020
5.0.41 28,433 12/1/2020
5.0.41-a3 2,349 11/30/2020
5.0.41-a2 2,291 11/30/2020
5.0.40 30,677 11/29/2020
5.0.39 26,797 11/22/2020
5.0.38 26,688 11/22/2020
5.0.38-a7 20,429 11/22/2020
5.0.38-a6 20,762 11/22/2020
5.0.37 30,053 11/13/2020
5.0.36 27,591 10/11/2020
5.0.35 27,533 9/20/2020
5.0.34 26,212 9/18/2020
5.0.33 27,226 9/15/2020
5.0.32 26,276 9/9/2020
5.0.31 26,357 9/3/2020
5.0.30 26,758 8/21/2020
5.0.29 26,879 8/11/2020
5.0.28 26,537 8/10/2020
5.0.27 27,099 8/10/2020
5.0.26 26,349 7/28/2020
5.0.25 26,201 7/19/2020
5.0.24 26,013 7/9/2020
5.0.23 25,969 7/7/2020
5.0.22 27,147 6/10/2020
5.0.21 26,803 6/9/2020
5.0.20 26,929 6/9/2020
5.0.19 27,237 6/4/2020
5.0.18 27,149 6/2/2020
5.0.17 26,824 5/29/2020
5.0.16 26,935 5/25/2020
5.0.15 26,935 5/21/2020
5.0.14 26,988 5/14/2020
5.0.13 27,052 5/12/2020
5.0.12 27,265 5/11/2020
5.0.11 27,272 5/9/2020
5.0.10 27,222 5/5/2020
5.0.9 27,418 5/4/2020
5.0.8 2,962 4/24/2020
5.0.7 2,956 4/22/2020
5.0.6 28,530 4/18/2020
5.0.5 26,673 4/16/2020
5.0.4 22,529 4/15/2020
5.0.3 24,048 4/12/2020
5.0.2 23,661 4/4/2020
5.0.1 9,559 3/27/2020
5.0.0 9,538 3/26/2020