> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Portfolio Autopilot

> Autonomous portfolio workflow with cloud BYOK encryption, risk gates, drawdown halt, views, strategies, ticks, and trades.

Portfolio Autopilot is the account-scoped portfolio manager workflow.

It stores portfolio state, user views, strategies, evaluation ticks, risk gates, proposed actions, and trade history.

## Read current state

```bash theme={null}
sf portfolio status --json
sf me --json --detail --limit 10
```

## Read past ticks

```bash theme={null}
sf portfolio history --json --ticks 20 --trades 0 --since 2026-04-23
sf portfolio last --json --include handoff
sf portfolio tick <id> --json
```

Ticks are the portfolio manager's memory. They can include timing, action summaries, risk gates, trace ids, and handoff notes.

## Read trades

```bash theme={null}
sf portfolio history --json --ticks 0 --trades 20 --status open
sf portfolio history --json --ticks 0 --trades 20 --ticker KXRATECUT-26DEC31
sf portfolio trade <id> --json
```

## Views and strategies

```bash theme={null}
sf portfolio view list --json
sf portfolio strategy list --json
```

Views are user convictions. Strategies are persistent instructions and constraints.

## API surfaces

```http theme={null}
GET /api/portfolio/state
GET /api/portfolio/config
GET /api/portfolio/ticks
GET /api/portfolio/ticks/{id}
GET /api/portfolio/trades
GET /api/portfolio/trades/{id}
GET /api/portfolio/views
GET /api/portfolio/strategy
POST /api/portfolio/trigger
```

All portfolio endpoints are authenticated and scoped to the current user.

## Execution safety

Start with reads. Keep execution in dry-run until risk gates, max exposure, per-market limits, and operator approval are understood.

```bash theme={null}
sf portfolio watch --once --dry-run
sf portfolio trigger
```
