This project provides a CLI-based trading bot for Binance USDT-M Futures with core market and limit order functionality and basic advanced features.
Requirements
- Python 3.8+
- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/Scripts/activate # or .venv/bin/activate on Unix
pip install -r requirements.txtUsage
- Interactive mode:
python -m src.cli- Non-interactive examples:
export BINANCE_API_KEY="yourkey"
export BINANCE_API_SECRET="yoursecret"
python -m src.cli market BTCUSDT BUY 0.01
python -m src.cli limit BTCUSDT SELL 0.01 60000
python -m src.cli oco BTCUSDT SELL 0.01 65000 58000Notes
- The CLI reads
BINANCE_API_KEYandBINANCE_API_SECRETfrom environment variables. If not set, it prompts for them. bot.login the project root contains runtime logs.- Advanced strategies (TWAP, Grid) are left as exercises; the
src/advanced/folder contains starter files.
Tests
Run tests with pytest (not included in this initial commit).