kilazi. blog
Products

I Built My Wife an AI Trading Station With a Dragon That Won't Give Tips

A raw WebSocket scalping engine first; then an arcade app with XP, a five-trade daily limit and a Gemini-powered dragon. A portfolio case, not a get-rich post.

The gamified trading station in retro arcade style: BTC pair picker, a long or short trade form with leverage and capital sliders, an UP or DOWN prediction box with the live BTCUSDT price, an event log of closed positions with percent ROI and XP earned, and a level 3 XP bar
The short answerI built a personal crypto futures trading setup in two acts. First, a Node scalping engine that streams Binance's best bid and ask over WebSockets, paints order-book pressure, builds 10-second candles and sets stops after every fill. Then, an arcade-style station that hides balances, allows five trades a day, and uses Gemini as a dragon that offers perspective but never trade advice. Not financial advice.

I built my wife a crypto trading station. Five trades a day, then it locks. No balance, no dollar P&L, only percentages. And the AI is a dragon that flatly refuses to give tips.

Portfolio piece. Nobody gets rich here.

26commits in a single day to build her station
522futures pairs the scanner sweeps, one by one
5stamina a day; every trade you open burns one

That station is the sequel. A couple of months earlier I'd built the opposite: a raw scalping engine, all speed and no brakes, in a folder whose package.json still calls it hello-world-app. Engine first, then the guardrails.

Building for an audience of one is a habit of mine. My WhatsApp errand bot once designed her birthday present, sent it to a print shop and told me where to pick it up.

What does a WebSocket scalping bot actually do?

It listens to the order book live and lets you act in one click, safety orders included. Scalping is many small trades that last minutes, so a five-second-old price is already history.

Polling a REST API every second is too slow and too rude. A WebSocket is a phone line left open: the exchange pushes every change to the best bid or ask in real time. You listen.

My engine is a small Node server: one bookTicker stream per symbol, every tick relayed to the browser over socket.io. The browser does three things.

The scalper's ticker screen: BUY, SELL and LIQUIDATE buttons, leverage and capital settings, and a big red price box labelled SELLERS PRESSURE 57%
The ticker, live on public data. Red means the ask side is heavier right now.

First, pressure. The stream carries the size waiting at the best bid and ask; their imbalance paints the price box green or red, darker as the gap grows. A crude read of who's leaning on the price, in a color your eyes catch before your brain does.

Second, 10-second candles. The exchange's futures candles start at one minute, an eternity here. So the browser builds its own from raw ticks, with a MACD underneath.

A live chart of ETHUSDT built from 10-second candles, with BUY, SELL and LIQUIDATE buttons above it
Ten-second candles, assembled in the browser from the tick stream.

