# Agent Portfolios

## Agent Portfolios

*AI-managed portfolios with token delegation*

Create and manage agent portfolios and issue scoped user tokens so autonomous agents can trade on behalf of users with explicit, revocable permissions — the dedicated surface for AI-driven portfolio products.

### What it provides

- Create, list, and delete agent portfolios tied to specific strategies or use cases
- Mint, update, and revoke delegated user tokens with precisely defined scopes
- Delegate trading authority while keeping user consent and revocation explicit
- Track token lifetime, scope boundaries, and usage history for compliance
- Isolate agent activity per portfolio for clean accounting and auditability

### What you can build

- AI copilots that open and manage positions within user-approved risk boundaries
- Multi-strategy agents each backed by its own isolated agent portfolio
- Enterprise platforms auditing token lifetime, scope usage, and delegation chains
- Autonomous rebalancing systems that operate under scoped, revocable permissions

### Builder journeys

- Build apps & automations
- Enterprise integrations

### Recommended tools

- [REST Playground](/playground) — Test agent portfolio creation and token delegation endpoints interactively.
- [Authentication guide](/learn/authentication-and-api-keys) — Token scoping and delegation patterns for agent-managed portfolios.
- [MCP + AI editors](/blog/vibe-coding-with-etoro-mcp) — Build agent workflows in Cursor, Claude Code, and MCP-compatible editors.

### Code examples

#### cURL

```bash
curl -X POST https://public-api.etoro.com/api/v1/agent-portfolios \
  -H "x-api-key: $ETORO_API_KEY" \
  -H "x-user-key: $ETORO_USER_KEY" \
  -H "x-request-id: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "momentum-strategy-v1",
    "description": "Momentum-based equity strategy"
  }'
```

#### JavaScript

```javascript
const res = await fetch(
  "https://public-api.etoro.com/api/v1/agent-portfolios",
  {
    method: "POST",
    headers: {
      "x-api-key": process.env.ETORO_API_KEY,
      "x-user-key": process.env.ETORO_USER_KEY,
      "x-request-id": crypto.randomUUID(),
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "momentum-strategy-v1",
      description: "Momentum-based equity strategy",
    }),
  }
);

const portfolio = await res.json();
console.log("Created:", portfolio.id, portfolio.name);
```


### Learn & docs

- [Vibe Coding with the eToro MCP Server](/blog/vibe-coding-with-etoro-mcp) — Build with Cursor, Claude, and AI-assisted workflows.
- [Authentication & API Keys Deep Dive](/learn/authentication-and-api-keys) — Tokens, keys, and secure delegation patterns.