Skip to content

A simplified Binance Futures trading bot using Python. Supports market and limit orders on the Binance USDT-M Testnet with CLI, logging, and error handling.

Notifications You must be signed in to change notification settings

Tushar8982/Trading-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Binance Futures Trading Bot (Testnet)

Python License Made by Tushar8982

A simplified crypto trading bot built in Python for the Binance USDT-M Futures Testnet. This bot allows you to place real-time Market and Limit orders via a clean and interactive CLI. It also features structured logging, error handling, and a modular codebase ready for future improvements.


⚙️ Features

  • ✅ Place Market and Limit orders
  • ✅ Support both BUY and SELL sides
  • ✅ Command-line interface (CLI) for easy user interaction
  • ✅ Input validation & error handling
  • ✅ Logging of API requests, responses, and errors
  • ✅ Environment-based credential management
  • ✅ Modular code structure

🗂 Project Structure

trading-bot/
├── bot.py             # Main trading interface
├── config.py          # Loads API keys and sets up Binance client
├── utils.py           # Order placement, logging, and helpers
├── .env               # Contains API_KEY and API_SECRET (do NOT share)
├── logs/              # Logs of all API requests and errors
├── requirements.txt   # Python dependencies

🔧 Setup Instructions

1. Clone the Repository

git clone https://github.com/Tushar8982/trading-bot.git
cd trading-bot

2. Install Dependencies

pip install -r requirements.txt

3. Configure Environment Variables

Create a .env file in the project root with your Binance Testnet credentials:

API_KEY=your_testnet_api_key
API_SECRET=your_testnet_api_secret

💡 You can register and get your API key at Binance Futures Testnet


▶️ How to Run

python bot.py

You'll be prompted for:

  • Trading symbol (e.g., BTCUSDT)
  • Side (BUY or SELL)
  • Order type (MARKET or LIMIT)
  • Quantity

Sample CLI interaction:

Welcome to Binance Futures Bot
Enter symbol (e.g., BTCUSDT): BTCUSDT
Enter side (BUY/SELL): BUY
Enter order type (MARKET/LIMIT): MARKET
Enter quantity: 0.01

✅ Order placed successfully!
Order ID: 12345678
Status: FILLED

💡 Optional Enhancements

These are bonus features that you can add:

  • Add Stop-Limit, OCO, or TWAP order types
  • Build a simple frontend or enhanced CLI
  • Integrate WebSocket for live data and updates
  • Add order status tracking and trade history

📬 How to Apply

Send the following to chetan@primetrade.ai and sonika@primetrade.ai:

  • ✅ GitHub repo link
  • ✅ Log files from the /logs folder
  • ✅ Your updated resume

Email Subject:
Junior Python Developer – Crypto Trading Bot

🕒 Pro tip: Apply within the first 72 hours for a better chance of selection. First come, first serve!


🧠 Ideal For

  • Recent graduates
  • Python developers & automation enthusiasts
  • Bootcamp grads and crypto-native learners
  • Anyone passionate about finance + code

📄 License

Licensed under the MIT License.


🙌 Connect

Made with 💻 by Tushar8982
Feel free to ⭐️ the repo if you find it useful!

About

A simplified Binance Futures trading bot using Python. Supports market and limit orders on the Binance USDT-M Testnet with CLI, logging, and error handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages