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.
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.

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.

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.
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.

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.

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.
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.
Read next
AI agentsReplit Bragged About 200 Minutes. My AI Agents Worked All Night15 lanes, 11 hours, 10,785 tool calls and one shell loop that keeps telling them they're not done.Read it 2026
AI agentsMy WhatsApp AI assistant runs my errands in Buenos AiresOne QR scan, and an agent writes in porteño Spanish for me. A 3D-printed present, a crew stuck at a gate, and twenty electricians.Read it 2026
Health"Hey Siri, Sugar Log Insulin": The Diabetes App I Built in a DayTen taps in an app built for everyone, or two sentences to my wrist. How I built Kilazi Vitals, what its forecast gets wrong, and why a CGM is next.Read it 2026