What is Virtufin?
Virtufin is an open, event-driven platform for building real-time trading systems. The platform replaces the typical "vendor stack plus glue" pattern with a small set of services that talk gRPC and Dapr to each other, governed by a published specification.
The problem
A modern quant team is usually running something like this:
- A market-data vendor (websocket, proprietary protocol, finicky reconnect)
- A homegrown order router (REST or FIX, depending on the broker)
- A strategy runtime in a single language (Python, often)
- A backtesting rig that re-implements half of the above
- A monitoring layer that knows all of this by name
Each piece is its own product. The contract between them is "ask the senior dev". Replacing any piece is a six-month project. A new strategy language means a new execution path. A new exchange means a new data adapter, a new backtest loop, a new monitoring graph.
The answer
Virtufin is built around three ideas:
-
One gateway, one protocol. Every backend service speaks gRPC to the API gateway. Clients — C#, Python, TypeScript — talk to the same gateway over gRPC (gRPC-Web in the browser).
-
Workers are first-class plugins. A worker is a package (a .NET DLL, a Python script or wheel, C# source, or a native shared library built against the C ABI, e.g. from C, C++ or Rust) that the WorkManager Runtime loads and runs. .NET DLL and native workers run inside the Runtime process; Python and C# source workers run in a child process. One wire protocol (CloudEvents Protobuf) is the same for every engine.
-
Events are the source of truth. All inter-service traffic flows through Dapr pub/sub on CloudEvents 1.0 envelopes. The world and scenario naming scheme gives the same producer a production address and a backtest address without any service-level change.
Principles
- Open spec first. Every contract has a page in openspec before any code lands.
- Polyglot where it makes sense. A worker is a binary. The platform is language-agnostic. SDKs are convenience.
- AOT-native. The .NET services are NativeAOT-compiled. No JIT, no warm-up, no surprises in production.
- In-process where it matters. .NET DLL workers run inside the
WorkManager Runtime process via
hostfxrand anAssemblyLoadContext: one CoreCLR, no IPC per call. - No magic. The configuration is in
versions.env, the services are inservices.json, the topic and state-key names come from the naming library. No Spring-style auto-discovery. - Boring infra. Dapr for pub/sub, state, and service
invocation, and actors for ownership. Kubernetes, or
dapr runon a laptop. Redis for the broker and state store. No bespoke consensus layer.
Where the open spec lives
The single source of truth for the platform is openspec (also rendered at specs.docs.virtufin.com). Every cross-cutting decision — pub/sub topic naming, state key prefixes, scenario registry semantics, worker wire protocol — has a spec page. The services implement the spec; they do not invent it.