Getting Started
Prerequisites
- .NET 10 SDK
- Python 3.12+ (for
MovingAveragePython) - Access to the private Virtufin registries (
Virtufin.*NuGet packages — including the strategy devkit — andvirtufin-workmanagerPyPI package).
Run the tests
dotnet test Virtufin.Strategies.slnx # MovingAverage worker tests
python3 -m pytest MovingAveragePython/tests # Python worker tests
The Python suite falls back to a local worker_devkit stub when the
private PyPI feed is unreachable (see MovingAveragePython/tests/conftest.py);
CI always installs the real package.
Deploy a worker
Publishing is CI-driven. Once a worker package is on the feed, deploy it via the WorkManager (exactly like any virtufin-workers worker), binding two explicit topics -- the scenario's market-data feed and its position feed (not a wildcard: the deployed Dapr pubsub component is Redis Streams, which has no wildcard subscription support):
{ "topics": ["act.exchange.binance.candle.closed", "sc.LIVE.position.snapshot"] }
See the
strategy author guide for the
CreateWorkerRequest shape, or the worker READMEs.
Build your own strategy
The devkit's
strategy author guide
covers implementing IDecide and subclassing StrategyWorkerBase; the
MovingAverage worker in this repo is a worked example.