BijectiveLabs/bitra
bitra (CLI name tra) is an MIT-licensed Python framework from Bijective Labs for autonomous trading agents. Language models only read system-computed figures and give opinions, while deterministic code prices the round trip, applies declared limits, sizes the trade and sends one order with stop attached. Every cycle's briefs, answers and refusals are stored on disk with hashes. It supports many model providers and ccxt venues, with sandbox, demo and mainnet tiers.
What it claims
bitra (installed from PyPI as bitra, run as tra, formerly published as trading-research-agents before 0.10.1) has no model touch arithmetic, sizing or orders. The README lists failure modes it designs against: models miscalculating figures, sizing their own positions, ignoring user limits, leaving positions without stops after a crash, and following injected feed text. Each has a concrete mechanism. A model that cites a figure is checked against its brief, value included. Only roles that decide nothing see outside text. No model can loosen a control: it can only tighten limits, step the ladder down or arm the kill switch. One decision produces at most one order, and venue errors are never retried. The project calls itself an early release with settings that will change between versions. Its public history starts on 12 September 2026, and the repository opened in October 2026.
How it works
A pass measures each instrument in the universe with one data pull. A trigger holds quiet markets without spending tokens. A screener picks among the instruments the system admitted. It cannot add others.
flowchart TD
trig{"anything moved?"} -- no --> held["held, no tokens"]
trig -- yes --> scr["screener picks"]
scr --> an["4 analysts in parallel"]
an --> cost["system prices round trip"]
cost --> ex{"breaks even at half winning?"}
ex -- no --> ref["refusal naming its figure"]
ex -- yes --> val["validators pro/contra/judge"]
val --> conf{"declared states agree?"}
conf -- no --> ref
conf -- yes --> gate{"edge clears cost x margin?"}
gate -- no --> ref
gate -- yes --> ord["intent; one order with stop+TP in venue mode"]The four analysts each have a fixed job:
- The technical analyst proposes a direction, a setup from a fixed list, a confidence, a horizon and its own stop and target.
- The macro analyst answers risk-on, risk-off or neutral.
- The on-chain analyst answers accumulation, distribution or neutral.
- The sentiment analyst gives a label.
Each view becomes a score from -1 to 1 against user-drawn thresholds. Conviction sums them. For example, a 0.70 short against barely bullish context scores 0.56 and trades at half size, and against strongly bullish context it scores 0. The validators' votes move conviction only by [conviction].validator_weight. The system refuses a setup that does not fit the measured regime by name, such as a trend trade in a range. Every model answer is parsed against a closed schema, even from providers with only JSON mode.
Evidence
A real BTCUSDT cycle shows the gates. The cost was 12.87 bps round trip, 2.00 bps of it estimated. The risk was 8.29 bps of equity against a declared 50. The claimed edge of 25 bps cleared the cost gate. The trade was still refused because the edge was 1.94x the cost against a declared 2.0x.
Six venues have run end to end on demo or testnet APIs with real orders: Bybit, OKX, Bitget, BingX, Binance and Gate. Binance and Gate place exits right after the fill rather than with the entry. Live-tested models are Groq openai/gpt-oss-120b and openai/gpt-oss-20b, plus gemini-flash-latest as the fallback. Anthropic and OpenAI are unit-tested only, and the other providers are presets.
How to use it
Requires Python 3.11 or newer.
uv tool install 'bitra[ccxt,openai,anthropic,google,data]'
tra init my-desk --profile autonomous --agent groq
cd my-desk
cp .env.example .env # then set GROQ_API_KEY=... in .env
tra check
tra run
tra run --every 15mFor demo orders:
tra init my-desk --profile autonomous --agent groq --venue bitget
cd my-desk
tra keys --probe --prepare
tra mandate --sign "Your Name" --venue-mode
tra checkA new desk starts with these defaults:
- Sandbox only, trading BTCUSDT on Bybit as a taker on 15-minute bars.
- 0.5% equity risk at the stop, with the stop between 0.2% and 3% and never inside one ATR.
- A target between 1.5x and 4x the stop.
- No new entries after a 3% daily loss or a 10% drawdown.
- A 4-hour timeout and at most 6 trades a day.
- The
--venuepreset uses 3x isolated leverage with at most 200 per order.
Taker entries are limit IOC orders, never naked market orders. Records live under runs/cycles/<id>/ with sha256 hashes, and tra runs verify checks them. Exit codes are 0 for cleared, 1 when a gate refused and 2 for a usage error. tra mcp serve exposes the read-only gates over MCP. The licence is MIT.
Limits
The authors have not run mainnet themselves and say to verify it small. Position checks run only at the start of each tra run --every pass. Without a running desk, a position has only its venue-side stop and take profit, so unattended use needs a supervisor such as systemd or tmux.
Some venues have restrictions:
- dYdX, Paradex, Extended, Lighter, Deribit, Crypto.com and Coinbase International cannot hold exits at the venue through ccxt.
- Kraken and Phemex are data-only.
Inverse contracts, dated futures and options are refused in venue mode. Prediction markets have run only in sandbox. Model spend is uncapped unless a ceiling is declared. The included strategy cores are examples, not edges. Only PyPI releases are meant to be run, not the develop branch.
Organisations named here
- Bijective Labs
- Groq
- Anthropic
- OpenAI
- DeepSeek
- Mistral
- xAI
- OpenRouter
- Qwen
- Ollama
- Bybit
- OKX
- Bitget
- BingX
- Binance
- Gate
- WEEX
- BloFin
- WOO X
- Hyperliquid
- Pacifica
- WOOFi Pro
- ModeTrade
- KuCoin Futures
- Deepcoin
- dYdX
- Paradex
- Extended
- Lighter
- Deribit
- Crypto.com
- Coinbase International
- Kraken
- Kraken Futures
- Phemex
- Polymarket
Technologies named here
- openai/gpt-oss-120b
- bitra
- ccxt
- openai/gpt-oss-20b
- gemini-flash-latest
- uv
- Claude Opus 5.5
- tra mcp serve
- MCP server
- FRED
- Crypto Fear & Greed Index
- ruff, mypy, pytest
- systemd, tmux
- PyPI
- Model Context Protocol
- Groq
- OpenAI API
- Gemini
- LLM
- gpt-oss-120b
- gpt-oss
- Anthropic
- Python
Techniques named here
- Deterministic execution with model-proposed opinions
- Cost gate
- Conviction scoring
- Pro, contra and judge validators
- Regime-aware setup selection
- Provider fallback and closed-schema parsing
- Exits attached to entry
Related in agents



