Table of Contents

API Installation

NuGet is a package management system integrated into Visual Studio. It makes it easy to install and update packages, including S#.

All S# packages are compiled for .NET 6. This is a cross-platform version (connectors, backtesting, storage, etc. are available in any OS), but graphical components are supported only on Windows.

Public NuGet Server

  1. Right-click on the project and select Manage NuGet Packages... from the context menu:

Context menu

  1. A window will appear as shown in the picture:

NuGet window

  1. In the search box in the top right corner, type "StockSharp":

StockSharp search

  1. S# is divided into several NuGet packages:

When you select a package, all dependencies will be installed automatically.

  1. Select the desired package and click Install:

Package installation

  1. After installation, S# files will be added to the packages folder and linked as references in the project.

Trading robot examples are available on GitHub.

Private NuGet Server

Some components (like crypto-connectors) are only available through the private NuGet server for registered users.

There are two ways to connect:

Method 1: Authentication via token in the address

  1. Register on the StockSharp website.

  2. Copy the token from your personal account:

Personal account

  1. Follow steps 1 and 2 from the Public NuGet Server section and open the available feeds settings window:

Feed settings

  1. In the window that appears, add a new feed by specifying the address as https://nuget.stocksharp.com/{token}/v3/index.json. For example, https://nuget.stocksharp.com/AAHBWDNOINXWNJNWD/v3/index.json:

Adding feed

  1. Click OK and select the created feed. If you have access to private components, a list of available NuGet packages will appear:

Package list

  1. Select the desired package and click the Install button.

Method 2: Authentication via username and password

  1. Add a package source with the address https://nuget.stocksharp.com/x/v3/index.json.

  2. When you try to use this source, an authentication window will appear:

Authentication window

  1. Enter your StockSharp account username and password. You can save your credentials to avoid entering them each time.

  2. After successful authentication, you will have access to private packages.

  3. If you prefer token authentication, you can enter "x" in the username field and your token in the password field.

If you need to reset saved credentials:

  1. Open "Credential Manager" in Windows (Control Panel → User Accounts → Credential Manager)
  2. Find VSCredentials related to nuget.stocksharp.com in the list
  3. Delete these credentials

Package Updates

To check for updates:

  1. Open Manage NuGet Packages...
  2. Go to the Updates tab
  3. Select the packages to update and click Update

Package updates

Warning

To check for updates on public and private servers, you need to switch the package source, as VS 2019 does not track multiple sources simultaneously.

Installer

Installer is a special application for simplified installation of all StockSharp products.