How Barfinex Works
First Steps
Barfinex is an AI-Native Trading Operating System — five integrated services that cover the full trading lifecycle. This page is your orientation before you install anything.
Barfinex is not a trading bot or a strategy toolkit. It is an operating system for the trading process — from raw market data to traceable candidates, deterministic policy admission, and risk-governed execution.
The Five Services
Each service has a single, well-defined responsibility:
| Component | Responsibility |
|---|---|
| Provider | Market data gateway. Ingests, normalizes, and serves all exchange data. Single source of truth for the entire stack. |
| Detector | Strategy runtime. Evaluates typed rule configurations against live data and emits scored signals. |
| Advisor | Small deterministic policy stage. Validates immutable Detector candidates and signed Provider evidence, then records ADMIT or REJECT. |
| Inspector | Final sizing, risk, and execution authority. Validates every admitted candidate against configured policies. |
| Studio | Operations terminal. Real-time visualization of candidate lifecycles, policy decisions, risk state, and capital efficiency. |
How They Connect In A Private Runtime
Exchange
│
▼
Provider ──────────────────────────────────────────▶ Studio
│ (real-time via WebSocket)
├──▶ Detector ──▶ Advisor ──▶ Inspector ──▶ Exchange
│ (candidate) (policy) (risk/size) (orders)
│
└──▶ Event bus (Redis pub/sub)
All services subscribe and publish typed events.
Provider is the single authenticated entry point for Studio and operators: one runtime URL, one credential boundary, one WebSocket contract. The public website does not connect to this full runtime graph; it uses only sanitized read-only market-intelligence projections.
How Data Flows
- Provider receives raw ticks from the exchange and publishes normalized candles, trades, and order book updates inside the private event system.
- Detector subscribes to market data, evaluates rules on every new candle, and publishes a scored signal when threshold is crossed.
- Advisor validates the immutable candidate and signed Provider evidence, records
ADMITorREJECT, and durably hands off only admitted candidates. - Inspector calculates final size, validates the candidate against risk policies, and, if approved, routes execution through authenticated Provider operations.
- Studio observes the private runtime in real time through Provider's authenticated WebSocket.
Before You Install
- The private runtime uses Redis-backed eventing internally. Public website pages do not expose Redis channels.
- Provider must be running before any other service can register or receive data.
- Strategies are TypeScript configurations. Familiarity with TypeScript and Docker is expected.
- Exchange API keys and Provider credentials stay in your private environment. Public docs and website pages should not expose them.
How to Start
- Architecture — Understand how the services connect and why, before touching any configuration.
- Install Provider — The foundation. Everything else depends on it.
- Install Detector — Define your first strategy as a rule configuration.
- Configure Studio — Connect to your running stack and observe the full pipeline.