Skip to content

Installation

Library version: __LIBRARY_VERSION__ (from versions.env)

All examples are tested against this version. Bump LIBRARY_VERSION in versions.env and all package specs (pyproject.toml, Directory.Packages.props, package.json) to match.

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 websocketmanager/binance_clob_example.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 WebSocketManager and WorkManager, 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 (0.8.12+, for the API key)

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