summaryrefslogtreecommitdiff
path: root/cli/src/trading_cli/commands/trade.py
blob: 6bbd5a66b1a1e2261f7c3b1bd07082e958197a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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. AAPL)")
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...")