SimulatedExecutor
Deterministic simulated order executor for hyp.* scenarios (managed
JIT, application/x-dotnet-dll), built on
virtufin-execution-devkit.
Behaviour
Subscribes to one topic per scenario it serves:
sc.<scenarioid>.trading.order.submitted.
- Buy/Sell orders with a limit price fill immediately, in full, at
that limit price (
Virtufin.Base.Execution.DeterministicExecutorBase). No slippage, no partial fills, no order book. - Market orders throw
NotSupportedException-- filling one needs a market price, and this worker has no market data feed wired in yet. A real follow-up: subscribe to the scenario's market-data topic too, mirroring how a strategy worker observes both. - Any other action type (
CancelOrder,TransferAction, etc.) throws -- out of scope for this executor.
Publishes the pubsub-topics spec's Trade Lifecycle Events:
sc.<scenarioid>.trading.order.filled, ce-type =
com.virtufin.trading.order.filled, ce-subject = order/<order_id>.
remaining_qty is always 0 (full-fill only); liquidity/
realized_pnl aren't populated (TradeEvent.FillReceived in
Virtufin.Base doesn't carry them yet).
Deploy
cd SimulatedExecutor
python3 scripts/build_managed.py --csproj src/Virtufin.Worker.SimulatedExecutor/Virtufin.Worker.SimulatedExecutor.csproj
python3 scripts/publish.py --worker-nupkg /tmp/worker-out/Virtufin.Worker.SimulatedExecutor.nupkg
python3 scripts/create_worker.py --api-client-host localhost --api-client-port 5002
Edit config/config.json's topics (or pass --topic, repeatable)
to the scenario(s) this instance should serve first -- the default is
a placeholder.
Package
Virtufin.Worker.SimulatedExecutor on the private Gitea NuGet feed;
CI publishes via .github/workflows/simulatedexecutor-nuget.yaml.