Third, one-button orders. BUY fires a market order, waits half a second, re-reads the position for the real fill price, then places a stop-loss (auto-exit if it drops too far) and a take-profit (auto-exit once it's up enough) off that price. Not off the price you clicked; that one's gone.

BUYERS
pressure 0%
62
38
Same math as the real screen: |bid − ask| ÷ (bid + ask), doubled and capped at 100%.

How do you find coins worth scalping?

Scan everything, keep what moves. It grabs every live USDT perpetual, the futures contracts with no expiry date (522 when I took these shots), pulls the last hour of one-minute candles for each, and keeps whatever beat your threshold in your window.

Progress streams in coin by coin, so you watch the hunt instead of a spinner.

The Live Binance Scanner: a progress bar at 68%, 355 of 522 pairs processed, 10 found, and a grid of coins with their 10-minute moves in green and red
Sweeping all 522 pairs for a 1% move in ten minutes. Ten hits two-thirds of the way through.

Why gamify trading when regulators hate it?

Because the tricks that push you to trade more can push you to trade less. Her station is a separate app on the exchange's regular API, built a couple of months after the scalper. When the SEC asked about game-like features in trading apps, the worry was that these features may encourage people to trade more often. Same toolbox, opposite direction.

The gamified trading station: a retro arcade screen with pair selection, a long/short form with leverage and capital sliders, an UP/DOWN prediction box, an event log of closed positions and an XP bar at Level 3
Her station. Coin prices, yes; balances and dollar P&L, never.

A typical trading app

  • Big balance, front and center
  • Confetti for your first trade
  • Trade as much as you want
  • Tips, signals, "hot" coins

Her station

  • No balance, no dollar P&L, only percentages
  • 5 stamina a day; each trade you open burns one
  • At zero, the open button just refuses
  • A dragon that won't give tips

Opening a trade earns 10 XP. Closing a loser earns 10 more, because closing a bad trade is a skill. A win earns 25 to 50, depending on the move. Level up and stamina refills early. Run out and the server answers: "No stamina remaining! Wait for daily reset or level up."

There's a prediction box too: call UP or DOWN, write why, earn 20 XP if you're right. Practice the opinion without paying for it. Sounds for wins, losses and level-ups. Pavlov, but on our side.

How is AI used in the trading station?

As a companion. Never an oracle. The dragon sees what she sees: positions with leverage and ROI, the last five events, her predictions, the screen she's on. Gemini answers in two to four sentences. One rule in its prompt is in caps:

You NEVER give financial advice

Its job: "perspective, emotional grounding, and philosophical reflection". The code adds mood hints. A position down over 5% tells the dragon "The trader may need encouragement or perspective on losses". A win over 10% adds "There are wins to acknowledge, but wisdom about humility is valuable". My favorite line: "Every loss contains a lesson; every win contains a warning."

Why not let it suggest trades? A model that sounds confident about a coin is the most expensive autocomplete you'll ever meet. Cool the head; leave the coin alone.

The whole station (Angular, Express, an Electron desktop build, the XP math, the dragon) went from first commit to last in about seven and a half hours. One person, one long day. These days I hand sprints like that to agents that work while I sleep; here's how I run AI agents overnight.

What was hard about building it?

Not the WebSockets. The boring parts. The scalper folder holds 14 markdown notes like PRICE_FIX.md, QUANTITY_DEBUG.md and SYMBOL_FIX.md. Each one is a scar.

  • Prices cross wires. One order went out at roughly 1/40th of the intended size: the cached price came from the previous coin's stream, 41.7x off. Now the engine re-fetches the price for the right symbol before every order and warns if it's more than 10% away from the stream.
  • Quantities shrink. Rounding to whole contracts quietly cut some orders to a fraction of the plan.
  • Ratios shift. Stop and target started 1:1 at 1.5%, then moved to risking 3% to make 1.5%, betting that a closer target gets hit more often. One log line still announces "1:1".
  • Stops fail quietly. Three attempts with price nudges, then a loud warning.

The station's last commit message, after a long day: "TP/SL setting doesnt work". That's where the repo ends, with stops set from her app still on the to-do list. The honest status of anything built in a day.

The best feature I shipped that day was a button that says no.

Want AI agents that actually ship?

I build AI agents and the systems around them for businesses: memory, voice, overnight rigs, and the boring guards that make them safe to leave alone.

Talk to me on WhatsAppmax@kilazi.com

Questions people ask

Is scalping with a WebSocket bot profitable?

This post makes no profit claims, and you shouldn't trust anyone who does. Speed helps you see the order book sooner, but fees, slippage and leverage all work against small trades. Studies of retail day traders are grim reading. Build a bot like this to learn, and size anything real to survive.

Why use WebSockets instead of a REST API for trading?

A REST API answers only when you ask, so you either poll constantly or see stale prices. A WebSocket keeps one connection open and the exchange pushes every change to the best bid and ask as it happens. For anything that lives on seconds, like scalping, that difference is the whole game.

Can AI give you crypto trading signals?

A language model will happily produce a confident-sounding call on any coin, which is exactly the problem: fluency is not an edge. In my station the AI is deliberately limited to perspective and emotional grounding, and its prompt forbids financial advice. The trading logic is plain, testable code.

What is order book pressure?

It compares the size waiting at the best bid with the size at the best ask. If far more is bid than offered, buyers are leaning on the price; the reverse means sellers. My screen turns this imbalance into a green or red box whose intensity grows with the gap. It's a rough, fast read, not a prediction.

How can gamification make trading safer?

Most apps use streaks and celebrations to make you trade more. You can flip the same tools: give a fixed number of trades per day, spend one every time you open a position, reward closing bad trades with experience points, and hide balances and dollar P&L so you think in percentages and process instead of money.