Skip to content

Installation

Library version: __LIBRARY_VERSION__ (from versions.env)

LIBRARY_VERSION is the examples' own release version. The Virtufin.* packages are pinned one by one in pyproject.toml, Directory.Packages.props and package.json, each at its own version (no lockstep): a pin moves when that package publishes a new version.

Gitea Registry Authentication

All Virtufin packages are hosted on authenticated package registries. Authentication requires a personal access token with read:packages scope.

Python (uv)

cd python
source ../.env
export UV_INDEX_VIRTUFIN_USERNAME=$VIRTUFIN_REGISTRY_USER
export UV_INDEX_VIRTUFIN_PASSWORD=$VIRTUFIN_REGISTRY_TOKEN
uv sync

Run examples:

uv run python binance_order_book.py

C# / F# (NuGet)

The dotnet/NuGet.Config file uses environment variable substitution:

<packageSourceCredentials>
  <Virtufin>
    <add key="Username" value="%(VIRTUFIN_REGISTRY_USER)" />
    <add key="ClearTextPassword" value="%(VIRTUFIN_REGISTRY_TOKEN)" />
  </Virtufin>
</packageSourceCredentials>

With VIRTUFIN_REGISTRY_USER and VIRTUFIN_REGISTRY_TOKEN set, run:

cd dotnet
dotnet restore

Alternatively, configure manually:

dotnet nuget add source https://nuget.haenerconsulting.com/api/packages/virtufin/nuget/index.json \
  --name Virtufin --username <user> --password <token>

TypeScript (npm)

Create ~/.npmrc or use the project's .npmrc:

//npm.haenerconsulting.com/api/packages/virtufin/npm/:_authToken=<your-token>

Then:

cd typescript
npm install

Packages Used

Every example talks to one API gateway, which also reaches WorkManager (and through it the WebSocketFeed workers that hold the venue connections), so each language needs only its gateway client:

Language Package
Python virtufin-api
C# (notebooks) Virtufin.Api.Client, through Virtufin.Examples.Notebooks
TypeScript @virtufin/api, @virtufin/naming and @virtufin/marketdata-devkit (venue names, presets, feed resolver), at the versions typescript/package.json pins

Which gateway is set per example by its context name; see Getting Started.