diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 15:56:35 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 15:56:35 +0900 |
| commit | 33b14aaa2344b0fd95d1629627c3d135b24ae102 (patch) | |
| tree | 90b214758bc3b076baa7711226a1a1be6268e72e /cli/src/trading_cli/commands/trade.py | |
| parent | 9360f1a800aa29b40399a2f3bfbfcf215a04e279 (diff) | |
feat: initial trading platform implementation
Binance spot crypto trading platform with microservices architecture:
- shared: Pydantic models, Redis Streams broker, asyncpg DB layer
- data-collector: Binance WebSocket/REST market data collection
- strategy-engine: Plugin-based strategy execution (RSI, Grid)
- order-executor: Order execution with risk management
- portfolio-manager: Position tracking and PnL calculation
- backtester: Historical strategy testing with simulator
- cli: Click-based CLI for all operations
- Docker Compose orchestration with Redis and PostgreSQL
- 24 test files covering all modules
Diffstat (limited to 'cli/src/trading_cli/commands/trade.py')
| -rw-r--r-- | cli/src/trading_cli/commands/trade.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cli/src/trading_cli/commands/trade.py b/cli/src/trading_cli/commands/trade.py new file mode 100644 index 0000000..f90e0ed --- /dev/null +++ b/cli/src/trading_cli/commands/trade.py @@ -0,0 +1,35 @@ +import click + + +@click.group() +def trade(): + """Trading bot management commands.""" + pass + + +@trade.command() +@click.option("--strategy", required=True, help="Strategy name to run") +@click.option("--symbol", required=True, help="Trading symbol (e.g. BTCUSDT)") +def start(strategy, symbol): + """Start a trading bot for a strategy and symbol.""" + click.echo(f"Starting trading bot: strategy={strategy}, symbol={symbol}...") + + +@trade.command() +@click.option("--strategy", required=True, help="Strategy name to stop") +def stop(strategy): + """Stop a running trading bot.""" + click.echo(f"Stopping trading bot for strategy: {strategy}...") + + +@trade.command() +def status(): + """Show status of all running trading bots.""" + click.echo("Fetching running bots status...") + + +@trade.command("stop-all") +def stop_all(): + """Stop all running trading bots.""" + click.confirm("Are you sure you want to stop all running bots?", abort=True) + click.echo("Stopping all running trading bots...") |
