Getting started

Getting started

Install the SDK

Set up your toolchain and add the NuGet package every plugin compiles against.

What the SDK is

SabrTrader.Sdk is a meta-package. It contains no code of its own: it pulls in the contract assemblies a plugin compiles against and adds one MSBuild target that can deploy your build. This one package is enough for every plugin kind: indicators, strategies, bar types, drawing tools, Market Analyzer columns, add-ons and venues.

It brings in four contract assemblies as transitive dependencies:

Assembly it brings in What you get from it
SabrTrader.Pipeline.Contracts Indicators, plots, series, bars, ticks, market depth, drawing tools, Market Analyzer columns, alerts, the data-provider surface, and the venue-agnostic options data model (chain reader, contracts, quotes, bounded snapshots).
SabrTrader.Pipeline.Venues.Contracts The venue seam (plugin, descriptor, manifest, session) plus orders, positions, accounts, risk, ATM brackets, multi-leg option orders, the option chain SPI and trade history.
SabrTrader.Pipeline.Strategies.Contracts The Strategy base class, its runtime context, the strategy catalog and backtest analytics.
SabrTrader.Pipeline.AddOns.Contracts Add-ons: your own windows and Control Center menu entries, plus the host surface they read accounts, history and live ticks through.
Contracts only. The SDK assemblies hold interfaces, base classes, attributes, enums, data records and a small set of helpers. The platform provides the implementations at load time and always binds your plugin to its own copy of these assemblies, so you deploy your plugin DLL without them. Dependencies & isolation has the details.

Why a single package

The four contract packages share one version number and are released together, so one SabrTrader.Sdk version fixes the entire API you build against. You cannot end up with Venues.Contracts from one release and Pipeline.Contracts from another. Update the SDK version deliberately, and rebuild and test your plugin when you do.

Prerequisites

  • The .NET 10 SDK. Plugins target net10.0. Every SDK assembly targets net10.0, and the platform runs on .NET 10, so this is both the minimum and the maximum. Use net10.0-windows only when your plugin uses WPF types directly.
  • An IDE or editor. Visual Studio 2022 or later, JetBrains Rider, or VS Code with the C# Dev Kit. No SabrTrader-specific IDE extension is needed.
  • SabrTrader installed, to load and test your plugin. The platform loads plugins from Documents\SabrTrader\Plugins; see Where to deploy.

Installing the package

The SDK is published on nuget.org as SabrTrader.Sdk, so the default NuGet source finds it and no extra package source is needed. Adding that one package also restores the four contract packages it depends on (SabrTrader.Pipeline.Contracts, SabrTrader.Pipeline.Strategies.Contracts, SabrTrader.Pipeline.Venues.Contracts and SabrTrader.Pipeline.AddOns.Contracts), all at the same version.

Add the package from the command line or through your IDE's NuGet UI:

shelldotnet add package SabrTrader.Sdk

This writes a <PackageReference Include="SabrTrader.Sdk" Version="..." /> entry into your project file with the latest version. You can also add that line to the project file by hand; the next page shows the full .csproj.

The auto-deploy MSBuild target

The SDK package ships an MSBuild .targets file that NuGet imports into your project automatically. It adds one opt-in target that copies your built plugin DLL (and its PDB, when present) into the plugin folder after every build. It does nothing until you set the property.

Turn it on with one property in your plugin's .csproj:

MyPlugin.csproj (PropertyGroup)<DeploySabrTraderPlugin>true</DeploySabrTraderPlugin>

The destination defaults to Documents\SabrTrader\Plugins, the folder the platform loads plugins from. The target uses your real Documents folder, so it follows a Documents folder that is redirected to OneDrive. To deploy somewhere else, set the destination explicitly:

MyPlugin.csproj (PropertyGroup)<SabrTraderPluginsFolder>D:\dev\sabrtrader-plugins</SabrTraderPluginsFolder>
Property names. The opt-in property is DeploySabrTraderPlugin and the destination property is SabrTraderPluginsFolder. Type them exactly as written. The next page shows the full .csproj, and Where to deploy covers the plugin folder.