Skip to content
BijectiveLabsPublic

Bijective

CI Licence: Apache-2.0 Rust 1.97.1 Python 3.12 to 3.14 Release PyPI Coverage

Website Docs Insight

BranchVersionBuild
master 0.1.3, the latest release build
dev development, the default branch build
Computer How the platform runs Guide
Linux (x86_64, aarch64) Directly, with systemd 250 or newer Installation
Windows 10 or 11 Inside WSL 2: wsl --install -d Ubuntu On your computer, a node on a Windows workstation
macOS Inside a Linux virtual machine: brew install lima, limactl start On your computer
Container Every program, client strategies bounded inside the container (cgroup v2 host) Containers

Every strategy run is bounded by the Linux kernel (cgroup v2 and namespaces). On Windows and macOS the platform therefore runs inside a Linux, the way container and cluster tools do, and a first command started outside one names the fix for that computer.

Introduction

Bijective is a self-hosted, multi-asset trading platform: crypto spot and perpetuals on centralised and decentralised venues, prediction-market outcomes and US equities. It is built so that no decision reaches a venue without passing risk evaluation, and every decision can be reconstructed afterwards.

The core is written in Rust. Strategies run as separate, sandboxed processes and may be written in any language that reads and writes lines of JSON. A Python library is provided. Backtest, paper and live run the same strategy program through the same order path and write the same record.

The operator owns the node, the keys, the data and the record. Nothing calls home, and every format the node writes is documented, so everything it holds can be read without anything else from us.

Status

Early development: version 0.1.3, and interfaces will change before 1.0. Status as of 2026-11-29, with the evidence for each venue on its integration page.

Area State
Event store, clock, bus, deterministic replay Built
Risk limits at six scope levels, safe states, order path with mandatory clearance Built
Order terms: time in force, post-only, stop orders, linked orders, expiry at a time, price collar, flatten Built (decisions 0009 to 0014)
Bybit adapter Market data, account read, private streams, submit, cancel and stop orders exercised end to end through a node
Alpaca adapter (US equities) Market data, session gate, submit, cancel, evidence and stop orders exercised end to end through a node
Hyperliquid adapter Market data verified against the live venue. Signing, account read, submit, cancel and evidence built, not yet exercised against the venue
Polymarket adapter Market data verified against the live venue. Signing, submit, cancel and evidence built, not yet exercised against the venue
Simulated venue, paper runs Built: orders, fills, positions and reconciliation run the live code with no order leaving the node. A paper venue is rebuilt from its record at start (decision 0018) and reconciled once more when the run stops
Backtest Built: proposals measured against the recorded market and, given a node configuration, placed on simulated venues through the order path (decision 0015, stage 1). The strategy is not yet told of its fills in a backtest (stage 2)
Strategy sandbox, live sessions, promotion stages Built (Linux, cgroup v2)
MCP server for research agents Built: bijective-mcp runs the research programs for an agent, read-only by default, with no route to an order (decision 0020)
Market history from a client's CSV or JSON Lines file Built for top-of-book rows (decision 0016, stage 1)
Reconciliation, execution cost, failure detection Reconciliation on a cadence and on venue reports, and an execution cost table against the book at the decision, built. Missing-event evaluation planned
Operator console Built: one console for every run mode (decision 0017), TLS with client certificates, signed commands, tables and an event stream for programs, OpenMetrics
Deployment kit Built: release artefact and systemd units verified, container composition from the same manifest, a paper node in containers drilled on every change. The release workflow publishes the artefact and the node image from a version tag

Design commitments

  • Risk is a gate, not a library. Submitting an order requires a clearance that only a passing risk evaluation can mint. There is no code path from a strategy to a venue that skips it.
  • Fail closed. A node starts halted. Missing inputs, inputs older than the declared staleness bound, and limits that cannot be evaluated stop orders.
  • Events are the source of truth. State is rebuilt by replaying an append-only, hash-chained event store. The same inputs replay to byte-identical outputs.
  • No floating point for money. Prices, quantities and amounts are scaled integers end to end.
  • Venues are adapters. Nothing above the adapter contract names a venue. Adding a venue means adding one crate.
  • A timeout is unknown, not failed. An order whose outcome is unknown is reconciled against the venue, never assumed.
  • One strategy code path. Backtest, paper and live run the same strategy program through the same supervisor and write the same record.

