Binance Futures Trading Bot
Automating crypto futures orders requires strict defensive engineering: a single unhandled API error or invalid parameter boundary can cause catastrophic order rejections or liquidation. Built as a production-grade hiring assessment, this Python CLI application provides an intuitive Rich interface for placing Market, Limit, and Stop-Limit orders on Binance Futures Testnet with automated pre-flight validation and rotating audit logs.
Modular Clean Architecture & Order Pipeline
Engineered with strict separation of concerns across dedicated modules for authentication, parameter formulation, pre-flight validation, and terminal visualization. Supports instant MARKET, price-bound LIMIT, and trigger-gated STOP_LIMIT orders over USDT-M Futures with Good-Till-Cancel (GTC) execution policies.
Pre-Flight Validation & Defensive Exception Handling
Performs comprehensive local parameter verification on trading symbols, sides, quantities, and price offsets prior to dispatching network requests to Binance endpoints. Implements a granular custom exception hierarchy that isolates network timeouts, credentials rejections, and margin errors into clean, color-coded terminal alerts without unhandled stack traces.
Production Logging & Comprehensive Pytest Suite
Features audit-ready rotating file logs capped at 5 MB across 5 backups, recording structured execution payloads, order IDs, and filled prices alongside human-readable Rich console dashboards. Backed by an automated 40+ test case test suite validating order builders, boundary constraints, and CLI invocations.