{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/api-evangelist/etoro/refs/heads/main/json-schema/CreateAgentPortfolioRequest.json", "title": "CreateAgentPortfolioRequest", "type": "object", "properties": { "investmentAmountInUsd": { "type": "number", "description": "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 \u2014 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.", "example": 2000 }, "agentPortfolioName": { "type": "string", "description": "A unique display name for the agent-portfolio (6-10 characters).", "example": "MyPort1" }, "agentPortfolioDescription": { "type": "string", "description": "An optional description of the agent-portfolio's purpose or strategy.", "example": "My trading portfolio" }, "userTokenName": { "type": "string", "description": "A human-readable name for the user token provisioned with the agent-portfolio.", "example": "my-trading-token" }, "scopeIds": { "type": "array", "items": { "type": "integer" }, "deprecated": true, "description": "[DEPRECATED \u2014 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.", "example": [ 211, 212 ] }, "scopeNames": { "type": "array", "items": { "type": "string" }, "description": "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.", "example": [ "etoro-public:trade.real:read", "etoro-public:trade.real:write" ] }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "An optional set of IPv4 addresses allowed to use the provisioned user token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "An optional expiration date and time (UTC) for the provisioned user token.", "example": "2026-12-31T23:59:59Z" } }, "required": [ "investmentAmountInUsd", "agentPortfolioName", "userTokenName" ] }