// NYSE + 5 CRYPTO EXCHANGES · IBKR PAPER ACCOUNT · STATUS: LIVE-LIKE

NO EMOTIONS.
NO OVERRIDES.
NO EXCUSES.

IrieTrade is a fully automated, risk-managed trading bot built from scratch in Python. It trades NYSE equities through Interactive Brokers and crypto pairs across five exchanges, sizes every position by the book, and never once asks how it feels about a trade.

01 / THE MACHINE

Built from scratch. Runs like a headless VPS ghost.

No SaaS dashboard, no drag-and-drop bot builder. Every module, the hybrid data pipeline, the signal resolver, the broker layer, the risk manager, is hand-written Python. Dependency injection wires them together so any piece swaps out or gets unit-tested on its own.

  • Position-aware signal resolver merges every strategy's output per symbol and only proposes actions consistent with what the book already holds. No accidental naked shorts, no double entries.
  • Multi-broker execution runs Interactive Brokers alongside Binance, OKX, Coinbase, Kraken and KuCoin through one Broker interface, with an NSE stub waiting on Nairobi's exchange to ship a public API.
  • Hybrid data pipeline pulls US equities from Yahoo Finance with local Parquet caching, and routes anything with a slash in its ticker (like BTC/USDT) straight to the exchange via ccxt.
  • Onboarding wizard at /setup writes .env and settings.yaml for you and tests each broker connection live, no manual YAML editing required.
Vintage CRT monitor terminal, representing IrieTrade's headless engine

fig. 01 · the brain, before the cloud had one

02 / HOW IT THINKS

Five strategies. One resolver. Zero double-guessing.

Every strategy votes on every symbol. The resolver only acts on votes that make sense given the current position, and clears an existing position before it ever opens the opposite side. A Donchian-channel breakout module is next on the list.

strategies/trend_following_ls.py

Trend-Following L/S

Long when the 50-SMA clears the 200-SMA and RSI dips under 30. Short the mirror image: 50 below 200, RSI over 70. Bracket orders protect both sides.

IF sma50 > sma200 AND rsi < 30 → ENTER_LONG IF sma50 < sma200 AND rsi > 70 → ENTER_SHORT

strategies/trend_following_long_only.py

Trend-Following Long

Same crossover logic as the L/S version, minus the short side. Built for cash accounts and crypto exchanges that can't borrow to sell.

IF sma50 > sma200 AND rsi < 30 → ENTER_LONG IF sma50 < sma200 → EXIT_LONG

strategies/mean_revisions.py

Mean-Reversion

Bollinger Bands paired with RSI. Buys the fear when price snaps below the lower band with RSI under 30, sells the euphoria above the upper band with RSI over 70.

IF price < lower_bb AND rsi < 30 → ENTER_LONG IF price > upper_bb AND rsi > 70 → EXIT_LONG

strategies/orb.py

Opening Range Breakout

Marks the high and low of the first 30 minutes of trade. A volume-confirmed break of either side triggers an entry in that direction.

range = high_low(first_30_min) IF close breaks range AND volume > avg → ENTER

strategies/vwap_revisions.py

VWAP Reversion

Anchors to the session VWAP and watches ±2 standard-deviation bands. RSI confirms the fade at either extreme before the bot commits.

IF price < vwap-2sd AND rsi < 30 → ENTER_LONG IF price > vwap+2sd AND rsi > 70 → ENTER_SHORT

strategies/resolver logic

The Resolver

Flat: a lone ENTER_LONG or ENTER_SHORT opens the position. Long: EXIT_LONG closes it, ENTER_SHORT closes it first and waits for the next bar. Both signals firing at once cancels out, no trade.

Backtested with a loop-based engine that runs the exact same strategy classes and resolver as the live bot. Any parameter change clears a 5-year backtest before it touches paper capital. See Rulebook §5.

03 / WHERE IT TRADES

One interface, six order books.

Every platform speaks through the same Broker interface. The engine keeps a separate risk manager, position tracker, symbol list and strategy list per broker, so a small crypto account and a large equities account never share a single risk budget.

PlatformIntegrationBracket ordersShorting
Interactive Brokersib_asyncYesMargin accounts only
BinanceccxtNoNo
OKXccxtNoNo
CoinbaseccxtNoNo
KrakenccxtNoNo
KuCoinccxt, live-testedNoNo
NSE (Nairobi)Stub, no API yetPendingPending

On IBKR the bot checks the account type before it ever shorts. Margin account: shorting stays on, subject to a live availability check. Cash account: shorting locks off automatically, no manual flag required.

04 / BUILT-IN RESTRAINT

