From 33b14aaa2344b0fd95d1629627c3d135b24ae102 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 15:56:35 +0900 Subject: 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 --- cli/src/trading_cli/commands/portfolio.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cli/src/trading_cli/commands/portfolio.py (limited to 'cli/src/trading_cli/commands/portfolio.py') diff --git a/cli/src/trading_cli/commands/portfolio.py b/cli/src/trading_cli/commands/portfolio.py new file mode 100644 index 0000000..9389bac --- /dev/null +++ b/cli/src/trading_cli/commands/portfolio.py @@ -0,0 +1,20 @@ +import click + + +@click.group() +def portfolio(): + """Portfolio management commands.""" + pass + + +@portfolio.command() +def show(): + """Show the current portfolio holdings and balances.""" + click.echo("Fetching current portfolio...") + + +@portfolio.command() +@click.option("--days", default=30, show_default=True, help="Number of days of history") +def history(days): + """Show PnL history for the portfolio.""" + click.echo(f"Fetching PnL history for the last {days} days...") -- cgit v1.2.3