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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Portfolio Management

> Track positions, allocation, and live P&L.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/financial/stock-portfolio)

**Portfolio tracking for agents.** Manage positions, allocation, and live P\&L snapshots with AIsa market data.

## Install

```bash npx skills theme={null}
npx skills add AIsa-team/agent-skills --skill stock-portfolio
```

```bash AIsa CLI theme={null}
npm install -g @aisa-one/cli
aisa skills install stock-portfolio
```

Start a new agent session after installing so the skill loads.

## What can agents do with it?

> [card] Position tracking
>
> Summarize portfolio holdings and exposure.

> [card] Allocation review
>
> Check concentration by asset, sector, or theme.

> [card] Live P\&L
>
> Estimate current profit and loss from market data.

> [card] Rebalance notes
>
> Flag positions that need review.

## Usage

```bash theme={null}
# Create a new portfolio
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" create "My Portfolio"

# Add a position
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" add AAPL --quantity 10 --cost 150
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" add BTC-USD --quantity 0.5 --cost 40000

# Show portfolio with live P&L
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" show
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" show --portfolio "My Portfolio"

# Update a position
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" update AAPL --quantity 15 --cost 160

# Remove a position
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" remove AAPL

# List all portfolios
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" list

# Rename a portfolio
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" rename "My Portfolio" "Tech Holdings"

# Delete a portfolio
python3 "${CLAUDE_PLUGIN_ROOT}/skills/stock-portfolio/scripts/portfolio.py" delete "Old Portfolio"
```

### Actions

| Action | Description |
| - | - |
| `create NAME` | Create a new portfolio |
| `list` | List all portfolios |
| `show` | Show portfolio summary with live P\&L |
| `add TICKER` | Add position with `--quantity` and `--cost` |
| `update TICKER` | Update position quantity/cost |
| `remove TICKER` | Remove position from portfolio |
| `rename OLD NEW` | Rename a portfolio |
| `delete NAME` | Delete a portfolio |

## Data Storage

Portfolio data is stored in `${CLAUDE_PLUGIN_DATA}/portfolios.json` for persistence across sessions.

**NOT FINANCIAL ADVICE.** For informational purposes only.

## Get started

1. Sign up at [aisa.one](https://aisa.one) and create an API key in the console.
2. Set it in your shell: `export AISA_API_KEY="your-key"`.
3. Install the skill with one of the commands under [Install](#install), then start a new agent session.

## Related

> [card] [Watchlist Management](https://aisa.one/docs/agent-skills/stock-watchlist.md)
>
> Track targets and alert checks.

> [card] [Stock & Crypto Analysis](https://aisa.one/docs/agent-skills/stock-analysis.md)
>
> Analyze individual holdings.

> [card] [AIsa Market](https://aisa.one/docs/agent-skills/market.md)
>
> Market data for portfolio review.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.