Skip to content

Vintr0n/DiscordTradingBotGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Discord Crypto Trading Bot

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.

What it does

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.

Commands

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

How it works

  • 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

Setup

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.

About

Start with $1000 this discord bot (game) allows users to carry out !long (buying) !short (selling) actions against the real market value of crypto tokens, saving users progress as they make trades.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages