An open source crypto trading agent, self-hosted, BYO keys
Farol cross-checks 11 technical indicators with 14 news sources, Smart Money Concepts (Order Blocks, FVG, BOS), macro context (DXY, SPX, Fear & Greed) and derivatives data. The agent runs every hour, persists structured signals in SQLite, and you decide whether to trade. Clone, configure your Binance API key, run docker compose up.
MPL 2.0 license · Built in the EU · 8 tokens covered · Self-hosted Docker · No telemetry, no SaaS, no third party touches your keys.
Run it locally in 3 steps
No SaaS sign-up, no API key to anyone but Binance, no third party reading your trades. The agent runs on your machine (or your VPS) and reports to no one.
Clone the repo
git clone the repository, cp .env.example .env, paste your Binance API key (spot trading only, no withdraw permissions) and an LLM API key (Anthropic, Google AI, OpenRouter — your call).
Run docker compose up
Single docker compose up -d brings up the agent container + SQLite volume. Cron runs every hour. Logs stream locally. You can verify by curling the local /api/health endpoint.
Read, decide, act
The agent persists structured signals (direction bias, indicator vote, news sentiment, SMC patterns, LLM rationale). You read them via local API, dashboard or by querying SQLite. Trade execution is opt-in and stays under your control.
Architecture
Inside the agent
Four analysis layers run every hour, in parallel where possible, and feed a final LLM decision. Every output is structured JSON, persisted in SQLite. Read the source — it's open.
Technical analysis (TA)
11 indicators voting on each token: RSI, MACD, EMA crossovers, Bollinger Bands, Stoch RSI, ADX, MFI, CCI, VWAP, ATR direction, candle pattern. Plus an Ensemble score and a Holt-Winters forecast (ETS). Deterministic, no LLM here.
{
"tendance": "BAISSIER",
"haussiers": 3, "baissiers": 8, "neutres": 0,
"rsi": 28.4,
"macd_cross": "bearish",
"adx_force": "FORT",
"ensemble_score": -0.62
} News sentiment
14 RSS feeds polled every cycle, deduplicated by URL hash. An LLM reads only new articles and returns a sentiment score per token. If no new articles, zero LLM calls.
{
"sentiment": "NEGATIF",
"score": -0.42,
"nb_articles_new": 7,
"summary": "ETF outflows
accelerating, regulatory
pressure rising"
} Smart Money Concepts
Detect Break of Structure (BOS), Order Blocks, Fair Value Gaps from OHLCV swings. Outputs a bias score [-100, +100] and a summary string injected directly into the trader's prompt — making whale movements visible to the model.
{
"bias": -65,
"bos": "BEAR",
"order_blocks": 2,
"fvg_count": 1,
"summary": "Recent BOS
bearish, institutional
sell zone 67200-68100"
} LLM trader decision
Final synthesis: a multi-source prompt is sent to an LLM (Workers AI Llama, Claude Haiku, Gemini Flash — your choice) with the regime context, open positions, last 3 decisions, and SMC patterns. Output is a typed JSON: BUY / SELL / HOLD with confidence score [20-99].
{
"token": "BTC",
"direction": "SELL",
"score_confiance": 75,
"raison": "BOS bearish
+ 8/11 indicators bearish
+ funding > 0.06%",
"model": "llama-3.3-70b"
} # 1. Clone the repo
git clone https://github.com/FredericoRB/farol # TBD
cd farol
# 2. Configure your keys
cp .env.example .env
# edit .env — add BINANCE_API_KEY (spot only),
# ANTHROPIC_API_KEY (or OPENROUTER_API_KEY)
# 3. Run the agent
docker compose up -d
docker compose logs -f agent Why open source
Crypto trading SaaS is a regulatory minefield (MiCA, PSAN, MiFID II). Rather than play the compliance game, Farol publishes the agent logic — you run your own copy, with your own keys, in your own jurisdiction. No central operator means no central risk.
Multi-source synthesis
11 technical indicators × 14 news feeds × Smart Money Concepts × derivatives (funding, OI) × macro (DXY, SPX, F&G). Cross-checked so one noisy source doesn't skew the read.
Hourly, never sleeps
The cron runs every hour on your container. No stale cache, no rate limits from a SaaS, no shared rate-limit pool with thousands of users.
Structured, not prose
Each output is typed JSON: direction bias, confidence score, indicator vote, SMC bias. Persisted in SQLite. Plug it into your own dashboard, alerts, or trading bot.
You stay in control
Your Binance API key never leaves your machine. The agent can run paper-only or wire trade execution under strict safeguards (rate limits, hard caps, daily loss circuit breaker). No copy-trading, no service, no central account.
STAY IN THE LOOP
Follow the project on GitHub
Star the repo to follow updates, file issues for bugs or feature requests, open PRs to contribute. The repo will be linked from the CTA above once the public release lands (Phase 4 of the roadmap).
Public repo coming soon — repo URL will appear here.