Bitcoin Scalping Bot

Rule-based BTC paper trading experiment with live Coinbase price feeds and a separate Python backend.

Experimental, paper trading only

Problem

I wanted to see how automated trading actually works: exchange APIs, reacting to price moves, position sizing, logging results. Without putting real money on logic I had not tested yet.

Solution

Two related implementations: a browser-based paper trading dashboard on this site, and a local Python/Flask backend that runs the same style of rule-based strategy against Binance market data.

How It Works

  • Entry: when BTC drops $50 below a rolling reference high, enter a long paper position.
  • Exit: sell when price rises $50 above entry, or hit a 0.15% stop loss.
  • Position sizing: up to 20% of balance, capped at $100 per trade.
  • Live data: Coinbase REST spot price + WebSocket feed; Chart.js candle chart from Coinbase Exchange API.
  • Logging: trade history and strategy state displayed on the dashboard.

Tech Stack

JavaScript Chart.js Coinbase REST & WebSocket Python Flask pandas numpy Binance API (local backend)

Challenges

  • Keeping live price updates smooth when WebSocket drops. REST polling as fallback.
  • Separating the public paper-trading demo from any real API keys or live trading logic.
  • Strategy tuning: fixed dollar thresholds behave differently at varying BTC price levels.

What I Learned

Most of the work was plumbing: price feeds, state management, position sizing, logging. Not machine learning. A simple rule set is easy to write and hard to make money with.

Status

The hosted dashboard is a paper trading demo for educational purposes. No real money or API keys are used in the browser version. A separate local Python/Flask interface connects to Binance for backend experimentation and is not accessible through this public site.

₿

Try the browser paper trading dashboard with live Coinbase price data.

Open Paper Trading Demo