feat(portfolio): add asset name field across API, DB, and CLI
This commit is contained in:
@@ -79,6 +79,7 @@ def portfolio_status(
|
||||
def create_portfolio(
|
||||
ctx: typer.Context,
|
||||
portfolio_id: str = typer.Argument(..., help="Portfolio identifier."),
|
||||
name: str | None = typer.Option(None, help="Asset display name."),
|
||||
symbol: str = typer.Option(..., help="Trading symbol."),
|
||||
broker: str = typer.Option("kis", help="Broker code."),
|
||||
status: str = typer.Option("enabled", help="Portfolio status."),
|
||||
@@ -96,6 +97,7 @@ def create_portfolio(
|
||||
lambda service, app_context: service.create_portfolio(
|
||||
CreatePortfolioRequest(
|
||||
portfolio_id=portfolio_id,
|
||||
name=name,
|
||||
symbol=symbol,
|
||||
broker=broker,
|
||||
status=status,
|
||||
@@ -117,6 +119,7 @@ def update_portfolio(
|
||||
portfolio_id: str = typer.Argument(..., help="Portfolio identifier."),
|
||||
broker: str | None = typer.Option(None, help="Broker code."),
|
||||
status: str | None = typer.Option(None, help="Portfolio status."),
|
||||
name: str | None = typer.Option(None, help="Asset display name."),
|
||||
symbol: str | None = typer.Option(None, help="Trading symbol."),
|
||||
strategy_name: str | None = typer.Option(None, help="Strategy name."),
|
||||
strategy_params: str | None = typer.Option(None, help="Strategy params as JSON object."),
|
||||
@@ -132,6 +135,7 @@ def update_portfolio(
|
||||
UpdatePortfolioRequest(
|
||||
broker=broker,
|
||||
status=status,
|
||||
name=name,
|
||||
symbol=symbol,
|
||||
strategy_name=strategy_name,
|
||||
strategy_params=parsed_strategy_params,
|
||||
|
||||
Reference in New Issue
Block a user