Versioning and releases

Bijective is in early development. Until 1.0, a minor version may change an interface, a format or a flag. Every such change is stated in the release notes with the action an operator must take.

  • Version numbers follow Semantic Versioning. The platform version is the one the deployment manifest declares, and every runbook is bound to it (Runbooks gate).
  • Release notes are in RELEASES.md: what changed, and any action an operator must take before or after upgrading.
  • Release artefacts are published from a version tag by .github/workflows/release.yml: the binaries, the generated units, the strategy library and a recorded digest of each file, checked before anything is unpacked (verify a release), and the node image at ghcr.io/bijectivelabs/bijective.

Branches

  • master: the latest released version, and the most stable branch. Nothing is written to it directly: it moves only by a pull request from dev that passes CI, at a release.
  • dev: the default branch, where development happens and pull requests land. Every change passes the same gates as a release.

Engineering practices

What an operator relies on is checked by a machine on every push, not by a reviewer's memory. The gate runner (scripts/ci/run_gates.sh) runs 42 gates, and a gate that cannot run is a failure. The full list is in Quality gates. Among them:

  • The order path is closed. An order cannot be submitted without a clearance that only the risk evaluation mints, and only a live session writes proposals.
  • Replay is exact. The same record replays to byte-identical outputs, and the market archive rebuilds byte for byte from the journal and survives a killed process.
  • Recovery is drilled. An interrupted start leaves the platform halted, a backup restores and verifies, and the keystore seal holds.
  • No floating point for money, no unsafe code in any crate, and no outbound network connection above the adapter contract.
  • Dependencies are accounted for. Every package in Cargo.lock is attested with its licence, only permissive licences are accepted, and the third-party notices match the attestation.
  • Documentation is checked against the tree. Runbooks name drills that exist, the gate table lists exactly what the runner executes, and every venue adapter cites its sources with a date.

Technology choices are made by measurement, and the ones examined and not adopted are recorded with their evidence in Technology.

Repository layout

assets/           Images used by the documentation
crates/           Rust crates: core, adapters, engines and operational tooling
python/           Python packages: the strategy protocol library, attribution, detection
docs/             Documentation
scripts/ci/       Change gates run on every push and pull request
scripts/release/  Release artefact assembly
scripts/verify/   End-to-end drills
scripts/measure/  Measurement scripts

Quick start

On Linux, run it directly. On Windows, run it inside WSL 2 (wsl --install -d Ubuntu). On macOS, run it inside a Linux virtual machine (brew install lima, limactl start, then lima). The release artefact needs no build, and from 0.1.3 a release installs with one command: see Installation.

cargo build --release
export PATH="$PWD/target/release:$PATH"

bijective-backtest --new alpha.py   # write a strategy that runs, and seed a sample market
bijective-backtest alpha.py         # run it, bounded by the sandbox
bijective-promote store alpha.py 19600

See Getting started for requirements and what each step does, and Run a first strategy on a live market for a paper run on a live public market with no venue key.

Console

Console

bijective-console serves the operator's view of one run: live, paper or backtest (--mode). It binds loopback unless it is given HTTPS with client certificates, signs operator commands for the node whose record it shows, and answers every panel as a table at /api/panels, as an event stream at /api/events and as OpenMetrics at /metrics. See Observability and Reach the console from another machine.

Documentation

Security

Report a vulnerability privately through GitHub Security Advisories, never in a public issue. Scope, what to include and the security model are in SECURITY.md.

Contributing

Contributions follow CONTRIBUTING.md and the code of conduct. Pull requests target dev. Run the gates before opening one: bash scripts/ci/run_gates.sh.

License

Apache License 2.0. See LICENSE and NOTICE. Third-party notices are in THIRD_PARTY_LICENSES.md. Every source file carries its licence notice, and TRADEMARKS.md says how the name may be used by a fork or a redistribution.

What is released here stays open:

  • A capability released under this licence is never moved behind a paid product, and a released version's licence is never changed.
  • Safety is never paid for: risk limits, halt, cancel, reconciliation, signed operator commands and TLS are part of this repository.
  • Formats are open: the event store, the wire formats and the market archive are documented, so everything a node holds can be read without anything else from us.
  • Nothing here depends on a Bijective Pro component.