A Discord bot I made that lets you paper trade crypto straight from a Discord server. Uses real-time prices from Binance and stores everything in a MySQL database.
You can register an account, get a starting balance of $1000, and place long/short orders on any top 100 crypto token — all through Discord commands. TP/SL orders execute automatically in the background.
| Command | What it does |
|---|---|
!register |
Sign up and get your $1000 starting balance |
!balance |
Check your current balance |
!price <token> |
Get the current price of a token |
!long <token> <size> <price> <tp> <sl> |
Place a long order |
!short <token> <size> <price> <tp> <sl> |
Place a short order |
!orders |
View your open orders |
!portfolio |
View your current positions and their value |
!cancel <token> |
Cancel an open order |
!close <token> |
Close an active trade at market price |
- Main.py — the bot itself, handles all the Discord commands
- orderpoll.py — runs every 10 seconds, checks if any limit orders should be executed
- TPSLexecutor.py — runs every 10 seconds, checks if any TP/SL levels have been hit
- top100.py — fetches the top 100 coins by market cap from CoinGecko daily
You'll need a MySQL database with users, orders, and portfolio tables, a Binance API connection (just for price data, no account needed), and a Discord bot token stored as an environment variable called testtest.
Was originally hosted on Replit which is why there's a replit db import hanging around — that's mostly unused.