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 commands expose user-owned portfolio memory to agents and operators.
All reads are scoped to the authenticated user. The CLI redacts secrets and omits large handoff notes unless you ask for them.
Start here
sf portfolio status --json
sf portfolio history --json --ticks 5 --trades 10
sf portfolio last --json --include handoff
Use status for current state, history for recent ticks and trades, and last for the latest full portfolio-manager run.
Read current state
sf portfolio status --json
sf portfolio config --json
status returns current portfolio state plus selected risk settings.
{
"ok": true,
"command": "portfolio.status",
"data": {
"state": {
"kalshiBalanceCents": 100000,
"kalshiPortfolioValueCents": 120000,
"totalExposureCents": 30000,
"openPositionCount": 4,
"lastTickAt": "2026-04-30T00:00:00.000Z"
},
"config": {
"enabled": true,
"executionMode": "dry-run",
"maxPositions": 20,
"sfApiKey": "[redacted]"
}
},
"meta": {
"scope": "user",
"fetchedAt": "2026-04-30T00:00:00.000Z"
}
}
Update one config value:
sf portfolio config maxPositions 20
sf portfolio config executionMode dry-run
Read portfolio memory
sf portfolio history --json --ticks 5 --trades 10
sf portfolio history --json --since 2026-04-01 --until 2026-04-30
sf portfolio history --json --ticker KXRATECUT-26DEC31
sf portfolio history --json --status open
sf portfolio history --json --cursor <cursor>
history returns two lists:
ticks: portfolio-manager evaluation runs
trades: user-scoped portfolio trade records
List mode omits full handoff notes by default. Include them only when an agent needs the full run memory:
sf portfolio history --json --ticks 3 --trades 0 --include handoff
Read one tick or trade
sf portfolio last --json
sf portfolio last --json --include handoff
sf portfolio tick <id> --json
sf portfolio tick <id> --json --include handoff
sf portfolio trade <id> --json
Use last when an agent wants the latest portfolio-manager handoff. Use tick <id> or trade <id> when the agent already has an id from history.
Views
Views are your current market convictions. They are not public theses; they are instructions and context for the portfolio manager.
sf portfolio view list --json
sf portfolio view add "Rates cut view" "Fed cut odds look too high" --category macro --tickers KXRATECUT-26DEC31 --conviction 4
sf portfolio view remove <id>
Useful fields:
| Field | Meaning |
|---|
title | Short name for the view |
viewText | Your reasoning or instruction |
category | Macro, crypto, policy, geopolitical, or another grouping |
tickers | Related market tickers |
conviction | 1-5 signal strength |
timeHorizon | Optional date horizon |
Strategies
Strategies are persistent instructions for how the portfolio manager should behave.
sf portfolio strategy list --json
sf portfolio strategy add "Rates discipline" "Keep exposure small around FOMC" --priority 2
sf portfolio strategy remove <id>
Use views for what you believe. Use strategies for how the manager should act.
Run or trigger analysis
Run one local portfolio tick:
sf portfolio watch --once --dry-run
Run continuously:
sf portfolio watch --dry-run --interval 720
Trigger the cloud portfolio manager:
--dry-run is the default for local watch. --live opts into actual order placement and requires trading credentials.
Enable cloud manager
sf portfolio enable
sf portfolio disable
sf portfolio revoke
enable uploads encrypted exchange credentials, configures a schedule, and stores portfolio-manager settings.
disable stops the cloud manager but keeps credentials.
revoke stops the manager and deletes cloud credentials.
JSON output
Agents should pass --json whenever available.
The portfolio JSON envelope usually includes:
{
"ok": true,
"command": "portfolio.history",
"data": {
"ticks": [],
"trades": []
},
"meta": {
"scope": "user",
"fetchedAt": "2026-04-30T00:00:00.000Z",
"pageInfo": {
"ticks": { "nextCursor": null, "hasMore": false },
"trades": { "nextCursor": null, "hasMore": false }
}
}
}
Do not scrape human terminal output. Use --json and parse the envelope.
Next
Portfolio API
REST endpoints behind portfolio state, ticks, trades, views, strategies, and trigger.
Portfolio Autopilot
How views, strategies, risk gates, ticks, and handoffs fit together.