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 entire trading process — from raw market data to executed orders, with AI decision-making and risk governance built in at every stage.
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 | AI decision engine. Runs an 8-stage pipeline on every signal: market quality check, ML conviction scoring, regime-aware calibration, LLM synthesis, spread and R/R validation. |
| Inspector | Risk governor. Validates every execution intent against configured policies. Manages protective orders for all runtime positions. |
| Studio | Operations terminal. Real-time visualization of signals, AI decisions, risk state, and capital efficiency. |
How They Connect
Exchange
│
▼
Provider ──────────────────────────────────────────▶ Studio
│ (real-time via WebSocket)
├──▶ Detector ──▶ Advisor ──▶ Inspector ──▶ Exchange
│ (signals) (AI decision) (risk gate) (orders)
│
└──▶ Event bus (Redis pub/sub)
All services subscribe and publish typed events.
Provider is the single entry point for Studio: one URL, one auth token, one WebSocket. All other services are reachable through Provider's proxy.
How Data Flows
- Provider receives raw ticks from the exchange and publishes normalized candles, trades, and order book updates to the event bus.
- Detector subscribes to market data, evaluates rules on every new candle, and publishes a scored signal when threshold is crossed.
- Advisor receives the signal, runs its 8-stage AI pipeline, and publishes a decision with an execution intent.
- Inspector receives the execution intent, validates it against risk policies, and if approved, places orders through Provider's order API.
- Studio observes everything in real time through Provider's WebSocket.
Before You Install
- All services communicate through a shared Redis event bus. Redis is a hard dependency.
- 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 stay in your environment. Nothing is sent externally.
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.