---
title: "Create Agent Portfolio"
method: POST
path: "/api/v1/agent-portfolios"
tags: ["Agent Portfolios"]
deprecated: true
---

# Create Agent Portfolio

`POST /api/v1/agent-portfolios`

> **Deprecated.**

**Rate limit:** 60 requests per 60 seconds. This is the **default shared quota** — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.

---

[DEPRECATED — use POST /api/v2/agent-portfolios (scope names) instead] Creates a new agent-portfolio — a dedicated user account that receives its own fixed virtual balance (returned in agentPortfolioVirtualBalance). IMPORTANT: investmentAmountInUsd is the amount deducted from YOUR (the caller's) account balance to copy-trade this agent-portfolio — it is NOT the agent-portfolio's own balance. Positions are mirrored proportionally: e.g. if you invest $2,000 and agentPortfolioVirtualBalance is $10,000, each position is copied at 20% of its size into your account.

## Headers

- `x-request-id` string, uuid, required
- `x-api-key` string, password, required
- `x-user-key` string, password, required

## Request body

- CreateAgentPortfolioRequest
  - `investmentAmountInUsd` number, required — The amount in USD deducted from the CALLER's account balance to copy-trade this agent-portfolio. This is NOT the agent-portfolio's own balance — the agent-portfolio receives a separate fixed virtual balance (returned as agentPortfolioVirtualBalance). Positions are mirrored proportionally: e.g. $2,000 with a $10,000 virtual balance = 20% position sizing.
  - `agentPortfolioName` string, required — A unique display name for the agent-portfolio (6-10 characters).
  - `agentPortfolioDescription` string — An optional description of the agent-portfolio's purpose or strategy.
  - `userTokenName` string, required — A human-readable name for the user token provisioned with the agent-portfolio.
  - `scopeIds` integer[] — [DEPRECATED — use scopeNames instead] The set of permission scope identifiers to grant to the provisioned user token. Available scopes: 200 = etoro-public:real:read, 201 = etoro-public:demo:read, 202 = etoro-public:real:write, 203 = etoro-public:demo:write.
  - `scopeNames` string[] — The set of permission scope names (preferred; replaces the deprecated scopeIds). Provide either scopeNames or scopeIds. Available scopes: etoro-public:real:read, etoro-public:demo:read, etoro-public:real:write, etoro-public:demo:write.
  - `ipsWhitelist` string[] — An optional set of IPv4 addresses allowed to use the provisioned user token.
  - `expiresAt` string, date-time — An optional expiration date and time (UTC) for the provisioned user token.

## Response `201`

Agent-portfolio and user token created successfully

- CreateAgentPortfolioResponse
  - `agentPortfolioId` string, uuid — The unique identifier of the newly created agent-portfolio.
  - `agentPortfolioName` string — The display name assigned to the agent-portfolio.
  - `agentPortfolioGcid` integer — The GCID associated with the agent-portfolio.
  - `agentPortfolioVirtualBalance` number — The fixed virtual balance (in USD) that the agent-portfolio was funded with. The investmentAmountInUsd used to copy is proportional to this balance.
  - `mirrorId` integer — The Trading API mirror ID for this agent-portfolio's copy trade.
  - `userTokens` CreateAgentPortfolioUserTokenItem[] — The user tokens generated during agent-portfolio creation.
    - `userTokenId` string, uuid — The unique identifier of the newly created user token.
    - `userToken` string — The generated user token secret. Only available at creation time.
    - `userTokenName` string — The user-defined name for the user token.
    - `clientId` string, uuid — The OAuth client identifier associated with the user token.
    - `ipsWhitelist` string[] — The set of whitelisted IP addresses authorized to use this token.
    - `scopeIds` integer[] — [DEPRECATED — use scopeNames instead] The set of permission scope identifiers granted to this token. Available scopes: 200 = etoro-public:real:read, 201 = etoro-public:demo:read, 202 = etoro-public:real:write, 203 = etoro-public:demo:write.
    - `scopeNames` string[] — The set of permission scope names (preferred; replaces the deprecated scopeIds). Provide either scopeNames or scopeIds. Available scopes: etoro-public:real:read, etoro-public:demo:read, etoro-public:real:write, etoro-public:demo:write.
    - `expiresAt` string, date-time — The expiration date and time of the user token in UTC.

## Other responses

- `207` — Agent-portfolio created but user token provisioning failed
- `400` — Bad Request
- `401` — Unauthorized
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/etoro/apis/etoro-api.md) · [All operations](https://skmtc.net/etoro/apis/etoro-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/etoro/etoro-api/revisions/69c1fb266c35/schema)
