Python CLI for Binance Futures Testnet with support for Market, Limit, and Algo orders (Stop, Take Profit, Trailing Stop).
- ✅ Market & Limit orders
- ✅ Algo orders (Stop Market, Take Profit, Trailing Stop)
- ✅ Position management
- ✅ Order management
- ✅ Account information
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"cd trading_bot
uv synccp .env.example .env
# Edit .env with Binance API credentialsCheck Price:
uv run python cli.py --symbol BTCUSDTMarket Order:
uv run python cli.py --symbol BTCUSDT --side BUY --type MARKET --quantity 0.002Limit Order:
uv run python cli.py --symbol BTCUSDT --side SELL --type LIMIT --quantity 0.002 --price 95000Stop Market:
uv run python cli.py --symbol BTCUSDT --side SELL --type STOP_MARKET --quantity 0.002 --trigger-price 85000Trailing Stop:
uv run python cli.py --symbol BTCUSDT --side SELL --type TRAILING_STOP_MARKET --quantity 0.002 --callback-rate 1.5View Positions:
uv run python cli.py --positionsFor more examples, see demo/EXAMPLES.md | Watch Demo Video
| Argument | Description |
|---|---|
--symbol |
Trading pair (e.g., BTCUSDT) |
--side |
BUY or SELL |
--type |
Order type: MARKET, LIMIT, STOP_MARKET, TAKE_PROFIT_MARKET, STOP, TAKE_PROFIT, TRAILING_STOP_MARKET |
--quantity |
Order quantity |
--price |
Limit price (for LIMIT, STOP, TAKE_PROFIT orders) |
--trigger-price |
Trigger price for algo orders |
--callback-rate |
Callback rate for TRAILING_STOP_MARKET (0.1-10%) |
--activate-price |
Activation price for TRAILING_STOP_MARKET |
--working-type |
CONTRACT_PRICE or MARK_PRICE (default: CONTRACT_PRICE) |
--price-protect |
Enable price protection for algo orders |
--orders |
List orders: open, close, or all |
--cancel |
Cancel order by ID |
--positions |
Show open positions |
--close-position |
Close position for symbol |
--account |
Show account information |
Install Dependencies:
uv sync --group devRun Tests:
uv run pytestTests are automated via GitHub Actions. See test results in the Actions tab.