/builds / beacon-trader

Beacon Trader

An automated trading portal, built from scratch.

architecture · hover or tab through services
signals publish consume rates orders positions https Telegram channels Signal ingestion Redis Live FX rates Executor Broker APIs Monitor PostgreSQL API · FastAPI Frontend · React Operator
Trace a serviceHover, tap or tab to a node to see what it does and what it talks to.
Telegram channels
Signal providers post trade ideas in Telegram channels. This is the platform's only inbound event source.
Signal ingestion
A Telethon client that listens to the channels, parses free-text signals into structured intents, and publishes them to Redis.
Redis
The event bus and working cache between ingestion, the API and the executor.
Live FX rates
Live conversion rates, so risk is sized in account currency, whatever the instrument is quoted in.
Executor
Sizes risk, then fans each signal out into orders (entries × take-profits) through the broker abstraction.
Broker APIs
Reached only through the broker abstraction. Each application has its own API key (see the postmortem below).
Monitor
Watches open positions and broker state, reconciles them with the ledger, and raises alerts.
PostgreSQL
The system of record: signals, orders, fills, positions and configuration.
API · FastAPI
A REST API for the console: configuration, channel strategies, positions and history.
Frontend · React
The operator console, built with React and Vite and served as a static build.
Operator
Me. On call for everything on this diagram.

Overview

A real-time event-processing platform: it reads trading signals from Telegram, sizes risk with live FX conversion, and fans orders out to brokers through one abstraction. Six containerised services, one on-call engineer.

What it does

  • Six containerised microservices on Docker Compose: API (FastAPI), Telegram signal ingestion (Telethon), executor, monitor, Redis, and a React/Vite frontend, with PostgreSQL for persistence
  • Signal parsing, risk sizing with live FX conversion, and order fan-out (entries × take-profits)
  • A broker abstraction, so execution logic never talks to a vendor SDK directly

Postmortem

⚠ Broker API session quota exhausted
symptom
Order placement started failing intermittently with session-limit errors from the broker.
cause
Two applications shared one broker API key, so together they exhausted that key's session quota.
fix
A dedicated API key per application, so one app's sessions can never starve another's.