The bot is only as smart as the limits it can't override.

Every rule below runs automatically, before a single order reaches a broker. Each one can be tuned per broker through risk_by_broker, so a small KuCoin account can carry looser limits than the account holding real equities.

Magnifying glass icon, representing verification checks

Checked before it's sent

Short-availability checks confirm shares actually exist to borrow. On IBKR the bot detects margin versus cash accounts and blocks shorting on cash accounts outright. An earnings blackout filter stops new entries near a print.

Red protective cross icon, representing stop-loss and drawdown protection

Protected on the way down

ATR-based stops sit on every position and trail as a trade works. A drawdown past 15% halves size automatically. Past 20%, the bot halts trading outright for a re-evaluation.

Fanned stack of cash, representing capital and exposure limits

Sized like it's real money

Half-Kelly position sizing off recent win/loss history, capped at 5% of equity per trade. Gross exposure caps at 1.5x equity, net exposure caps the long/short imbalance, and no single name exceeds 20% of the book.

localhost:8000/dashboard
NAV$1,059,472.31
DAILY P&L+0.63%
TRADING P&L+$29,104
INTEREST EFFECT+$23,746
30D SHARPE0.19
PORTFOLIO HEAT18.4% / 30%

05 / THE READOUT

A dashboard that separates skill from interest.

The FastAPI dashboard aggregates every broker into one portfolio view: NAV, daily and unrealised P&L, a 30-day rolling Sharpe, an equity curve, open positions, and the last ten closed trades. It refreshes every 60 seconds on its own.

It also splits trading P&L from interest earned on idle cash, a distinction the audit below made non-negotiable.

  • Public API exposes /api/signals, /api/positions and /api/performance for anything you want to build on top later.
  • Setup wizard lives at /setup: pick brokers, paste credentials, test the connection, save. No YAML by hand.

06 / THE RULEBOOK

Governance, not vibes.

Seven standing rules keep the strategy honest before it ever sees live capital. They run on a calendar, not a mood.

  1. Minimum sample size. No edge counts as real before 50 closed trades and 12 months of live-like paper data.
  2. Max drawdown. 15% drawdown halves size. 20% halts trading for re-evaluation.
  3. Daily loss limit. Trading stops for the day at -5% equity, enforced by the risk manager itself.
  4. Review cadence. Weekly Sharpe and exposure review, monthly robustness backtests, quarterly paper-vs-backtest audit.
  5. Strategy changes. Any parameter change needs a 5-year backtest before it goes near paper capital.
  6. Emotional discipline. No manual overrides. No sizing up on euphoria, no sizing down on fear.
  7. Go-live criteria. 12 months live-like, Sharpe above 0.5, max drawdown under 15%, win rate within one σ of backtest.
A stack of well-worn books, representing IrieTrade's written governance rules

fig. 02 · RULES.md, printed and dog-eared

07 / THE AUDIT

Eight months of paper trading, told straight.

A $1M IBKR paper account has run since December 2025. The numbers below are what the reviews actually found, not the highlight reel.

+5.95%Total return, Dec 2025–Jul 2026
+$23,746Interest earned on idle cash
−$9,182Dividend cost on short positions
≈ $29,104Trading P&L, interest excluded(+$38,801)

NEXT UP

NSE broker, once Nairobi ships an API Signal subscription / copy-trading Robo-advisor onboarding + rebalancing DEX support: Uniswap, PancakeSwap, 1inch

08 / SIGNAL RECEIVED

It doesn't trade quietly.

Every fill, every error, every risk-limit trip pushes out in real time across three independent channels. A dead webhook never means a blind spot.

01

Discord

Colour-coded embeds: green for a buy, red for a sell, plus dedicated error alerts through a webhook.

02

Telegram

Plain-text trade alerts through a bot token and chat ID, for the moments Discord isn't in reach.

03

Email

Branded HTML mail through Brevo's API as the primary transport. Gmail SMTP fills in if Brevo ever fails.

Halftone illustration of an ear catching lightning-bolt signals, representing real-time alerts
Yellow warning triangle icon

READ BEFORE YOU TRADE

This is an educational project. Treat it like one.

IrieTrade is for learning, not financial advice. Past performance never guarantees future results, paper P&L isn't live P&L, and the rulebook exists precisely because the strategy hasn't earned real capital yet. See Rule 1 and Rule 7. Test thoroughly. Trade at your own risk.

A vintage brick mobile phone, representing the contact section

fig. 03 · still faster than most support lines

09 / GET IN TOUCH

Found a bug? Got a strategy idea?

The bot doesn't take feature requests, but its builder does. Every issue and idea helps this project grow.