Crypto trading bot (Al-Sat)

An AI crypto trading bot that scans about 224 coins on Binance Futures every 5 minutes and opens and closes trades on its own. A machine learning model makes the call; SMC chart analysis can veto it. The bot runs on a virtual balance (paper) and the Binance testnet, not real money.

Type
Personal project
My role
Design, model, bot and panel: all of it
Language
Python
Exchange
Binance Futures (paper and testnet)
Alerts
Telegram
Crypto trading bot panel: balance, net profit, win rate, open position cards, live chart and coin scan list
The panel (paper mode): balance, stats, open positions, chart and the scan list.

How the bot works

When each 5-minute candle closes, the bot scans every coin, picks the strongest candidates and opens as many trades as it has slots. Each open trade is watched every second; when it closes, a Telegram message goes out and the trade is logged.

1. Scan

Closed 5-minute candles, volume, buyer-seller balance and funding are collected for about 224 coins.

2. AI score

The model scores each coin for the next 15 minutes. A coin becomes a candidate when its score clears a threshold that slides with the last 30 days of scores.

3. SMC check

The candidate’s chart is checked with 14 analyses. If the total is below the threshold, the trade is skipped and the bot moves to the next candidate.

4. Entry and tracking

A limit order is placed at a slightly better price than market. The trade closes on its stop, the profit ladder or a time stop.

Open position card: entry price, stop, R value, margin in trade, take-profit status, Plan and Close buttons
Open position card: entry, stop, R, margin and staged take-profit status.

The AI model

The model was trained on two years of data from 100 coins and looks at 187 features: the coin’s own movement, BTC’s state, RSI and EMA slopes, volume, buyer-seller balance, funding, hour and weekday. The decision comes from three models.

Model A: direction

Predicts where price goes in the next 15 minutes.

Model B: net result

Predicts the trade’s net result after fees and the stop.

Model C: worst moment

Predicts how far the trade will move against us; leverage is chosen from it.

SMC check

SMC (Smart Money Concepts) is a veto gate that looks at the chart the way discretionary traders do. It never raises a score or reorders candidates; it can only say “skip this trade”.

The bot has 14 analyses: delta, footprint, whale trades (order flow), BOS/CHoCH, FVG, IFVG, order blocks, EQH/EQL, trend liquidity, LRL, engulfing candles, patterns (W, M, head and shoulders, channel, triangle, wedge), VWAP and volume profile. Each gives +1, −1 or 0. In the panel, each analysis is drawn as its own chart layer and can be toggled.

Live candlestick chart with FVG boxes, EQL lines, CHoCH, VWAP, POC, VAH, VAL and a volume profile
Chart: FVG boxes, EQL lines, CHoCH, VWAP, POC/VAH/VAL and volume profile; SMC summary below.
SMC check settings: SMC threshold and checkboxes for delta, footprint, FVG, order block and other analyses
SMC check settings: threshold and the analyses that vote.

Strategy editor

Custom rules can be built without code from 36 conditions in 8 groups. Each condition gets a role (required, score or forbidden), and the strategy works with the AI in four modes (AI picks and the strategy vetoes, the strategy picks and the AI can block, and so on). Before saving, a “where does it match right now?” button shows what the strategy would do on the top 40 coins of the scan.

Strategy editor: strategy list, direction, minimum score, four modes and 36 grouped conditions
Strategy editor: modes, parameters and 36 conditions in 8 groups.
Strategy test table: coins, direction, score, would open or not, and each condition’s vote
“Where does it match right now?”: coin, direction, score and condition breakdown.

Risk management

Every trade closes on one of four rules: stop loss, profit ladder, time stop or a manual close.

Profit ladder

Once a trade is in profit, its stop moves up and only ever forward. On volatile coins the give-back room widens automatically.

Liquidation guard

The stop always sits in front of the liquidation price, so the bot’s stop fires before the exchange liquidates.

Backup stop on the exchange

Every position has a backup stop on the exchange in case the bot crashes. Profit taking is done by the bot with market orders.

Daily limits

The bot pauses after a daily loss limit or a streak of losses.

Security

Live mode is locked

Real-money mode needs a panel password, separate keys and typing “CANLI” into a confirmation box. Live trades are capped at 20x leverage and $20 margin, and the bot returns to paper mode on every restart.

Keys stay local

Telegram and Binance keys are stored only on the machine running the bot and never sent back to the panel; only the last 4 characters are shown.

Least privilege

The Binance key gets Futures trading permission only; withdrawals are off and IP restriction is on.

Panel password

The panel is reachable through a tunnel. Without a password, outside access is closed; 8 wrong attempts lock it for 10 minutes.

Connections screen: Telegram alerts, Binance testnet and live key cards, values masked
Connections: Telegram and Binance keys (sample values, last 4 characters shown).

FAQ

What is a crypto trading bot?

A crypto trading bot connects to an exchange API, watches the market and places buy and sell orders by itself, based on preset rules or a model’s decision. In this project an AI model makes the call and risk rules limit every trade.

How is an AI bot different from a rule-based trading bot?

A classic trading bot follows fixed rules, such as “buy when RSI drops below 30”. An AI bot scores each coin with a model trained on historical data and decides from that score. This project can combine both: the model decides and rules from the strategy editor can veto.

Can you make money with AI trading?

No crypto bot or AI model guarantees profit. Crypto markets are volatile, and fees and leverage magnify small mistakes. Bots and signal groups that promise guaranteed returns are usually scams. That is why this project runs on paper and the testnet instead of real money.

How does an AI crypto trading bot work?

Every 5 minutes the bot collects market data, has a machine learning model score each coin, checks candidates above the threshold with SMC analysis and places limit orders on the ones that pass. Each trade closes on its stop, the profit ladder or a time stop.

How does the bot connect to Binance?

With an API key and secret created on Binance. The key gets Futures trading permission only; withdrawals stay off and the key is restricted to one IP address. The bot signs every request with it.

How do you test a crypto trading bot?

First on a virtual balance (paper trading) to see what it would do, then on the Binance testnet to see how orders fill with real exchange mechanics. This project keeps a separate ledger for each mode.

Does the bot trade real money?

No. By default it runs on a virtual balance (paper) or the Binance demo testnet. Live mode is locked behind a password, separate keys and a confirmation, and even then leverage and margin per trade are capped.

This page describes a software project; it is not investment advice. Leveraged crypto trading can lose your entire capital.