{ "openapi": "3.0.1", "info": { "title": "eToro Api", "version": "v1.244.0", "description": "eToro\u2019s public API provides access to real-time financial data, trading insights, and account management features, allowing developers to integrate eToro\u2019s services into their applications. With access to market prices, historical data, and social trading information, the API empowers users to enhance their trading strategies. Designed for security and scalability, the eToro API ensures smooth and reliable integration for a variety of financial applications.\n\nFor more details on integrating with eToro's public WebSocket service, please refer to the dedicated [WebSocket documentation](./websocket/websocket-doc.html)." }, "paths": { "/api/v1/agent-portfolios": { "get": { "tags": [ "Agent Portfolios" ], "summary": "Get Agent Portfolios", "description": "Retrieves all agent-portfolios belonging to the authenticated user.", "operationId": "getAgentPortfolios", "responses": { "200": { "description": "Agent-portfolios retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAgentPortfoliosResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b0a205f2-b2d2-42b2-9185-372deba22fa4" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] }, "post": { "tags": [ "Agent Portfolios" ], "summary": "Create Agent Portfolio", "deprecated": true, "description": "[DEPRECATED \u2014 use POST /api/v2/agent-portfolios (scope names) instead] Creates a new agent-portfolio \u2014 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 \u2014 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.", "operationId": "createAgentPortfolio", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioRequest" } } } }, "responses": { "201": { "description": "Agent-portfolio and user token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioResponse" } } } }, "207": { "description": "Agent-portfolio created but user token provisioning failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioPartialResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "NameTooShort": { "summary": "Agent-portfolio name too short", "value": { "errorCode": "ValidationFailed", "errorMessage": "Agent-portfolio name must be between 6 and 10 characters" } }, "InvestmentBelowMinimum": { "summary": "Investment amount below minimum", "value": { "errorCode": "ValidationFailed", "errorMessage": "Investment amount is below the minimum threshold" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2280f6b8-2224-44ff-b0fe-a4b7d5c86af0" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/agent-portfolios/{agentPortfolioId}": { "delete": { "tags": [ "Agent Portfolios" ], "summary": "Delete Agent Portfolio", "description": "Permanently removes a agent-portfolio by revoking all user tokens, stopping the copy mirror, and deleting from storage.", "operationId": "deleteAgentPortfolio", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ed18a032-7968-4134-b214-63fe4ce2472e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio to delete." } ], "responses": { "204": { "description": "Agent-portfolio was successfully removed" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "ValidationFailed", "errorMessage": "Invalid agent-portfolio ID" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/agent-portfolios/{agentPortfolioId}/user-tokens": { "post": { "tags": [ "Agent Portfolios" ], "summary": "Create User Token", "deprecated": true, "description": "[DEPRECATED \u2014 use POST /api/v2/agent-portfolios/{agentPortfolioId}/user-tokens (scope names) instead] Creates a new user token for the specified agent-portfolio.", "operationId": "createAgentPortfolioUserToken", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c267d233-e0c3-4a8a-bc6b-d17b941ff6da" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserTokenRequest" } } } }, "responses": { "201": { "description": "User token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserTokenResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "ScopeIdsRequired": { "summary": "Scope IDs are required", "value": { "errorCode": "ScopeIdsRequired", "errorMessage": "ScopeIds is required" } }, "InvalidIp": { "summary": "Invalid IP address", "value": { "errorCode": "IpsWhitelistInvalidIp", "errorMessage": "IpsWhitelist contains an invalid IPv4 address" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } } } }, "409": { "description": "Conflict \u2014 a user token with the requested name already exists for this agent-portfolio", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UserKeyNameAlreadyExists", "errorMessage": "UserKeyName already exists" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "MaxUserTokensExceeded", "errorMessage": "Maximum number of user tokens exceeded" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/agent-portfolios/{agentPortfolioId}/user-tokens/{userTokenId}": { "delete": { "tags": [ "Agent Portfolios" ], "summary": "Delete User Token", "description": "Permanently revokes the specified user token from a agent-portfolio.", "operationId": "deleteAgentPortfolioUserToken", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "0dd4f9c9-56c8-48f0-8f4a-efdd68968456" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio." }, { "name": "userTokenId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the user token to delete." } ], "responses": { "204": { "description": "User token revoked successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "ValidationFailed", "errorMessage": "Invalid agent-portfolio ID or user token ID" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } }, "patch": { "tags": [ "Agent Portfolios" ], "summary": "Update User Token", "deprecated": true, "description": "[DEPRECATED \u2014 use PATCH /api/v2/agent-portfolios/{agentPortfolioId}/user-tokens/{userTokenId} (scope names) instead] Updates the settings of an existing user token for a agent-portfolio. At least one field must be provided.", "operationId": "updateAgentPortfolioUserToken", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "acfc5a98-fefd-4fb5-8774-543f74274e81" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio." }, { "name": "userTokenId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the user token to update." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserTokenRequest" } } } }, "responses": { "204": { "description": "User token updated successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "NoChanges": { "summary": "No changes provided", "value": { "errorCode": "NoChangesDetected", "errorMessage": "At least one field must be provided" } }, "InvalidScopes": { "summary": "Invalid scope IDs", "value": { "errorCode": "ScopeIdNotAllowed", "errorMessage": "ScopeIds contains values not in the allowed set" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio or user token not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "AgentPortfolioNotFound": { "summary": "Agent-portfolio not found", "value": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } }, "UserTokenNotFound": { "summary": "User token not found", "value": { "errorCode": "NotFound", "errorMessage": "User token not found" } } } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/attachments": { "post": { "tags": [ "Attachments" ], "summary": "Upload a media attachment", "description": "Two-step media upload: clients first upload a file here to receive an Attachment object, then pass its url in a POST /feeds/post or POST /reactions/.../comment payload. Accepts multipart/form-data with a binary file field. Supported formats: JPEG and PNG. Maximum file size: 8 MB (8,388,608 bytes). The returned url is a plain CDN URL scoped to the uploading user.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "388629d6-720d-42df-afc4-1674c04c2c7a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "client_request_id", "in": "query", "required": true, "description": "Client-generated correlation ID (UUID). Required for request tracing and idempotency.", "schema": { "type": "string", "format": "uuid" }, "example": "dcbf75de-be53-47fe-bfd0-61365e74f9d4" } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary", "description": "Required. The image file to upload. Supported formats: JPEG and PNG. Maximum size: 8 MB (8,388,608 bytes), enforced server-side." } } }, "encoding": { "file": { "contentType": "image/jpeg, image/png" } } } } }, "responses": { "200": { "description": "Attachment uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Attachment" } } } }, "400": { "description": "Bad request \u2014 missing file or URL" }, "401": { "description": "Authentication required" }, "422": { "description": "Unsupported file type or file exceeds 8 MB limit" } }, "operationId": "uploadAMediaAttachment" } }, "/api/v1/balances": { "get": { "tags": [ "Balances" ], "summary": "Get aggregated balances", "description": "Returns aggregated balances across all account types for the authenticated user. Optionally filter by account type or specify the display currency for totals.", "operationId": "getBalances", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2a284616-e619-4daf-b778-9a6305e36e9a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountTypes", "in": "query", "description": "Optional comma-separated list of account types to include. Valid values: Trading, Cash, Options, Crypto, MoneyFarm, Spaceship.", "schema": { "type": "string" } }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "includeZeroBalances", "in": "query", "description": "Whether to include accounts with a zero balance in the response. Defaults to false.", "schema": { "type": "boolean" } }, { "name": "expand", "in": "query", "description": "Comma-separated list of optional sections to include in the response. Valid values: equityDetails.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Aggregated balances retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid query parameter value.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/balances/history": { "get": { "tags": [ "Balances" ], "summary": "Get historical balance snapshots", "description": "Returns end-of-day balance snapshots across all account types for the authenticated user. History is available for the last 12 months. The maximum date range per request is 365 days.", "operationId": "getHistoricalBalances", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "aa34941f-8c0e-47e9-a372-4e3821b845f5" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "fromDate", "in": "query", "description": "Start of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to toDate minus 30 days. Must be within the last 12 months. Maximum range with toDate: 365 days.", "schema": { "type": "string", "format": "date" } }, { "name": "toDate", "in": "query", "description": "End of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to today (UTC). Maximum range with fromDate: 365 days.", "schema": { "type": "string", "format": "date" } }, { "name": "accountTypes", "in": "query", "description": "Optional comma-separated list of account types to include. Valid values: Trading, Cash, Options, Crypto, MoneyFarm, Spaceship.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Historical balance snapshots retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetHistoricalBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid date range or query parameter value.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "404": { "description": "Not Found \u2014 no historical data found for the specified date range." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/balances/{accountType}": { "get": { "tags": [ "Balances" ], "summary": "Get balances by account type", "description": "Returns balances for a specific account type for the authenticated user. Optionally filter by account IDs.", "operationId": "getBalancesByAccountType", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9bad2f6e-2179-4c3a-9a08-c80b5237d80b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountType", "in": "path", "required": true, "description": "The account type to retrieve balances for.", "schema": { "$ref": "#/components/schemas/AccountType" } }, { "name": "accountIds", "in": "query", "description": "Optional comma-separated list of account IDs to include.", "schema": { "type": "string" } }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "includeZeroBalances", "in": "query", "description": "Whether to include accounts with a zero balance in the response. Defaults to false.", "schema": { "type": "boolean" } }, { "name": "expand", "in": "query", "description": "Comma-separated list of optional sections to include in the response. Valid values: equityDetails.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Balances for the specified account type retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid account type or query parameter value.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/balances/{accountType}/history": { "get": { "tags": [ "Balances" ], "summary": "Get historical balances by account type", "description": "Returns end-of-day balance snapshots for a specific account type for the authenticated user. History is available for the last 12 months. The maximum date range per request is 365 days.", "operationId": "getHistoricalBalancesByAccountType", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b203aadb-404e-478e-bb90-453ad5bd7c33" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountType", "in": "path", "required": true, "description": "The account type to retrieve historical balances for.", "schema": { "$ref": "#/components/schemas/AccountType" } }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "fromDate", "in": "query", "description": "Start of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to toDate minus 30 days. Must be within the last 12 months. Maximum range with toDate: 365 days.", "schema": { "type": "string", "format": "date" } }, { "name": "toDate", "in": "query", "description": "End of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to today (UTC). Maximum range with fromDate: 365 days.", "schema": { "type": "string", "format": "date" } }, { "name": "accountIds", "in": "query", "description": "Optional comma-separated list of account IDs to include.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Historical balance snapshots for the specified account type retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetHistoricalBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid account type, date range, or query parameter value.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "404": { "description": "Not Found \u2014 no historical data found for the specified account type and date range." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/balances/{accountType}/{accountId}": { "get": { "tags": [ "Balances" ], "summary": "Get balance for a specific account", "description": "Returns the balance for a specific account identified by type and account ID for the authenticated user.", "operationId": "getBalanceByAccount", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "79dd59ed-0c79-41c6-8d01-f3bb910fbf74" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountType", "in": "path", "required": true, "description": "The account type.", "schema": { "$ref": "#/components/schemas/AccountType" } }, { "name": "accountId", "in": "path", "required": true, "description": "The unique identifier of the account.", "schema": { "type": "string" } }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "includeZeroBalances", "in": "query", "description": "Whether to include accounts with a zero balance in the response. Defaults to false.", "schema": { "type": "boolean" } }, { "name": "expand", "in": "query", "description": "Comma-separated list of optional sections to include in the response. Valid values: equityDetails.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Balance for the specified account retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid account type or account ID.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "404": { "description": "Not Found \u2014 no account found for the specified type and account ID." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/balances/{accountType}/{accountId}/history": { "get": { "tags": [ "Balances" ], "summary": "Get historical balances for a specific account", "description": "Returns end-of-day balance snapshots for a specific account identified by type and account ID for the authenticated user. History is available for the last 12 months. The maximum date range per request is 365 days.", "operationId": "getHistoricalBalanceByAccount", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2faf6249-c7ab-4057-9760-923619a1a280" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountType", "in": "path", "required": true, "description": "The account type.", "schema": { "$ref": "#/components/schemas/AccountType" } }, { "name": "accountId", "in": "path", "required": true, "description": "The unique identifier of the account.", "schema": { "type": "string" } }, { "name": "displayCurrency", "in": "query", "description": "ISO 4217 currency code for totals and conversions. Defaults to USD.", "schema": { "type": "string", "default": "USD" } }, { "name": "fromDate", "in": "query", "description": "Start of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to toDate minus 30 days. Must be within the last 12 months. Maximum range with toDate: 365 days.", "schema": { "type": "string", "format": "date" } }, { "name": "toDate", "in": "query", "description": "End of the date range (inclusive). Format: YYYY-MM-DD (ISO 8601). Defaults to today (UTC). Maximum range with fromDate: 365 days.", "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Historical balance snapshots for the specified account retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetHistoricalBalancesResponse" } } } }, "400": { "description": "Bad Request \u2014 invalid account type, account ID, or date range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalancesErrorResponse" } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden \u2014 the token does not include the etoro-public:money.balance:read scope." }, "404": { "description": "Not Found \u2014 no account or historical data found for the specified parameters." }, "429": { "description": "Too Many Requests \u2014 rate limit exceeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v1/clubs": { "get": { "tags": [ "Clubs" ], "summary": "Get club dashboard data", "description": "Retrieves club dashboard data for the authenticated user, including tier information, benefits, account manager details, offers, downgrade risk, and webinars.", "responses": { "200": { "description": "Club dashboard data retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClubDashboardDataResponse" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - insufficient permissions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "InsufficientPermissions", "errorMessage": "Insufficient permissions to access this resource" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "50937a18-7fa5-48bf-83cb-703486489d1e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "getClubDashboardData" } }, "/api/v1/curated-lists": { "get": { "tags": [ "Watchlists" ], "summary": "Get curated lists", "description": "Retrieves curated investment lists available to the authenticated user.", "responses": { "200": { "description": "Successfully retrieved curated lists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CuratedListsResponse" } } } }, "204": { "description": "No curated lists available" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5b43a95b-8b78-4daa-891f-2e2dcc4cba11" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "getCuratedLists" } }, "/api/v1/feeds/following": { "get": { "tags": [ "Feeds" ], "summary": "Get following feed", "description": "Returns a chronological feed of posts from users the authenticated user follows. Requires authentication.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "158efe60-6508-4de3-8696-6215352f5924" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "take", "in": "query", "description": "Number of posts to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offset", "in": "query", "description": "Number of posts to skip for pagination", "schema": { "type": "integer", "default": 0, "minimum": 0 }, "example": 0 }, { "name": "reactionsPageSize", "in": "query", "description": "Number of inline reactions to include per post (1\u201350, default 10)", "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50 }, "example": 10 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Following feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getFollowingFeed" } }, "/api/v1/feeds/for-you": { "get": { "tags": [ "Feeds" ], "summary": "Get personalised For You feed", "description": "Returns a personalised feed for the authenticated user ranked by followed users, followed instruments, prior engagement, and freshness. Ranking method is resolved via A/B experiment (Optimizely) and per-user overrides. Requires authentication \u2014 this feed is intrinsically personal.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9335832f-4a83-46ac-99f8-21e5e2c31e2b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "take", "in": "query", "description": "Number of posts to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offset", "in": "query", "description": "Number of posts to skip for pagination", "schema": { "type": "integer", "default": 0, "minimum": 0 }, "example": 0 }, { "name": "reactionsPageSize", "in": "query", "description": "Number of inline reactions to include per post (1\u201350, default 10)", "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50 }, "example": 10 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Personalised feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getPersonalisedForYouFeed" } }, "/api/v1/feeds/instrument/{marketId}": { "get": { "tags": [ "Feeds" ], "summary": "Get instrument feed posts", "description": "Retrieves feed posts associated with a specific financial instrument. The feed includes discussions, analyses, and other content related to the instrument.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "7ed04791-ec01-447c-8918-bdadd273398e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "marketId", "in": "path", "description": "Unique identifier of the financial instrument/market to retrieve feed posts for", "required": true, "schema": { "type": "string" }, "example": "123456" }, { "name": "requesterUserId", "in": "query", "description": "ID of the user making the request. Used for personalization and permission checks.", "schema": { "type": "string" }, "example": "7890" }, { "name": "take", "in": "query", "description": "Number of feed posts to retrieve. Used for pagination.", "schema": { "type": "integer", "format": "int32", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response. Part of badges feature experiment.", "schema": { "type": "boolean", "default": false } }, { "name": "offset", "in": "query", "description": "Number of feed posts to skip. Used for pagination in combination with take parameter.", "schema": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 } }, { "name": "reactionsPageSize", "in": "query", "description": "Number of reactions to include per post. Controls the pagination of post reactions.", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 50 } } ], "responses": { "200": { "description": "Successfully retrieved instrument feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } } }, "operationId": "getInstrumentFeedPosts" } }, "/api/v1/feeds/markets/{marketId}": { "get": { "tags": [ "Feeds" ], "summary": "Get instrument feed posts", "description": "Retrieves feed posts associated with a specific financial instrument. The feed includes discussions, analyses, and other content related to the instrument.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "03b3f65e-99f5-4225-8d35-6e7c3309854b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "marketId", "in": "path", "description": "Unique identifier of the financial instrument/market to retrieve feed posts for", "required": true, "schema": { "type": "string" }, "example": "123456" }, { "name": "take", "in": "query", "description": "Number of feed posts to retrieve. Used for pagination.", "schema": { "type": "integer", "format": "int32", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response. Part of badges feature experiment.", "schema": { "type": "boolean", "default": false } }, { "name": "offset", "in": "query", "description": "Number of feed posts to skip. Used for pagination in combination with take parameter.", "schema": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 } }, { "name": "reactionsPageSize", "in": "query", "description": "Number of reactions to include per post. Controls the pagination of post reactions.", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 50 } } ], "responses": { "200": { "description": "Successfully retrieved instrument feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getInstrumentFeedPosts2" } }, "/api/v1/feeds/news": { "get": { "tags": [ "Feeds" ], "summary": "Get news feed", "description": "Returns a ranked news feed for the authenticated user. Ranking method is resolved via A/B experiment and a configurable default.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "83493b17-6f29-488f-9f15-3a481b5a4a67" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "take", "in": "query", "description": "Number of posts to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offset", "in": "query", "description": "Number of posts to skip for pagination", "schema": { "type": "integer", "default": 0, "minimum": 0 }, "example": 0 }, { "name": "reactionsPageSize", "in": "query", "description": "Number of inline reactions to include per post (1\u201350, default 10)", "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50 }, "example": 10 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "News feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getNewsFeed" } }, "/api/v1/feeds/post": { "post": { "tags": [ "Feeds" ], "summary": "Create a new discussion post", "description": "Creates a new discussion post in the feed system. This endpoint allows users to create posts that can be associated with instruments, users, or general discussions.", "requestBody": { "description": "Discussion post creation details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionCreateRequest" } } } }, "responses": { "201": { "description": "Post accepted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9e0c08a1-afcd-4234-87b8-47de3438bda5" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "createANewDiscussionPost" } }, "/api/v1/feeds/saved": { "get": { "tags": [ "Feeds" ], "summary": "Get saved feed", "description": "Returns a list of posts the authenticated user has bookmarked. Only the requesting user can see their own saved feed. Requires authentication.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "02b69c47-fca4-4bb1-9920-65e5ab3dc85d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "take", "in": "query", "description": "Number of posts to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offset", "in": "query", "description": "Number of posts to skip for pagination", "schema": { "type": "integer", "default": 0, "minimum": 0 }, "example": 0 }, { "name": "reactionsPageSize", "in": "query", "description": "Number of inline reactions to include per post (1\u201350, default 10)", "schema": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50 }, "example": 10 }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Saved feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getSavedFeed" } }, "/api/v1/feeds/user/{userId}": { "get": { "tags": [ "Feeds" ], "summary": "Get user feed posts", "description": "Retrieves feed posts associated with a specific user. The feed includes the user's discussions, analyses, and other content they have posted.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2206c17f-7068-4ab1-a27c-3854e6350918" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "userId", "in": "path", "description": "ID of the user whose feed posts should be retrieved", "required": true, "schema": { "type": "string" }, "example": "7890" }, { "name": "requesterUserId", "in": "query", "description": "ID of the user making the request. Used for personalization and permission checks.", "schema": { "type": "string" }, "example": "1111" }, { "name": "take", "in": "query", "description": "Number of feed posts to retrieve. Used for pagination.", "schema": { "type": "integer", "format": "int32", "default": 20, "minimum": 1, "maximum": 100 } }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response. Part of badges feature experiment.", "schema": { "type": "boolean", "default": false } }, { "name": "offset", "in": "query", "description": "Number of feed posts to skip. Used for pagination in combination with take parameter.", "schema": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 } }, { "name": "reactionsPageSize", "in": "query", "description": "Number of reactions to include per post. Controls the pagination of post reactions.", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 50 } } ], "responses": { "200": { "description": "Successfully retrieved user feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } } }, "operationId": "getUserFeedPosts" } }, "/api/v1/feeds/users/{userId}": { "get": { "tags": [ "Feeds" ], "summary": "Get user feed posts", "description": "Retrieves feed posts associated with a specific user. The feed includes the user's discussions, analyses, and other content they have posted.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "7de756b6-e69a-4342-b510-a39a935510eb" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "userId", "in": "path", "description": "ID of the user whose feed posts should be retrieved", "required": true, "schema": { "type": "string" }, "example": "7890" }, { "name": "take", "in": "query", "description": "Number of feed posts to retrieve. Used for pagination.", "schema": { "type": "integer", "format": "int32", "default": 20, "minimum": 1, "maximum": 100 } }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response. Part of badges feature experiment.", "schema": { "type": "boolean", "default": false } }, { "name": "offset", "in": "query", "description": "Number of feed posts to skip. Used for pagination in combination with take parameter.", "schema": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 } }, { "name": "reactionsPageSize", "in": "query", "description": "Number of reactions to include per post. Controls the pagination of post reactions.", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 50 } } ], "responses": { "200": { "description": "Successfully retrieved user feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getUserFeedPosts2" } }, "/api/v1/feeds/users/{userId}/pinned": { "get": { "tags": [ "Feeds" ], "summary": "Get user pinned feed posts", "description": "Retrieves the posts that the specified user has pinned to the top of their profile feed. The pinned feed surfaces highlighted content the user has explicitly chosen to feature, ordered by pin time.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "e01c33d4-e7db-4a2a-b8b5-b99acb166fce" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "userId", "in": "path", "description": "ID of the user whose pinned posts should be retrieved", "required": true, "schema": { "type": "string" }, "example": "7890" }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response. Part of badges feature experiment.", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Successfully retrieved user pinned feed posts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionsResponse" } } } }, "401": { "description": "Authentication required" } }, "operationId": "getUserPinnedFeedPosts" } }, "/api/v1/instruments/discover": { "get": { "tags": [ "Asset Explorer" ], "summary": "Discover instruments", "description": "Retrieve a paginated list of instruments with optional sorting, field projection, and arbitrary field filters. Filters are applied by adding any of the supported field names as a query parameter (e.g. `exchangeName=NASDAQ`). Suffixing a field name with `Min` or `Max` applies a greater-than or less-than filter respectively (e.g. `peRatioMin=10`, `marketCapMax=1000000000`). The set of supported field names is fixed and is documented under the `Instrument` schema.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2fa07ad4-b056-405c-803b-e3d8aeb90a58" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "page", "in": "query", "description": "The 1-based page number to retrieve.", "required": false, "schema": { "type": "integer", "format": "int32" }, "example": 1 }, { "name": "pageSize", "in": "query", "description": "The number of items to return per page.", "required": false, "schema": { "type": "integer", "format": "int32" }, "example": 50 }, { "name": "sort", "in": "query", "description": "Comma-separated list of `Instrument` fields to sort by. Prefix a field with `-` for descending order. Example: `-marketCap,displayName`.", "required": false, "schema": { "type": "string" } }, { "name": "fields", "in": "query", "description": "Comma-separated list of `Instrument` fields to include in each item. If omitted, all supported fields are returned. Example: `symbol,displayName,currentRate`.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response containing a paginated list of instruments.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentSearchResponse" } } } }, "400": { "description": "Bad request, for example a malformed query parameter." } }, "operationId": "discoverInstruments" } }, "/api/v1/instruments/{symbol}": { "get": { "tags": [ "Asset Explorer" ], "summary": "Get an instrument by symbol", "description": "Retrieve a single instrument by its trading symbol. Use the `fields` query parameter to project a subset of `Instrument` fields.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "6f69fe03-03d6-4a96-a002-609254e0306d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "symbol", "in": "path", "description": "The trading symbol of the instrument (e.g. `AAPL`, `BTC`).", "required": true, "schema": { "type": "string" }, "example": "AAPL" }, { "name": "fields", "in": "query", "description": "Comma-separated list of `Instrument` fields to include in the response. If omitted, all supported fields are returned. Example: `symbol,displayName,currentRate`.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response containing the instrument.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Instrument" } } } }, "404": { "description": "No instrument found for the given symbol." } }, "operationId": "getAnInstrumentBySymbol" } }, "/api/v1/instruments/{symbol}/{shortener}": { "get": { "tags": [ "Asset Explorer" ], "summary": "Get an instrument by symbol using a field shortener", "description": "Retrieve a single instrument by its trading symbol, restricted to the field set defined by the given shortener preset. The `fields` query parameter can further narrow the projection to a subset of the shortener's fields.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c2f6bf05-a1b6-45e8-807d-2004ace56432" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "symbol", "in": "path", "description": "The trading symbol of the instrument (e.g. `AAPL`, `BTC`).", "required": true, "schema": { "type": "string" }, "example": "AAPL" }, { "name": "shortener", "in": "path", "description": "The name of an allowed shortener preset that restricts the returned field set.", "required": true, "schema": { "type": "string" }, "example": "summary" }, { "name": "fields", "in": "query", "description": "Comma-separated list of `Instrument` fields to include in the response. Must be a subset of the shortener's fields. Example: `symbol,displayName,currentRate`.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response containing the instrument restricted to the shortener's fields.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Instrument" } } } }, "400": { "description": "The provided shortener is not in the allowed list." }, "404": { "description": "No instrument found for the given symbol." } }, "operationId": "getInstrumentSymbolUsingFieldShortener" } }, "/api/v1/market-data/exchanges": { "get": { "tags": [ "Market Data" ], "summary": "Retrieves a list of exchanges supported by the platform along with basic descriptive data.", "operationId": "GetExchanges", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "25640310-9cff-42be-a7b8-535d9d1c57cf" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "exchangeIds", "in": "query", "description": "A comma seperated list of exchange ids to retrieve", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExchangesResponse" } } } } } } }, "/api/v1/market-data/instrument-types": { "get": { "tags": [ "Market Data" ], "summary": "Fetch available instrument types (asset classes) such as stocks, ETFs, commodities, etc.", "operationId": "GetInstrumentTypes", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a69094d3-f69d-4f31-93df-771189497cf1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "instrumentTypeIds", "in": "query", "description": "A comma seperated list of instrument type ids to retrieve", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentTypesResponse" } } } } } } }, "/api/v1/market-data/instruments": { "get": { "tags": [ "Market Data" ], "summary": "Retrieves metadata for specified instruments, including display names, exchange IDs, and classification.", "operationId": "GetInstrumentsByFilters", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "318a729a-324c-429f-b0d0-7b9e375012a8" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "instrumentIds", "in": "query", "description": "A comma seperated list of instrument ids to filter on", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, { "name": "exchangeIds", "in": "query", "description": "A comma seperated list of exchange ids to filter on", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, { "name": "stocksIndustryIds", "in": "query", "description": "A comma seperated list of stock industry ids to filter on", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } }, { "name": "instrumentTypeIds", "in": "query", "description": "A comma seperated list of instrument type ids to filter on", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentsResponse" } } } } } } }, "/api/v1/market-data/instruments/history/closing-price": { "get": { "tags": [ "Market Data" ], "summary": "Get historical closing prices for all instruments", "operationId": "getClosingPrices", "responses": { "200": { "description": "Successful retrieval of closing prices", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/closingPricesResponse" }, "example": [ { "instrumentId": 1002, "officialClosingPrice": 175.75, "isMarketOpen": true, "closingPrices": { "daily": { "price": 175.75, "date": "2025-03-07 00:00:00Z" }, "weekly": { "price": 175.75, "date": "2025-03-07 00:00:00Z" }, "monthly": { "price": 172.22, "date": "2025-02-28 00:00:00Z" } } }, { "instrumentId": 999, "officialClosingPrice": 68, "isMarketOpen": false, "closingPrices": { "daily": { "price": 68, "date": "2024-11-16 00:00:00Z" }, "weekly": { "price": 68, "date": "2024-11-16 00:00:00Z" }, "monthly": { "price": -1, "date": "0001-01-01 00:00:00Z" } } } ] } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "d30da319-a8c9-4080-b3d2-fed375fa9a92" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/market-data/instruments/rates": { "get": { "tags": [ "Market Data" ], "summary": "Retrieve current market rates and pricing information for specified instruments", "description": "Provides real-time market data including bid/ask prices, conversion rates, and execution prices for specified financial instruments. Essential for price discovery and trade execution decisions.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "4fb24302-0053-4948-a468-8b735c27ef44" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "instrumentIds", "in": "query", "style": "form", "description": "Comma-separated list of instrument IDs to retrieve market rates for. Each ID represents a unique tradable asset in the system.", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "maxItems": 100 }, "example": "1,2,3", "required": true } ], "responses": { "200": { "description": "Successfully retrieved current market rates", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LiveRatesResponse" } } } }, "400": { "description": "Invalid request - Typically due to invalid instrument IDs or exceeding maximum limit" } }, "operationId": "retrieveCurrentMarketRatesPricingInformation" } }, "/api/v1/market-data/instruments/{instrumentId}/history/candles/{direction}/{interval}/{candlesCount}": { "get": { "tags": [ "Market Data" ], "summary": "Get historical candles data for an instrument", "description": "Retrieves historical price data in OHLCV (Open, High, Low, Close, Volume) format for a specified instrument. The data is organized into time-based candles of various intervals, from one minute to one week.", "operationId": "getCandles", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "344b5024-6cb7-4fc3-84e2-6242a48c0741" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "direction", "in": "path", "description": "Sorting direction of the candles data. Use 'asc' for oldest to newest, or 'desc' for newest to oldest.", "required": true, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "interval", "in": "path", "description": "Time interval for each candle. Determines the granularity of the price data. Shorter intervals provide more detailed price action but require more data points.", "required": true, "schema": { "type": "string", "enum": [ "OneMinute", "FiveMinutes", "TenMinutes", "FifteenMinutes", "ThirtyMinutes", "OneHour", "FourHours", "OneDay", "OneWeek" ] } }, { "name": "candlesCount", "in": "path", "description": "Number of candles to retrieve. Maximum value is 1000. For longer historical periods, consider using a larger time interval or making multiple requests.", "required": true, "schema": { "type": "integer", "default": 100, "maximum": 1000 } }, { "name": "instrumentId", "in": "path", "description": "Unique identifier of the financial instrument to retrieve candles for. This ID is consistent across all eToro systems.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful retrieval of candles data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/candlesResponse" }, "example": { "interval": "OneMinute", "candles": [ { "instrumentId": 12, "candles": [ { "instrumentID": 12, "fromDate": "2025-03-05T10:34:00Z", "open": 1.70227, "high": 1.70277, "low": 1.70221, "close": 1.70253, "volume": 0.0 }, { "instrumentID": 12, "fromDate": "2025-03-05T10:35:00Z", "open": 1.70252, "high": 1.70276, "low": 1.70244, "close": 1.70276, "volume": 0.0 } ], "rangeOpen": 1.70227, "rangeClose": 1.70276, "rangeHigh": 1.70277, "rangeLow": 1.70221, "volume": 0.0 } ] } } } } } } }, "/api/v1/market-data/search": { "get": { "tags": [ "Market Data" ], "summary": "Search for Instruments", "description": "Retrieve a list of instruments based on various search criteria. Each field in the response can be utilized as a filter or projection.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "4fcc77f1-c076-483b-aa6f-898f62bd63eb" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "searchText", "in": "query", "description": "Text to search for within instrument names.", "required": false, "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "description": "The number of results to return per page.", "required": false, "schema": { "type": "integer" } }, { "name": "pageNumber", "in": "query", "description": "The page number to retrieve for pagination.", "required": false, "schema": { "type": "integer" } }, { "name": "fields", "in": "query", "description": "A comma-separated list of fields to include in the response. Example: pop=popularityUniques7Day,displayname", "required": true, "schema": { "type": "string" } }, { "name": "sort", "in": "query", "description": "The field to sort by, with direction (asc/desc). Example: popularityUniques7Day desc", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response containing the list of instruments.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentSearchResponse" } } } } }, "operationId": "searchForInstruments" } }, "/api/v1/market-data/stocks-industries": { "get": { "tags": [ "Market Data" ], "summary": "Gets data on available stocks industries", "operationId": "GetStocksIndustries", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b688906f-f192-4861-bf87-4dbbe96f1efa" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "stocksIndustryIds", "in": "query", "description": "A comma seperated list of stock industry ids to retrieves", "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StocksIndustriesResponse" } } } } } } }, "/api/v1/market-recommendations/{itemsCount}": { "get": { "tags": [ "Watchlists" ], "summary": "Get market recommendations", "description": "Retrieves personalized market recommendations for the authenticated user.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a09d9f87-13c3-4d09-9da3-20f059084a77" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "itemsCount", "in": "path", "description": "Number of recommendations to return", "required": true, "schema": { "type": "integer", "format": "int16", "default": 10, "minimum": 1, "maximum": 100 }, "example": 10 } ], "responses": { "200": { "description": "Successfully retrieved market recommendations", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketRecommendationsResponse" } } } }, "204": { "description": "No recommendations available" } }, "operationId": "getMarketRecommendations" } }, "/api/v1/me": { "get": { "tags": [ "Identity" ], "summary": "Get authenticated user profile", "description": "Returns the profile of the currently authenticated user, including account identifiers (GCID, real and demo CIDs), profile fields from Scope Data API (username, name, player level, gender, language, date of birth, LEI), and the OAuth scopes granted to the current access token.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "01e83330-c9f5-4a63-8489-1d3116a93c32" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/meResponse" }, "examples": { "example": { "summary": "User Profile Response", "value": { "gcid": 123456, "realCid": 789012, "demoCid": 345678, "username": "johndoe", "firstName": "John", "middleName": "Q", "lastName": "Doe", "playerLevel": 3, "gender": 1, "language": 1, "dateOfBirth": "1990-01-01", "lei": "5493001KJTIIGC8Y1R12", "scopes": [ "etoro-public:real:read", "etoro-public:user-info:read" ] } } } } } }, "401": { "description": "Unauthorized - Missing or invalid authentication credentials" }, "403": { "description": "Forbidden - Insufficient permissions" } }, "operationId": "getAuthenticatedUserProfile" } }, "/api/v1/money/accounts/cash": { "post": { "tags": [ "Cash Accounts" ], "summary": "Create a cash account", "description": "Initiates the creation of a cash account. The user must be eligible (IbanEligible or CardAndIbanEligible). Returns 202 Accepted with a requestReferenceId for polling status.", "operationId": "createCashAccount", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCashAccountRequest" }, "example": { "requestReferenceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "tncDocId": 42 } } } }, "responses": { "202": { "description": "Request accepted for processing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCashAccountAcceptedResponse" }, "example": { "requestReferenceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "eligibilityStatus": "CardAndIbanEligible", "status": "Accepted" } } } }, "401": { "description": "Unauthorized" }, "409": { "description": "Duplicate requestReferenceId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "DuplicateRequestReferenceId", "errorMessage": "A request with this requestReferenceId already exists" } } } }, "422": { "description": "User not eligible for cash account creation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BusinessErrorResponse" }, "example": { "errorCode": "NotEligibleForCashAccountCreation", "errorMessage": "User is not eligible to create a cash account" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "bbb35ad7-fefa-4820-a92f-608ed1978f53" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] }, "get": { "tags": [ "Cash Accounts" ], "summary": "Get user cash accounts", "description": "Returns the eligibility of a user to create a cash account, and lists the existing cash accounts including the related bank account details and the cards related to each account. The user is identified from the OAuth token.", "operationId": "getCashAccounts", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "6a6ce5b2-e1ee-4c9a-ac8c-f2cdc7d27fb6" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "responses": { "200": { "description": "Successfully retrieved cash accounts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashAccountsResponse" }, "example": { "accounts": [ { "id": "f0995efc-25a1-465e-bec3-d309aaf00ede", "currency": "GBP", "status": "Active", "bankAccount": { "id": "0f5270fe-200a-4c35-b788-bda212973fa2", "accountName": "John Doe", "identifiers": [ { "type": "bankAccountNumber", "value": "11549380" }, { "type": "ncc", "value": "041335" }, { "type": "iban", "value": "GB08MRMI04133511549380" }, { "type": "bic", "value": "MRMIGB22XXX" } ], "region": "UK", "countryCode": "GB", "bankProvider": "ClearBank", "institutionName": "ClearBank" }, "cards": [ { "id": "7f446164-57d8-4b87-9f0f-958083c7f459", "status": "Activated", "maskedPan": "459688******0196", "isVirtual": false, "name": "John Doe", "created": "2026-04-27T12:40:55.7766667", "expirationDate": "2029-04-30T23:59:59" } ] } ], "eligibilityStatus": "CardAndIbanEligible" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - Insufficient permissions" }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "GeneralError", "errorMessage": "Internal server error. Please retry or contact support" } } } } } } }, "/api/v1/money/accounts/cash/eligibility": { "get": { "tags": [ "Cash Accounts" ], "summary": "Get cash account creation eligibility", "description": "Returns the user's eligibility to create a cash account, along with prerequisites (T&C), contact info, and basic user info needed for account creation.", "operationId": "getCashAccountEligibility", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "17c0c69b-4ea3-45d8-b629-0f293cf6117b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "responses": { "200": { "description": "Eligibility details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashAccountEligibilityResponse" }, "example": { "eligibilityStatus": "CardAndIbanEligible", "ineligibilityReasons": [], "prerequisite": { "tncInfo": { "tncDocId": 42, "url": "https://example.com/tnc" } }, "contactInfo": { "address": "10 High Street", "buildingNumber": "10", "city": "London", "zipCode": "EC1A 1BB", "country": "GB", "phone": "+441234567890" }, "userInfo": { "firstName": "John", "middleName": null, "lastName": "Doe" } } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Insufficient permissions" }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } } } } }, "/api/v1/money/accounts/cash/status": { "get": { "tags": [ "Cash Accounts" ], "summary": "Get cash account creation status", "description": "Polls the creation status of a previously submitted cash account creation request. Returns the account details when status is Success.", "operationId": "getCashAccountCreationStatus", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "40185c00-42db-4206-ae6d-c37f78242601" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "requestReferenceId", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The requestReferenceId returned from the POST create endpoint." } ], "responses": { "200": { "description": "Creation status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashAccountCreationStatusResponse" }, "example": { "requestReferenceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "Pending", "updatedAt": "2026-05-13T10:00:00Z", "account": null } } } }, "400": { "description": "Bad Request - missing requestReferenceId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Creation request not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BusinessErrorResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } } } } }, "/api/v1/money/accounts/cash/{accountId}": { "get": { "tags": [ "Cash Accounts" ], "summary": "Get cash account by id", "description": "Returns a single cash account. The response body is identical in shape to one element of `accounts` from GET /api/v1/money/accounts/cash (CashAccount). Path accountId must match CashAccount.id for that element.", "operationId": "getCashAccountById", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "4f9b4d15-2f36-4b68-86bb-fb7f66248001" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "Must equal CashAccount.id from the list endpoint." } ], "responses": { "200": { "description": "One cash account (same schema as list item)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashAccount" }, "example": { "id": "f0995efc-25a1-465e-bec3-d309aaf00ede", "currency": "GBP", "status": "Active", "bankAccount": { "id": "0f5270fe-200a-4c35-b788-bda212973fa2", "accountName": "John Doe", "identifiers": [ { "type": "bankAccountNumber", "value": "11549380" }, { "type": "ncc", "value": "041335" }, { "type": "iban", "value": "GB08MRMI04133511549380" }, { "type": "bic", "value": "MRMIGB22XXX" } ], "region": "UK", "countryCode": "GB", "bankProvider": "ClearBank", "institutionName": "ClearBank" }, "cards": [ { "id": "7f446164-57d8-4b87-9f0f-958083c7f459", "status": "Activated", "maskedPan": "459688******0196", "isVirtual": false, "name": "John Doe", "created": "2026-04-27T12:40:55.7766667", "expirationDate": "2029-04-30T23:59:59" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - Insufficient permissions" }, "404": { "description": "Account not found or not owned by the user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "AccountNotFound", "errorMessage": "Account not found" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "GeneralError", "errorMessage": "Internal server error. Please retry or contact support" } } } } } } }, "/api/v1/money/accounts/cash/{accountId}/transactions": { "get": { "tags": [ "Cash Accounts" ], "summary": "List cash account transactions (paginated)", "description": "Returns a cursor-paginated list of transactions for the given cash account. Use pageSize and pageToken for pagination; nextPageToken is null when there is no next page.", "operationId": "listCashAccountTransactions", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "06118bb9-9ae8-436f-b7fe-8ad7e1b68848" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "accountId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "Cash account identifier (must equal CashAccount.id)." }, { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 50 }, "description": "Page size (default 50, max 500)." }, { "name": "pageToken", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Opaque pagination cursor from pagination.nextPageToken of the previous response." } ], "responses": { "200": { "description": "Successful response with transaction results and pagination metadata.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashAccountTransactionsResponse" }, "example": { "results": [ { "id": "12345", "accountId": "f0995efc-25a1-465e-bec3-d309aaf00ede", "transactionType": "card", "transactionSubtype": "cardPayment", "direction": "debit", "status": "settled", "amount": "100.00", "currency": "USD", "originalAmount": "90.00", "originalCurrency": "EUR", "conversionRate": "1.1111", "postedAt": "2026-05-03T10:16:12Z", "counterparty": { "name": "Acme Store", "type": "merchant" }, "cardTransactionDetails": { "cardId": "101", "merchantName": "Acme Store", "country": "US", "authorizationStatus": "normal" }, "bankTransferTransactionDetails": null, "internalTransferTransactionDetails": null } ], "pagination": { "pageSize": 50, "nextPageToken": "eyJsYXN0SWQiOjEyMzk1fQ==", "hasNext": true } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } }, "404": { "description": "Account not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" } } } } } } }, "/api/v1/notifications/messages": { "get": { "tags": [ "Notifications" ], "summary": "Get in-app notifications", "description": "Retrieves all in-app notifications for the authenticated user. Rate limit: 1 request per second.", "responses": { "200": { "description": "Notifications retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InAppNotificationsResult" } } } }, "401": { "description": "Unauthorized" }, "422": { "description": "Validation failed" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "d45f86bf-1871-4e66-ab5a-0cfe4779c52e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "getInAppNotifications" }, "patch": { "tags": [ "Notifications" ], "summary": "Mark all notifications as read", "description": "Marks all notifications as read for the authenticated user. Rate limit: 20 requests per minute.", "responses": { "204": { "description": "All notifications marked as read" }, "401": { "description": "Unauthorized" }, "422": { "description": "Validation failed" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "52eaaee7-b830-4641-8675-71abbbf60768" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "markAllNotificationsAsRead" } }, "/api/v1/pi-data/copiers": { "get": { "tags": [ "PI Data" ], "summary": "Get copiers public info", "responses": { "200": { "description": "A list of copiers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeCopiersResponse" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "e12da2ec-b45f-4ea6-b583-1671c3f52988" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "getCopiersPublicInfo" } }, "/api/v1/posts": { "post": { "tags": [ "Posts" ], "summary": "Create a new discussion post", "description": "Creates a new discussion post in the feed system. This endpoint allows users to create posts that can be associated with instruments, users, or general discussions.", "requestBody": { "description": "Discussion post creation details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionCreateRequest" } } } }, "responses": { "201": { "description": "Post created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "401": { "description": "Authentication required" }, "403": { "description": "User is blocked" }, "422": { "description": "Validation error \u2014 content rejected (e.g. by the spam classifier) or fields contain invalid data" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5753c12d-ff72-498d-b879-50e6b5f3fced" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "createANewDiscussionPost2" } }, "/api/v1/posts/polls": { "post": { "tags": [ "Posts" ], "summary": "Create a poll post", "description": "Creates a new poll post. The poll must include a title and at least 2 options. Once created the poll is immutable \u2014 options and title cannot be changed. The post itself can still be deleted.", "requestBody": { "description": "Poll post content", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollCreateRequest" } } } }, "responses": { "201": { "description": "Poll post created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "401": { "description": "Authentication required" }, "422": { "description": "Validation error \u2014 missing message, missing poll title/options, or poll creation failed" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5d8b0fa3-0fdf-477d-810a-07540f21634c" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "createAPollPost" } }, "/api/v1/posts/shares": { "post": { "tags": [ "Posts" ], "summary": "Share a post", "description": "Creates a share post that references an existing post. Two variants are supported:\n\n- **Reshare** \u2014 send `message` as an empty string (`\"\"`).\n- **Quote share** \u2014 send `message` with your commentary text.\n\nReturns 201 on success. See the request body for field-level semantics, including how to collapse share chains.", "requestBody": { "description": "Share payload.\n\n- `message` (required) \u2014 set to `\"\"` for a reshare, or to your commentary text for a quote share. Must be present; cannot be null.\n- `sharedOriginDiscussion` (required) \u2014 the ID of the post being shared.\n- `sharedDiscussionId` (optional) \u2014 set this only when `sharedOriginDiscussion` itself points to a share. It collapses the chain so the created Post's `metadata.share.sharedPost` refers to `sharedDiscussionId` and `metadata.share.sharedOriginPost` refers to `sharedOriginDiscussion`, giving readers a flat 2-level reference instead of recursing through the share history. Leave unset for first-level shares.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SharePostRequest" }, "examples": { "reshare": { "summary": "Reshare (empty message)", "value": { "message": "", "sharedOriginDiscussion": "d9020c00-c364-11ee-8080-80005148990b" } }, "quoteShare": { "summary": "Quote share with commentary", "value": { "message": "Great insight on Tesla!", "sharedOriginDiscussion": "d9020c00-c364-11ee-8080-80005148990b" } } } } } }, "responses": { "201": { "description": "Share post created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "400": { "description": "Request body is missing or malformed" }, "401": { "description": "Authentication required" }, "403": { "description": "Original owner has blocked the requester or restricted interactions" }, "404": { "description": "Original post not found" }, "422": { "description": "Validation failed \u2014 quote message rejected by spam classifier" } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ea5262ff-a374-4562-ba2f-796b6952d27d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "shareAPost" } }, "/api/v1/posts/{postId}": { "get": { "tags": [ "Posts" ], "summary": "Get a single post by ID", "description": "Retrieves a single discussion post by its ID, including comments preview, emotions data, and requester context. Authentication is optional \u2014 unauthenticated requests receive the post without personalised requester context.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "1b132bec-2bf1-408f-9eab-bd2f8f2e111b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the post to retrieve (UUID)", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "take", "in": "query", "description": "Number of inline comments to include in the response", "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 0 } }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Flag indicating whether to include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Post retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Discussion" } } } }, "404": { "description": "Post not found" } }, "operationId": "getASinglePostById" }, "put": { "tags": [ "Posts" ], "summary": "Update an existing post", "description": "Updates the authenticated user's own post in-place. The owner field is derived from the authentication token and must not be supplied in the request body. Editable fields: message, tags, mentions, attachments.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "76f7af16-4288-4593-bdcb-2a5ebde24206" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the post to update (UUID)", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "requestBody": { "description": "Fields to update on the post", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscussionUpdateRequest" } } } }, "responses": { "200": { "description": "Post updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the post owner" }, "404": { "description": "Post not found" }, "422": { "description": "Validation failed \u2014 missing message body or spam classification rejected the content" } }, "operationId": "updateAnExistingPost" }, "delete": { "tags": [ "Posts" ], "summary": "Soft-delete a post", "description": "Soft-deletes the authenticated user's own post. Sets isDeleted=true and blanks message text and attachments. Child comments and like/comment counters are preserved. The post is removed from all feed listings.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "45db71f3-a995-4d82-9045-09549e2ed826" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the post to delete (UUID)", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post deleted successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the post owner" }, "404": { "description": "Post not found or already deleted" } }, "operationId": "softDeleteAPost" } }, "/api/v1/posts/{postId}/comments": { "post": { "tags": [ "Comments and Replies" ], "summary": "Create a comment on a post", "description": "Creates a new comment on a specific discussion post. Comments can include text, mentions, tags, and attachments.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "29312cd0-780c-418d-93f2-879c5e95cf1d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the post to comment on (UUID)", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "requestBody": { "description": "Comment creation details. `message` is required; `attachments` is optional.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentCreateRequest" }, "examples": { "textComment": { "summary": "Plain text comment", "value": { "message": "Great analysis \u2014 I've been watching $TSLA closely too." } }, "commentWithAttachment": { "summary": "Comment with an image attachment", "value": { "message": "Check out this chart I made!", "attachments": [ { "url": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg", "mediaType": "Image" } ] } } } } } }, "responses": { "201": { "description": "Comment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "Authentication required" }, "404": { "description": "Parent post not found" }, "422": { "description": "Validation failed \u2014 missing message body or spam classification rejected the content" } }, "operationId": "createACommentOnAPost" }, "get": { "tags": [ "Comments and Replies" ], "summary": "List comments on a post", "description": "Returns a paginated list of top-level comments on a post. Soft-deleted comments are included with isDeleted=true and blanked content so reply trees remain navigable. Authentication is optional \u2014 unauthenticated requests omit requesterContext.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2f88fea0-f7af-4f63-9ce8-edb4ffef7a42" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "take", "in": "query", "description": "Number of items to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offsetEntityId", "in": "query", "description": "Opaque cursor from previous response for stable paging", "schema": { "type": "string" }, "example": "b2c3d4e5-f6a7-4890-bcde-f23456789012" }, { "name": "order", "in": "query", "description": "Sort order", "schema": { "type": "string", "enum": [ "Asc", "Desc" ], "default": "Desc" }, "example": "Desc" }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Paginated comment list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentsResponse" } } } }, "404": { "description": "Post not found" } }, "operationId": "listCommentsOnAPost" } }, "/api/v1/posts/{postId}/comments/{commentId}": { "put": { "tags": [ "Comments and Replies" ], "summary": "Update a comment", "description": "Edits the authenticated user's own comment in-place. Sets editStatus to Edited. Emotion counts, repliesCount, and created are preserved. Owner is derived from the auth token.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "f77ef9ed-152e-4386-9bb9-a98ae8d7a612" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true } ], "requestBody": { "description": "Updated comment content", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentUpdateRequest" } } } }, "responses": { "200": { "description": "Updated comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the comment owner" }, "404": { "description": "Post or comment not found" }, "422": { "description": "Validation failed \u2014 missing message body or spam classification rejected the content" } }, "operationId": "updateAComment" }, "delete": { "tags": [ "Comments and Replies" ], "summary": "Soft-delete a comment", "description": "Soft-deletes the authenticated user's own comment. Sets isDeleted=true and blanks message text and attachments. Replies are preserved and the parent post's totalCommentsAndReplies is decremented only by the deleted node.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "643b333f-b00f-43a2-a033-8d6a36f824ea" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true } ], "responses": { "204": { "description": "Comment deleted successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the comment owner" }, "404": { "description": "Post or comment not found" } }, "operationId": "softDeleteAComment" } }, "/api/v1/posts/{postId}/comments/{commentId}/likes": { "post": { "tags": [ "Likes" ], "summary": "Like a comment", "description": "Toggles a Like emotion on the specified comment for the authenticated user. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 liking an already-liked entity succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "09ad2dc4-f8d2-453c-a6c8-17ab8b76fbb4" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "commentId", "in": "path", "required": true, "description": "ID of the parent comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" } ], "responses": { "204": { "description": "Like recorded successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Empty JSON object. The body must be present but contains no fields." }, "example": {} } } }, "operationId": "likeAComment" }, "delete": { "tags": [ "Likes" ], "summary": "Unlike a comment", "description": "Removes the authenticated user's Like from the specified comment. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 unliking an entity with no active like succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "0b91a711-d509-41cc-ad26-b5166f08e48a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "commentId", "in": "path", "required": true, "description": "ID of the parent comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" } ], "responses": { "204": { "description": "Like removed successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "operationId": "unlikeAComment" } }, "/api/v1/posts/{postId}/comments/{commentId}/replies": { "get": { "tags": [ "Comments and Replies" ], "summary": "List replies on a comment", "description": "Returns a paginated list of replies nested under a specific comment. Authentication is optional.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "967bd734-c758-446a-a447-d88ae65f4346" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true }, { "name": "take", "in": "query", "description": "Number of items to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offsetEntityId", "in": "query", "description": "Opaque cursor from previous response for stable paging", "schema": { "type": "string" }, "example": "b2c3d4e5-f6a7-4890-bcde-f23456789012" }, { "name": "order", "in": "query", "description": "Sort order", "schema": { "type": "string", "enum": [ "Asc", "Desc" ], "default": "Desc" }, "example": "Desc" }, { "name": "badgesExperimentIsEnabled", "in": "query", "description": "Include user badges in the response", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Paginated reply list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentsResponse" } } } }, "404": { "description": "Post or comment not found" } }, "operationId": "listRepliesOnAComment" }, "post": { "tags": [ "Comments and Replies" ], "summary": "Create a reply", "description": "Creates a reply nested under an existing comment. Replies are 1-level deep \u2014 replying to a reply attaches to the same parent comment with an inline @mention to the reply author. Increments parent comment's repliesCount and the post's totalCommentsAndReplies.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "4de03db6-51fa-4ce3-a54f-50f846eed5ea" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true } ], "requestBody": { "description": "Reply content. `message` is required; `attachments` is optional.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentCreateRequest" }, "examples": { "textReply": { "summary": "Plain text reply", "value": { "message": "Totally agree \u2014 and the latest earnings back this up." } }, "replyWithAttachment": { "summary": "Reply with an image attachment", "value": { "message": "Here's the chart I was talking about!", "attachments": [ { "url": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg", "mediaType": "Image" } ] } } } } } }, "responses": { "201": { "description": "Reply created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "Authentication required" }, "404": { "description": "Post or comment not found" }, "422": { "description": "Validation failed \u2014 missing message body or spam classification rejected the content" } }, "operationId": "createAReply" } }, "/api/v1/posts/{postId}/comments/{commentId}/replies/{replyId}": { "put": { "tags": [ "Comments and Replies" ], "summary": "Update a reply", "description": "Edits the authenticated user's own reply in-place. Same semantics as updating a comment.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8d810c19-fec7-4461-9774-fb038729fee6" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true }, { "name": "replyId", "in": "path", "description": "ID of the reply (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "required": true } ], "requestBody": { "description": "Updated reply content", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentUpdateRequest" } } } }, "responses": { "200": { "description": "Updated reply", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the reply owner" }, "404": { "description": "Post, comment, or reply not found" }, "422": { "description": "Validation failed \u2014 missing message body or spam classification rejected the content" } }, "operationId": "updateAReply" }, "delete": { "tags": [ "Comments and Replies" ], "summary": "Soft-delete a reply", "description": "Soft-deletes the authenticated user's own reply.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a03cae57-ccf4-4635-b909-de9e7921e2c5" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "required": true }, { "name": "commentId", "in": "path", "description": "ID of the comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "required": true }, { "name": "replyId", "in": "path", "description": "ID of the reply (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "required": true } ], "responses": { "204": { "description": "Reply deleted successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not the reply owner" }, "404": { "description": "Post, comment, or reply not found" } }, "operationId": "softDeleteAReply" } }, "/api/v1/posts/{postId}/comments/{commentId}/replies/{replyId}/likes": { "post": { "tags": [ "Likes" ], "summary": "Like a reply", "description": "Toggles a Like emotion on the specified reply for the authenticated user. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 liking an already-liked entity succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c9b9ced8-22e4-474c-a649-f0d6c958a325" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "commentId", "in": "path", "required": true, "description": "ID of the parent comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }, { "name": "replyId", "in": "path", "required": true, "description": "ID of the reply (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } ], "responses": { "204": { "description": "Like recorded successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Empty JSON object. The body must be present but contains no fields." }, "example": {} } } }, "operationId": "likeAReply" }, "delete": { "tags": [ "Likes" ], "summary": "Unlike a reply", "description": "Removes the authenticated user's Like from the specified reply. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 unliking an entity with no active like succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "672169f8-97ab-464f-8597-ba511d07ac17" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "commentId", "in": "path", "required": true, "description": "ID of the parent comment (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }, { "name": "replyId", "in": "path", "required": true, "description": "ID of the reply (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } ], "responses": { "204": { "description": "Like removed successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "operationId": "unlikeAReply" } }, "/api/v1/posts/{postId}/follows": { "post": { "tags": [ "Posts" ], "summary": "Follow a post", "description": "Subscribes the authenticated user to push notifications when the post receives new comments or replies. Drives requesterContext.isFollowing on subsequent reads. Idempotent \u2014 following an already-followed post succeeds silently. This endpoint takes no request body.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8c323824-8cb8-4a46-9678-fdf120c4041b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to follow (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post followed successfully" }, "401": { "description": "Authentication required" }, "404": { "description": "Post not found" } }, "operationId": "followAPost" }, "delete": { "tags": [ "Posts" ], "summary": "Unfollow a post", "description": "Unsubscribes the authenticated user from notifications on this post. Idempotent \u2014 unfollowing a post that was never followed succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "416f6c1d-ec6e-49de-95e2-b3a3f6d97931" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to unfollow (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post unfollowed successfully" }, "401": { "description": "Authentication required" }, "404": { "description": "Post not found" } }, "operationId": "unfollowAPost" } }, "/api/v1/posts/{postId}/likes": { "post": { "tags": [ "Likes" ], "summary": "Like a post", "description": "Toggles a Like emotion on the specified post for the authenticated user. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 liking an already-liked entity succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "6e70f225-5dcb-4cd5-bb7c-657d13f2ce0b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Like recorded successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Empty JSON object. The body must be present but contains no fields." }, "example": {} } } }, "operationId": "likeAPost" }, "delete": { "tags": [ "Likes" ], "summary": "Unlike a post", "description": "Removes the authenticated user's Like from the specified post. emotionType defaults to Like (the only supported emotion type). The call is idempotent \u2014 unliking an entity with no active like succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "27de3b40-3eac-46db-8659-59f295173ecf" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the parent post (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Like removed successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is blocked by the entity owner or unable to interact" }, "404": { "description": "Entity not found" } }, "operationId": "unlikeAPost" } }, "/api/v1/posts/{postId}/pins": { "post": { "tags": [ "Posts" ], "summary": "Pin a post to the user's profile", "description": "Pins the specified post to the authenticated user's profile so it appears at the top of their feed. Users can pin only their own posts. The call is idempotent \u2014 pinning an already-pinned post succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "884c9142-5d07-4d52-8cad-1987df6cc40b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to pin (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post pinned successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not allowed to pin the specified post (e.g., not the post owner)" }, "404": { "description": "Post not found" } }, "operationId": "pinPostUserSProfile" }, "delete": { "tags": [ "Posts" ], "summary": "Unpin a post from the user's profile", "description": "Removes the authenticated user's pin from the specified post. The call is idempotent \u2014 unpinning a post that is not currently pinned succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8ab4fe00-2b4a-4448-83cc-b9a043ee46f7" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to unpin (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post unpinned successfully" }, "401": { "description": "Authentication required" }, "403": { "description": "Requester is not allowed to unpin the specified post" }, "404": { "description": "Post not found" } }, "operationId": "unpinPostUserSProfile" } }, "/api/v1/posts/{postId}/polls/{pollId}/options/{optionId}/votes": { "post": { "tags": [ "Posts" ], "summary": "Vote on a poll option", "description": "Casts the authenticated user's vote on a specific poll option. Each user can vote only once per poll. Poll owners cannot vote on their own poll.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ead15c94-1028-43ec-aafa-4c5463f10fe5" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post containing the poll (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "pollId", "in": "path", "required": true, "description": "ID of the poll", "schema": { "type": "integer" }, "example": 42 }, { "name": "optionId", "in": "path", "required": true, "description": "ID of the option to vote for", "schema": { "type": "integer" }, "example": 1 }, { "name": "client_request_id", "in": "query", "required": true, "description": "Client-generated correlation ID (UUID). Required for request tracing and idempotency.", "schema": { "type": "string", "format": "uuid" }, "example": "6a7aa746-d94d-4c4f-a755-32827ea53141" } ], "responses": { "202": { "description": "Vote accepted" }, "401": { "description": "Authentication required" }, "404": { "description": "Post, poll, or option not found" }, "422": { "description": "Poll is not part of the specified post" } }, "operationId": "voteOnAPollOption" }, "delete": { "tags": [ "Posts" ], "summary": "Remove a vote from a poll option", "description": "Removes the authenticated user's vote from a specific poll option.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "3d00f370-1781-432d-8075-c9d96c5baca8" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post containing the poll (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "pollId", "in": "path", "required": true, "description": "ID of the poll", "schema": { "type": "integer" }, "example": 42 }, { "name": "optionId", "in": "path", "required": true, "description": "ID of the option to unvote", "schema": { "type": "integer" }, "example": 1 }, { "name": "client_request_id", "in": "query", "required": true, "description": "Client-generated correlation ID (UUID). Required for request tracing and idempotency.", "schema": { "type": "string", "format": "uuid" }, "example": "6a7aa746-d94d-4c4f-a755-32827ea53141" } ], "responses": { "202": { "description": "Unvote accepted" }, "401": { "description": "Authentication required" }, "404": { "description": "Post, poll, or option not found" }, "422": { "description": "Poll is not part of the specified post" } }, "operationId": "removeVotePollOption" } }, "/api/v1/posts/{postId}/saves": { "post": { "tags": [ "Posts" ], "summary": "Save a post", "description": "Bookmarks a post for the authenticated user. Idempotent \u2014 saving an already-saved post succeeds silently. The save is private and visible only to the saving user. This endpoint takes no request body.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "bb0966f0-4e46-454e-9048-38f04b90ad42" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to save (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post saved successfully" }, "401": { "description": "Authentication required" }, "404": { "description": "Post not found" } }, "operationId": "saveAPost" }, "delete": { "tags": [ "Posts" ], "summary": "Unsave a post", "description": "Removes a post from the authenticated user's saved bookmarks. Idempotent \u2014 unsaving a post that was never saved succeeds silently.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "69962b64-4570-4f97-bf18-54aacc33d036" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to unsave (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Post unsaved successfully" }, "401": { "description": "Authentication required" }, "404": { "description": "Post not found" } }, "operationId": "unsaveAPost" } }, "/api/v1/posts/{postId}/shares": { "get": { "tags": [ "Posts" ], "summary": "List shares of a post", "description": "Returns a paginated list of shares of the specified post, including both plain reshares and quote shares. Authentication is optional.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "671cbf93-9d82-4172-bd6d-a63fe408e3d1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "required": true, "description": "ID of the post to list shares of (UUID)", "schema": { "type": "string", "format": "uuid" }, "example": "d9020c00-c364-11ee-8080-80005148990b" }, { "name": "take", "in": "query", "description": "Number of items to return (1\u2013100, default 20)", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 }, "example": 20 }, { "name": "offsetEntityId", "in": "query", "description": "Opaque cursor from a previous response for stable paging", "schema": { "type": "string" }, "example": "c3d4e5f6-a7b8-4901-cdef-345678901234" }, { "name": "order", "in": "query", "description": "Sort order", "schema": { "type": "string", "enum": [ "Asc", "Desc" ], "default": "Desc" }, "example": "Desc" }, { "name": "client_request_id", "in": "query", "required": true, "description": "Client-generated correlation ID (UUID). Required for request tracing and idempotency.", "schema": { "type": "string", "format": "uuid" }, "example": "2b6361e3-079c-42a1-b6d5-4b9c16601ae1" } ], "responses": { "200": { "description": "Paginated list of shares", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SharesResponse" } } } }, "404": { "description": "Post not found" } }, "operationId": "listSharesOfAPost" } }, "/api/v1/price-alerts": { "get": { "tags": [ "Price Alerts" ], "summary": "Get price alerts", "description": "Returns all active price alerts for the authenticated user.", "responses": { "200": { "description": "Successfully retrieved price alerts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertCollectionResponse" }, "example": { "results": [ { "alertId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "instrumentId": 1001, "symbol": "AAPL", "targetPrice": 185.5, "currentPrice": 182.3, "createdAt": "2026-04-20T10:00:00Z", "updatedAt": "2026-04-25T14:30:00Z" }, { "alertId": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "instrumentId": 1002, "symbol": "TSLA", "targetPrice": 250.0, "currentPrice": 265.1, "createdAt": "2026-04-22T08:15:00Z", "updatedAt": "2026-04-22T08:15:00Z" } ] } } } }, "401": { "description": "Unauthorized - missing or invalid authentication credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - insufficient permissions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "InsufficientPermissions", "errorMessage": "Insufficient permissions to access this resource" } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "818633f4-c4de-46d0-a3e6-a2f083c17659" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "getPriceAlerts" }, "post": { "tags": [ "Price Alerts" ], "summary": "Create a price alert", "description": "Creates a new price alert for the authenticated user. The alert will fire when the market bid price reaches the target price. Provide a symbol to identify the instrument.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePriceAlertRequest" }, "example": { "symbol": "AAPL", "targetPrice": 185.5 } } } }, "responses": { "201": { "description": "Price alert created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertMutationResponse" }, "example": { "success": true, "data": { "alertId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "instrumentId": 1001, "symbol": "AAPL", "targetPrice": 185.5, "currentPrice": 182.3, "createdAt": "2026-04-30T10:00:00Z", "updatedAt": "2026-04-30T10:00:00Z" } } } } }, "400": { "description": "Invalid request parameters (e.g. missing symbol, invalid targetPrice)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "INVALID_PARAMETER", "message": "Invalid request parameters", "details": "Field 'targetPrice' must be greater than 0", "field": "targetPrice" } } } } }, "401": { "description": "Unauthorized - missing or invalid authentication credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - insufficient permissions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "InsufficientPermissions", "errorMessage": "Insufficient permissions to access this resource" } } } }, "404": { "description": "Instrument not found for the provided symbol", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "INSTRUMENT_NOT_FOUND", "message": "Instrument not found", "details": "No instrument found for symbol 'INVALID'" } } } } }, "422": { "description": "Business rule violation (e.g. duplicate alert, max alerts exceeded)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "MAX_ALERTS_EXCEEDED", "message": "Maximum number of alerts reached", "details": "You have reached the maximum number of active price alerts" } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "92d52d35-6930-4674-8ae4-24dd4d61c308" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "createAPriceAlert" } }, "/api/v1/price-alerts/{alertId}": { "patch": { "tags": [ "Price Alerts" ], "summary": "Update a price alert", "description": "Updates the target price of an existing price alert.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "40dfcdec-7eb4-4320-ace0-ae992727e33a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "alertId", "in": "path", "required": true, "description": "Unique identifier of the price alert", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePriceAlertRequest" }, "example": { "targetPrice": 190.0 } } } }, "responses": { "200": { "description": "Price alert updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertMutationResponse" }, "example": { "success": true, "data": { "alertId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "instrumentId": 1001, "symbol": "AAPL", "targetPrice": 190.0, "currentPrice": 182.3, "createdAt": "2026-04-20T10:00:00Z", "updatedAt": "2026-04-30T11:00:00Z" } } } } }, "400": { "description": "Invalid request parameters (e.g. invalid alertId format, missing targetPrice)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "INVALID_PARAMETER", "message": "Invalid request parameters", "details": "Field 'targetPrice' must be greater than 0", "field": "targetPrice" } } } } }, "401": { "description": "Unauthorized - missing or invalid authentication credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - insufficient permissions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "InsufficientPermissions", "errorMessage": "Insufficient permissions to access this resource" } } } }, "404": { "description": "Price alert not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "ALERT_NOT_FOUND", "message": "Price alert not found", "details": "No price alert found with the specified ID" } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "operationId": "updateAPriceAlert" }, "delete": { "tags": [ "Price Alerts" ], "summary": "Delete a price alert", "description": "Permanently deletes a price alert owned by the authenticated user.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "0b55b20a-a7d5-49f1-bd03-cdf552602a93" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "alertId", "in": "path", "required": true, "description": "Unique identifier of the price alert to delete", "schema": { "type": "string", "format": "uuid" }, "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } ], "responses": { "200": { "description": "Price alert deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletePriceAlertResponse" }, "example": { "success": true, "data": { "alertId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } } } } }, "401": { "description": "Unauthorized - missing or invalid authentication credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "403": { "description": "Forbidden - insufficient permissions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "InsufficientPermissions", "errorMessage": "Insufficient permissions to access this resource" } } } }, "404": { "description": "Price alert not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceAlertErrorResponse" }, "example": { "success": false, "error": { "code": "ALERT_NOT_FOUND", "message": "Price alert not found", "details": "No price alert found with the specified ID" } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "operationId": "deleteAPriceAlert" } }, "/api/v1/reactions/{postId}/comment": { "post": { "tags": [ "Comments" ], "summary": "Create a comment on a post", "description": "Creates a new comment on a specific discussion post. Comments can include text, mentions, tags, and attachments.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c8c54f0a-3535-4a31-bed5-7f025f527d17" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "postId", "in": "path", "description": "ID of the post to comment on", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "requestBody": { "description": "Comment creation details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentCreateRequest" } } } }, "responses": { "201": { "description": "Comment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } } }, "operationId": "createACommentOnAPost2" } }, "/api/v1/trading/execution/demo/market-close-orders/positions/{positionId}": { "post": { "tags": [ "Trading Demo" ], "summary": "Creates a market order to close a position or partially close it by specifying the number of units to deduct.", "description": "This endpoint allows traders to close an entire position or a portion of it at the current market rate. If `UnitsToDeduct` is provided, only the specified portion will be closed. If `UnitsToDeduct` is omitted or set to null, the full position will be closed.", "operationId": "closePositionByMarketRateDemo", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "784da828-02c9-4106-b153-e3399fc57afd" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "positionId", "in": "path", "description": "The unique identifier of the position to close.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The ID of the financial instrument associated with the position." }, "UnitsToDeduct": { "type": "number", "format": "double", "nullable": true, "description": "The number of units to close. If omitted or null, the entire position will be closed." } }, "required": [ "InstrumentID" ] } } } }, "responses": { "200": { "description": "Successfully closed a position or a part of it.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForClose": { "type": "object", "properties": { "positionID": { "type": "integer", "description": "The ID of the closed position." }, "instrumentID": { "type": "integer", "description": "The ID of the instrument traded." }, "unitsToDeduct": { "type": "number", "format": "double", "description": "The number of units closed in this order." }, "orderID": { "type": "integer", "description": "The unique identifier of the closing order." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the closing order." }, "CID": { "type": "integer", "description": "Customer Account ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was placed." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The timestamp of the last update to this order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the closing order." } } }, "example": { "orderForClose": { "positionID": 2150941015, "instrumentID": 1111, "unitsToDeduct": 2, "orderID": 13904638, "orderType": 19, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T16:07:54.0880338Z", "lastUpdate": "2025-04-02T16:07:54.0880338Z" }, "token": "5fe065bc-f6f9-4897-a2ce-c4fccef73ff8" } } } } } } }, "/api/v1/trading/execution/demo/market-close-orders/{orderId}": { "delete": { "tags": [ "Trading Demo" ], "summary": "Cancels a pending market order for close for the specified order ID.", "description": "This endpoint allows traders to cancel a previously placed market order for close before execution. If the order has already been processed, cancellation will not be possible.", "operationId": "cancelCloseOrderDemo", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b7c0215d-9133-4bad-bf1b-3ba63343773b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the market order for close to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the market order for close. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "7f1da128-f516-4710-8474-915566c4b22e" } } } } } } }, "/api/v1/trading/execution/market-close-orders/positions/{positionId}": { "post": { "tags": [ "Trading Real" ], "summary": "Creates a market order to close a position or partially close it by specifying the number of units to deduct.", "description": "This endpoint allows traders to close an entire position or a portion of it at the current market rate. If `UnitsToDeduct` is provided, only the specified portion will be closed. If `UnitsToDeduct` is omitted or set to null, the full position will be closed.", "operationId": "closePositionByMarketRate", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "23d44159-76e2-45b8-abc7-451d1e4ca8ea" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "positionId", "in": "path", "description": "The unique identifier of the position to close.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentId": { "type": "integer", "format": "int32", "description": "The ID of the financial instrument associated with the position." }, "UnitsToDeduct": { "type": "number", "format": "double", "nullable": true, "description": "The number of units to close. If omitted or null, the entire position will be closed." } }, "required": [ "InstrumentId" ] } } } }, "responses": { "200": { "description": "Successfully closed a position or a part of it.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForClose": { "type": "object", "properties": { "positionID": { "type": "integer", "description": "The ID of the closed position." }, "instrumentID": { "type": "integer", "description": "The ID of the instrument traded." }, "unitsToDeduct": { "type": "number", "format": "double", "description": "The number of units closed in this order." }, "orderID": { "type": "integer", "description": "The unique identifier of the closing order." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the closing order." }, "CID": { "type": "integer", "description": "Customer Account ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was placed." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The timestamp of the last update to this order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the closing order." } } }, "example": { "orderForClose": { "positionID": 2150941015, "instrumentID": 1111, "unitsToDeduct": 2, "orderID": 13904638, "orderType": 19, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T16:07:54.0880338Z", "lastUpdate": "2025-04-02T16:07:54.0880338Z" }, "token": "5fe065bc-f6f9-4897-a2ce-c4fccef73ff8" } } } } } } }, "/api/v1/trading/execution/market-close-orders/{orderId}": { "delete": { "tags": [ "Trading Real" ], "summary": "Cancels a pending market order for close for the specified order ID.", "description": "This endpoint allows traders to cancel a previously placed market order for close before execution. If the order has already been processed, cancellation will not be possible.", "operationId": "cancelCloseOrder", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "2d1cf916-8d85-4657-b6bb-61fe60102f9a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the market order for close to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the market order for close. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "7f1da128-f516-4710-8474-915566c4b22e" } } } } } } }, "/api/v1/trading/info/aggregate-portfolio": { "get": { "tags": [ "Trading Real" ], "summary": "Get aggregated portfolio snapshot \u2014 account totals, positions aggregated by instrument, and copy trading", "description": "Returns a complete snapshot of the authenticated user's investment portfolio, organized by asset. The response includes account-level balances and equity, individually held positions grouped by asset, and any copy-trading relationships the user has active. Use the instrumentIds filter to scope results to a specific set of assets, or mirrorIds to isolate specific copy-trading relationships. Account totals always reflect the full portfolio regardless of filters applied.", "operationId": "getAggregatedPortfolio", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9bbc76ea-49b5-41ac-b271-fe1a091822e2" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "conversionMode", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "eToroApp", "Realtime" ], "default": "eToroApp" }, "description": "Determines which conversion to use for non-USD assets when the market is closed. 'Realtime' uses the realtime conversion rate. 'eToroApp' uses the last conversion rate at market close time. Default is 'eToroApp'." }, { "name": "instrumentIds", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } }, "description": "Scope the response to a specific list of assets by their eToro instrument ID. When omitted, all held assets are returned. Does not affect account-level totals." }, { "name": "mirrorIds", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } }, "description": "Scope copy-trading data to specific relationships by their mirror ID. A mirrorId of 0 refers to positions held directly (not via copy trading). When omitted, all copy-trading relationships are included." } ], "responses": { "200": { "description": "Successfully retrieved aggregated portfolio data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AggregatedPortfolioResponse" }, "example": { "cid": 4498, "timestamp": "2026-05-26T15:24:25.267Z", "accountCurrency": "USD", "accountTotals": { "accountAvailableCash": 4320.84, "accountFrozenCash": 0, "accountCurrentPnl": -300.35, "accountTotalValue": 5154.48, "accountTotalUsedMargin": 1133.99, "accountBalance": 4320.84 }, "instrumentAggregates": [ { "instrumentId": 100000, "assetCurrency": "USD", "totalMarginAccountCurrency": 849.86, "totalFees": 0, "totalFeesAcctCcy": 0, "totalTaxes": 0, "totalTaxesAcctCcy": 0, "totalMarginAssetCurrency": 849.86, "pnlAssetCurrency": -225.3, "accountCurrencyRoePercent": -26.51, "netContracts": 0.008076, "netUnits": 0.008076, "netCurrentExposureAssetCurrency": 624.57, "netCurrentExposureAccountCurrency": 624.57, "netInitialExposureAccountCurrency": 849.87, "accountCurrencyReturn": -225.3, "liquidationValueAccountCurrency": 624.56, "liquidationValueAssetCurrency": 624.56, "avgLeverage": 1, "avgOpenRate": 105233.5041183754, "netAvgOpenRate": 105233.5041183754, "avgConversionRate": 1 } ], "mirrors": [ { "mirrorId": 1869651, "mirrorAvailableCash": 0.04, "mirrorDepositTotal": 290, "mirrorWithdrawalTotal": 0, "mirrorStopLossPercentage": 5, "mirrorStopLoss": 14.5, "mirrorClosedPositionsPnl": -0.26, "mirrorTotals": { "mirrorNetFunding": 290, "mirrorPositionsPnl": -75.05, "mirrorLiquidationValue": 209.08, "mirrorPositionsPnlPercent": -0.35, "mirrorMarginPercent": 25.06, "mirrorValuePercent": 4.06, "mirrorActiveMargin": 284.13 }, "instrumentAggregates": [] } ] } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "User not found" } } } }, "/api/v1/trading/info/demo/aggregate-portfolio": { "get": { "tags": [ "Trading Demo" ], "summary": "Get demo account aggregated portfolio snapshot \u2014 account totals, positions aggregated by instrument, and copy trading", "description": "Returns a complete snapshot of the authenticated user's demo account investment portfolio, organized by asset. The response includes account-level balances and equity, individually held positions grouped by asset, and any copy-trading relationships the user has active. Use the instrumentIds filter to scope results to a specific set of assets, or mirrorIds to isolate specific copy-trading relationships. Account totals always reflect the full portfolio regardless of filters applied.", "operationId": "getAggregatedPortfolioDemo", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "925c2023-ea2f-4d7a-8758-d1943e8680ac" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "conversionMode", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "eToroApp", "Realtime" ], "default": "eToroApp" }, "description": "Determines which conversion to use for non-USD assets when the market is closed. 'Realtime' uses the realtime conversion rate. 'eToroApp' uses the last conversion rate at market close time. Default is 'eToroApp'." }, { "name": "instrumentIds", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } }, "description": "Scope the response to a specific list of assets by their eToro instrument ID. When omitted, all held assets are returned. Does not affect account-level totals." }, { "name": "mirrorIds", "in": "query", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" } }, "description": "Scope copy-trading data to specific relationships by their mirror ID. A mirrorId of 0 refers to positions held directly (not via copy trading). When omitted, all copy-trading relationships are included." } ], "responses": { "200": { "description": "Successfully retrieved aggregated portfolio data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AggregatedPortfolioResponse" }, "example": { "cid": 4498, "timestamp": "2026-05-26T15:24:25.267Z", "accountCurrency": "USD", "accountTotals": { "accountAvailableCash": 4320.84, "accountFrozenCash": 0, "accountCurrentPnl": -300.35, "accountTotalValue": 5154.48, "accountTotalUsedMargin": 1133.99, "accountBalance": 4320.84 }, "instrumentAggregates": [ { "instrumentId": 100000, "assetCurrency": "USD", "totalMarginAccountCurrency": 849.86, "totalFees": 0, "totalFeesAcctCcy": 0, "totalTaxes": 0, "totalTaxesAcctCcy": 0, "totalMarginAssetCurrency": 849.86, "pnlAssetCurrency": -225.3, "accountCurrencyRoePercent": -26.51, "netContracts": 0.008076, "netUnits": 0.008076, "netCurrentExposureAssetCurrency": 624.57, "netCurrentExposureAccountCurrency": 624.57, "netInitialExposureAccountCurrency": 849.87, "accountCurrencyReturn": -225.3, "liquidationValueAccountCurrency": 624.56, "liquidationValueAssetCurrency": 624.56, "avgLeverage": 1, "avgOpenRate": 105233.5041183754, "netAvgOpenRate": 105233.5041183754, "avgConversionRate": 1 } ], "mirrors": [ { "mirrorId": 1869651, "mirrorAvailableCash": 0.04, "mirrorDepositTotal": 290, "mirrorWithdrawalTotal": 0, "mirrorStopLossPercentage": 5, "mirrorStopLoss": 14.5, "mirrorClosedPositionsPnl": -0.26, "mirrorTotals": { "mirrorNetFunding": 290, "mirrorPositionsPnl": -75.05, "mirrorLiquidationValue": 209.08, "mirrorPositionsPnlPercent": -0.35, "mirrorMarginPercent": 25.06, "mirrorValuePercent": 4.06, "mirrorActiveMargin": 284.13 }, "instrumentAggregates": [] } ] } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "User not found" } } } }, "/api/v1/trading/info/demo/pnl": { "get": { "tags": [ "Trading Demo" ], "summary": "Get Demo Account PnL and Portfolio Details", "description": "Retrieves the demo account's current portfolio, including credit, open positions, orders, mirrors, and PnL details.", "operationId": "getDemoAccountPnl", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Successfully retrieved demo account PnL and portfolio information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResponseWithPnl" }, "example": { "clientPortfolio": { "credit": 10000.5, "unrealizedPnL": 251.0, "mirrors": [ { "mirrorId": 1, "cid": 123, "parentCid": 456, "stopLossPercentage": 15.5, "isPaused": false, "copyExistingPositions": true, "availableAmount": 5000.0, "stopLossAmount": 750.0, "initialInvestment": 10000.0, "depositSummary": 12000.0, "withdrawalSummary": 2000.0, "positions": [ { "positionId": 9002, "cid": 124, "openDateTime": "2024-01-02T09:00:00Z", "openRate": 1.2346, "instrumentId": 102, "isBuy": false, "takeProfitRate": 1.6, "stopLossRate": 1.1, "mirrorId": 1, "parentPositionId": 8002, "amount": 2000.0, "leverage": 3, "orderId": 5002, "orderType": 2, "units": 20.5, "totalFees": 3.5, "initialAmountInDollars": 2000.0, "isTslEnabled": true, "stopLossVersion": 2, "isSettled": false, "redeemStatusId": 1, "initialUnits": 20.5, "isPartiallyAltered": true, "unitsBaseValueDollars": 2000.0, "isDiscounted": true, "openPositionActionType": 2, "settlementTypeId": 2, "isDetached": true, "openConversionRate": 1.2, "pnlVersion": 2, "totalExternalFees": 1.0, "totalExternalTaxes": 0.5, "isNoTakeProfit": true, "isNoStopLoss": false, "lotCount": 2.0, "externalOperation": null, "pnL": 150.75, "closeRate": 1.3, "closeConversionRate": 1.15, "timestamp": "2024-01-02T12:00:00Z" } ], "parentUsername": "parent_user", "closedPositionsNetProfit": 350.75, "startedCopyDate": "2024-01-01T09:00:00Z", "pendingForClosure": false, "parentMirrors": [], "mirrorCalculationType": 2, "ordersForOpen": [ { "orderId": 1001, "orderType": 1, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "amount": 1000.0, "amountInUnits": 10.5, "isBuy": true, "leverage": 2, "stopLossRate": 1.2345, "takeProfitRate": 1.3456, "isTslEnabled": false, "isDiscounted": true, "mirrorId": 1, "frozenAmount": 0.0, "totalExternalCosts": 5.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "openPositionActionType": 1, "externalOperation": null } ], "ordersForClose": [ { "orderId": 2001, "orderType": 2, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 5.0, "lotsToDeduct": 0.5, "positionId": 3001 } ], "ordersForCloseMultiple": [ { "orderId": 3001, "orderType": 3, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 10.0, "lotsToDeduct": 1.0, "pendingClosePositionIds": [ 3001, 3002 ] } ], "mirrorStatusId": 1 } ], "orders": [ { "orderId": 5001, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "instrumentId": 101, "isBuy": true, "takeProfitRate": 1.5, "stopLossRate": 1.2, "rate": 1.3, "amount": 1000.0, "leverage": 2, "units": 10.5, "isTslEnabled": false, "executionType": 1, "isDiscounted": false, "isNoTakeProfit": false, "isNoStopLoss": false } ], "ordersForOpen": [ { "orderId": 1001, "orderType": 1, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "amount": 1000.0, "amountInUnits": 10.5, "isBuy": true, "leverage": 2, "stopLossRate": 1.2345, "takeProfitRate": 1.3456, "isTslEnabled": false, "isDiscounted": true, "mirrorId": 1, "frozenAmount": 0.0, "totalExternalCosts": 5.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "openPositionActionType": 1, "externalOperation": null } ], "ordersForClose": [ { "orderId": 2001, "orderType": 2, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 5.0, "lotsToDeduct": 0.5, "positionId": 3001 } ], "ordersForCloseMultiple": [ { "orderId": 3001, "orderType": 3, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 10.0, "lotsToDeduct": 1.0, "pendingClosePositionIds": [ 3001, 3002 ] } ], "bonusCredit": 500.0, "positions": [ { "positionId": 9001, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "openRate": 1.2345, "instrumentId": 101, "isBuy": true, "takeProfitRate": 1.5, "stopLossRate": 1.2, "mirrorId": 1, "parentPositionId": 8001, "amount": 1000.0, "leverage": 2, "orderId": 5001, "orderType": 1, "units": 10.5, "totalFees": 2.5, "initialAmountInDollars": 1000.0, "isTslEnabled": false, "stopLossVersion": 1, "isSettled": true, "redeemStatusId": 0, "initialUnits": 10.5, "isPartiallyAltered": false, "unitsBaseValueDollars": 1000.0, "isDiscounted": false, "openPositionActionType": 1, "settlementTypeId": 1, "isDetached": false, "openConversionRate": 1.0, "pnlVersion": 1, "totalExternalFees": 0.0, "totalExternalTaxes": 0.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "externalOperation": null, "pnL": 100.25, "closeRate": 1.25, "closeConversionRate": 1.1, "timestamp": "2024-01-01T12:00:00Z" } ] } } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ffb38953-3fcd-48b5-85b7-3029e49ec3b6" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/trading/info/demo/portfolio": { "get": { "tags": [ "Trading Demo" ], "summary": "Retrieve comprehensive portfolio information including positions, orders, and account status", "description": "Returns detailed portfolio information including active positions, pending orders, mirror trading details, and account balances. This endpoint provides a complete overview of the user's trading activity and current market exposure.", "operationId": "getPortfolioDemo", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Successfully retrieved portfolio information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResponse" }, "example": { "clientPortfolio": { "positions": [ { "positionID": 2150896073, "CID": 7765437, "openDateTime": "2024-08-01T07:44:26.103Z", "openRate": 2020.7784, "instrumentID": 1002, "isBuy": true, "takeProfitRate": 0, "stopLossRate": 0.0001, "mirrorID": 0, "parentPositionID": 0, "amount": 100, "leverage": 1, "orderID": 12402059, "orderType": 17, "units": 0.049485, "totalFees": 0, "initialAmountInDollars": 100, "isTslEnabled": false, "stopLossVersion": 3, "isSettled": true, "redeemStatusID": 0, "initialUnits": 0.049485, "isPartiallyAltered": false, "unitsBaseValueDollars": 100, "isDiscounted": true, "openPositionActionType": 0, "settlementTypeID": 1, "isDetached": false, "openConversionRate": 1, "pnlVersion": 1, "totalExternalFees": 0, "totalExternalTaxes": 0, "isNoTakeProfit": true, "isNoStopLoss": true, "lotCount": 0.049485 } ], "credit": 280.35, "mirrors": [ { "mirrorID": 1841334, "CID": 7765437, "parentCID": 14370798, "stopLossPercentage": 5, "isPaused": false, "copyExistingPositions": true, "availableAmount": 560, "stopLossAmount": 28, "initialInvestment": 560, "depositSummary": 0, "withdrawalSummary": 0, "positions": [], "entryOrders": [], "exitOrders": [], "parentUsername": "Deposit158990700", "closedPositionsNetProfit": 0, "startedCopyDate": "2024-05-23T13:31:57.007Z", "pendingForClosure": false, "parentMirrors": [], "mirrorCalculationType": 1, "ordersForOpen": [], "ordersForClose": [], "ordersForCloseMultiple": [], "delayedOrderForClose": [], "delayedOrderForOpen": [], "mirrorStatusId": 0 } ], "orders": [ { "orderID": 5669649, "CID": 7765437, "openDateTime": "2024-06-06T08:07:25.083Z", "instrumentID": 100043, "isBuy": true, "takeProfitRate": 0, "stopLossRate": 1e-05, "rate": 0.1453, "amount": 100, "leverage": 1, "units": 688.231246, "isTslEnabled": false, "executionType": 0, "isDiscounted": false } ], "stockOrders": [], "entryOrders": [], "exitOrders": [], "ordersForOpen": [], "ordersForClose": [], "ordersForCloseMultiple": [], "bonusCredit": 0 } } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "fb7212ec-5828-4bfe-8d6d-7106819b8d9e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/trading/info/portfolio": { "get": { "tags": [ "Trading Real" ], "summary": "Retrieve comprehensive portfolio information including positions, orders, and account status", "description": "Returns detailed portfolio information including active positions, pending orders, mirror trading details, and account balances. This endpoint provides a complete overview of the user's trading activity and current market exposure.", "operationId": "getPortfolio", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Successfully retrieved portfolio information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResponse" }, "example": { "clientPortfolio": { "positions": [ { "positionID": 2150896073, "CID": 7765437, "openDateTime": "2024-08-01T07:44:26.103Z", "openRate": 2020.7784, "instrumentID": 1002, "isBuy": true, "takeProfitRate": 0, "stopLossRate": 0.0001, "mirrorID": 0, "parentPositionID": 0, "amount": 100, "leverage": 1, "orderID": 12402059, "orderType": 17, "units": 0.049485, "totalFees": 0, "initialAmountInDollars": 100, "isTslEnabled": false, "stopLossVersion": 3, "isSettled": true, "redeemStatusID": 0, "initialUnits": 0.049485, "isPartiallyAltered": false, "unitsBaseValueDollars": 100, "isDiscounted": true, "openPositionActionType": 0, "settlementTypeID": 1, "isDetached": false, "openConversionRate": 1, "pnlVersion": 1, "totalExternalFees": 0, "totalExternalTaxes": 0, "isNoTakeProfit": true, "isNoStopLoss": true, "lotCount": 0.049485 } ], "credit": 280.35, "mirrors": [ { "mirrorID": 1841334, "CID": 7765437, "parentCID": 14370798, "stopLossPercentage": 5, "isPaused": false, "copyExistingPositions": true, "availableAmount": 560, "stopLossAmount": 28, "initialInvestment": 560, "depositSummary": 0, "withdrawalSummary": 0, "positions": [], "entryOrders": [], "exitOrders": [], "parentUsername": "Deposit158990700", "closedPositionsNetProfit": 0, "startedCopyDate": "2024-05-23T13:31:57.007Z", "pendingForClosure": false, "parentMirrors": [], "mirrorCalculationType": 1, "ordersForOpen": [], "ordersForClose": [], "ordersForCloseMultiple": [], "delayedOrderForClose": [], "delayedOrderForOpen": [], "mirrorStatusId": 0 } ], "orders": [ { "orderID": 5669649, "CID": 7765437, "openDateTime": "2024-06-06T08:07:25.083Z", "instrumentID": 100043, "isBuy": true, "takeProfitRate": 0, "stopLossRate": 1e-05, "rate": 0.1453, "amount": 100, "leverage": 1, "units": 688.231246, "isTslEnabled": false, "executionType": 0, "isDiscounted": false } ], "stockOrders": [], "entryOrders": [], "exitOrders": [], "ordersForOpen": [], "ordersForClose": [], "ordersForCloseMultiple": [], "bonusCredit": 0 } } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "411a35fa-50b9-44c2-a7a5-e1d34fd35bf9" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/trading/info/real/pnl": { "get": { "tags": [ "Trading Real" ], "summary": "Get Real Account PnL and Portfolio Details", "description": "Retrieves the real account's current portfolio, including credit, open positions, orders, mirrors, and PnL details.", "operationId": "getRealAccountPnl", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Successfully retrieved real account PnL and portfolio information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResponseWithPnl" }, "example": { "clientPortfolio": { "credit": 10000.5, "unrealizedPnL": 251.0, "mirrors": [ { "mirrorId": 1, "cid": 123, "parentCid": 456, "stopLossPercentage": 15.5, "isPaused": false, "copyExistingPositions": true, "availableAmount": 5000.0, "stopLossAmount": 750.0, "initialInvestment": 10000.0, "depositSummary": 12000.0, "withdrawalSummary": 2000.0, "positions": [ { "positionId": 9002, "cid": 124, "openDateTime": "2024-01-02T09:00:00Z", "openRate": 1.2346, "instrumentId": 102, "isBuy": false, "takeProfitRate": 1.6, "stopLossRate": 1.1, "mirrorId": 1, "parentPositionId": 8002, "amount": 2000.0, "leverage": 3, "orderId": 5002, "orderType": 2, "units": 20.5, "totalFees": 3.5, "initialAmountInDollars": 2000.0, "isTslEnabled": true, "stopLossVersion": 2, "isSettled": false, "redeemStatusId": 1, "initialUnits": 20.5, "isPartiallyAltered": true, "unitsBaseValueDollars": 2000.0, "isDiscounted": true, "openPositionActionType": 2, "settlementTypeId": 2, "isDetached": true, "openConversionRate": 1.2, "pnlVersion": 2, "totalExternalFees": 1.0, "totalExternalTaxes": 0.5, "isNoTakeProfit": true, "isNoStopLoss": false, "lotCount": 2.0, "externalOperation": null, "pnL": 150.75, "closeRate": 1.3, "closeConversionRate": 1.15, "timestamp": "2024-01-02T12:00:00Z" } ], "parentUsername": "parent_user", "closedPositionsNetProfit": 350.75, "startedCopyDate": "2024-01-01T09:00:00Z", "pendingForClosure": false, "parentMirrors": [], "mirrorCalculationType": 2, "ordersForOpen": [ { "orderId": 1001, "orderType": 1, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "amount": 1000.0, "amountInUnits": 10.5, "isBuy": true, "leverage": 2, "stopLossRate": 1.2345, "takeProfitRate": 1.3456, "isTslEnabled": false, "isDiscounted": true, "mirrorId": 1, "frozenAmount": 0.0, "totalExternalCosts": 5.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "openPositionActionType": 1, "externalOperation": null } ], "ordersForClose": [ { "orderId": 2001, "orderType": 2, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 5.0, "lotsToDeduct": 0.5, "positionId": 3001 } ], "ordersForCloseMultiple": [ { "orderId": 3001, "orderType": 3, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 10.0, "lotsToDeduct": 1.0, "pendingClosePositionIds": [ 3001, 3002 ] } ], "mirrorStatusId": 1 } ], "orders": [ { "orderId": 5001, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "instrumentId": 101, "isBuy": true, "takeProfitRate": 1.5, "stopLossRate": 1.2, "rate": 1.3, "amount": 1000.0, "leverage": 2, "units": 10.5, "isTslEnabled": false, "executionType": 1, "isDiscounted": false, "isNoTakeProfit": false, "isNoStopLoss": false } ], "ordersForOpen": [ { "orderId": 1001, "orderType": 1, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "amount": 1000.0, "amountInUnits": 10.5, "isBuy": true, "leverage": 2, "stopLossRate": 1.2345, "takeProfitRate": 1.3456, "isTslEnabled": false, "isDiscounted": true, "mirrorId": 1, "frozenAmount": 0.0, "totalExternalCosts": 5.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "openPositionActionType": 1, "externalOperation": null } ], "ordersForClose": [ { "orderId": 2001, "orderType": 2, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 5.0, "lotsToDeduct": 0.5, "positionId": 3001 } ], "ordersForCloseMultiple": [ { "orderId": 3001, "orderType": 3, "statusId": 1, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-02T10:00:00Z", "instrumentId": 101, "unitsToDeduct": 10.0, "lotsToDeduct": 1.0, "pendingClosePositionIds": [ 3001, 3002 ] } ], "bonusCredit": 500.0, "positions": [ { "positionId": 9001, "cid": 123, "openDateTime": "2024-01-01T09:00:00Z", "openRate": 1.2345, "instrumentId": 101, "isBuy": true, "takeProfitRate": 1.5, "stopLossRate": 1.2, "mirrorId": 1, "parentPositionId": 8001, "amount": 1000.0, "leverage": 2, "orderId": 5001, "orderType": 1, "units": 10.5, "totalFees": 2.5, "initialAmountInDollars": 1000.0, "isTslEnabled": false, "stopLossVersion": 1, "isSettled": true, "redeemStatusId": 0, "initialUnits": 10.5, "isPartiallyAltered": false, "unitsBaseValueDollars": 1000.0, "isDiscounted": false, "openPositionActionType": 1, "settlementTypeId": 1, "isDetached": false, "openConversionRate": 1.0, "pnlVersion": 1, "totalExternalFees": 0.0, "totalExternalTaxes": 0.0, "isNoTakeProfit": false, "isNoStopLoss": false, "lotCount": 1.0, "externalOperation": null, "pnL": 100.25, "closeRate": 1.25, "closeConversionRate": 1.1, "timestamp": "2024-01-01T12:00:00Z" } ] } } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c7b394a1-971b-4d59-9e54-44ab178a69a4" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v1/trading/info/trade/demo/history": { "get": { "tags": [ "Trading Demo" ], "summary": "List trading history", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "e2206b87-8c81-4dbf-be43-8cb3feb48c70" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "minDate", "description": "The start date of the period you would like to view.", "in": "query", "schema": { "type": "string", "format": "date" }, "required": true }, { "name": "page", "description": "The page number.", "in": "query", "schema": { "type": "integer" }, "required": false }, { "name": "pageSize", "description": "The amount of trades in each page.", "in": "query", "schema": { "type": "integer" }, "required": false } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "netProfit": { "type": "number", "format": "float", "description": "The net profit of the trade" }, "closeRate": { "type": "number", "format": "float", "description": "The closing rate of the trade" }, "closeTimestamp": { "type": "string", "format": "date-time", "description": "The closing timestamp of the trade" }, "positionId": { "type": "integer", "format": "int64", "description": "The position ID of the trade" }, "instrumentId": { "type": "integer", "format": "int32", "description": "The instrument ID of the instrument that was traded" }, "isBuy": { "type": "boolean", "description": "Indicates if the trade was a buy or sell" }, "leverage": { "type": "integer", "format": "int32", "description": "The leverage used in the trade" }, "openRate": { "type": "number", "format": "float", "description": "The opening rate of the trade" }, "openTimestamp": { "type": "string", "format": "date-time", "description": "The opening timestamp of the trade" }, "stopLossRate": { "type": "number", "format": "float", "description": "The stop loss rate of the trade" }, "takeProfitRate": { "type": "number", "format": "float", "description": "The take profit rate of the trade" }, "trailingStopLoss": { "type": "boolean", "description": "Indicates if the trade had a trailing stop loss" }, "orderId": { "type": "integer", "format": "int64", "description": "The order ID of the trade" }, "socialTradeId": { "type": "integer", "format": "int64", "description": "The social trade ID of the trade" }, "parentPositionId": { "type": "integer", "format": "int64", "description": "The parent position ID of the trade" }, "investment": { "type": "number", "format": "float", "description": "The investment amount of the trade" }, "initialInvestment": { "type": "number", "format": "float", "description": "The initial investment amount of the trade" }, "fees": { "type": "number", "format": "float", "description": "The fees of the trade" }, "units": { "type": "number", "format": "float", "description": "The number of units traded" } } } } } } } }, "operationId": "listTradingHistory" } }, "/api/v1/trading/info/trade/history": { "get": { "tags": [ "Trading Real" ], "summary": "List trading history", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "0b67e6fb-a932-46af-84c1-87e3fb730a3e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "minDate", "description": "The start date of the period you would like to view.", "in": "query", "schema": { "type": "string", "format": "date" }, "required": true }, { "name": "page", "description": "The page number.", "in": "query", "schema": { "type": "integer" }, "required": false }, { "name": "pageSize", "description": "The amount of trades in each page.", "in": "query", "schema": { "type": "integer" }, "required": false } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "netProfit": { "type": "number", "format": "float", "description": "The net profit of the trade" }, "closeRate": { "type": "number", "format": "float", "description": "The closing rate of the trade" }, "closeTimestamp": { "type": "string", "format": "date-time", "description": "The closing timestamp of the trade" }, "positionId": { "type": "integer", "format": "int64", "description": "The position ID of the trade" }, "instrumentId": { "type": "integer", "format": "int32", "description": "The instrument ID of the instrument that was traded" }, "isBuy": { "type": "boolean", "description": "Indicates if the trade was a buy or sell" }, "leverage": { "type": "integer", "format": "int32", "description": "The leverage used in the trade" }, "openRate": { "type": "number", "format": "float", "description": "The opening rate of the trade" }, "openTimestamp": { "type": "string", "format": "date-time", "description": "The opening timestamp of the trade" }, "stopLossRate": { "type": "number", "format": "float", "description": "The stop loss rate of the trade" }, "takeProfitRate": { "type": "number", "format": "float", "description": "The take profit rate of the trade" }, "trailingStopLoss": { "type": "boolean", "description": "Indicates if the trade had a trailing stop loss" }, "orderId": { "type": "integer", "format": "int64", "description": "The order ID of the trade" }, "socialTradeId": { "type": "integer", "format": "int64", "description": "The social trade ID of the trade" }, "parentPositionId": { "type": "integer", "format": "int64", "description": "The parent position ID of the trade" }, "investment": { "type": "number", "format": "float", "description": "The investment amount of the trade" }, "initialInvestment": { "type": "number", "format": "float", "description": "The initial investment amount of the trade" }, "fees": { "type": "number", "format": "float", "description": "The fees of the trade" }, "units": { "type": "number", "format": "float", "description": "The number of units traded" } } } } } } } }, "operationId": "listTradingHistory2" } }, "/api/v1/user-info/people": { "get": { "tags": [ "Users Info" ], "summary": "Retrieve comprehensive user profile data and aggregated account information", "description": "Returns detailed user profile information including account status, verification levels, biographical data, and associated metadata. This endpoint aggregates essential user information from multiple sources to provide a complete user profile overview.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5394d844-f44c-4169-8122-0091d9c0051c" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "usernames", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "explode": false, "required": false }, { "name": "cidList", "in": "query", "schema": { "type": "array", "items": { "type": "integer" } }, "explode": false, "required": false } ], "responses": { "200": { "description": "Successfully retrieved user information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAggregatedInfoResponse" }, "example": { "users": [ { "gcid": 1536861, "realCID": 1563191, "demoCID": 1563191, "username": "exampleuser", "language": 1, "languageIsoCode": "en-GB", "country": 54, "allowDisplayFullName": false, "userBio": { "gcid": 1536861, "languageCode": null }, "whiteLabel": 1, "optOut": true, "homepage": null, "playerStatus": null, "piLevel": 0, "isPi": false, "avatars": [ { "url": "https://***.s3.amazonaws.com/images/avatoros/35x35/cy.png", "width": 35, "height": 35, "type": "Resized" }, { "url": "https://***.s3.amazonaws.com/images/avatoros/50x50/cy.png", "width": 50, "height": 50, "type": "Resized" }, { "url": "https://***.s3.amazonaws.com/images/avatoros/150x150/cy.png", "width": 150, "height": 150, "type": "Resized" } ], "masterAccountCid": null, "accountType": 1, "fundType": null, "isVerified": false, "verificationLevel": 1, "accountStatus": 1, "gdprInfo": null, "userFlowSignature": "233a065f3f8d7e344516fc75f7e6c4646a0c0d38798c00e4655fa0a9447ea223" } ] } } } }, "400": { "description": "Invalid request - Typically due to exceeding maximum usernames limit or invalid username format" }, "404": { "description": "One or more requested usernames not found" } }, "operationId": "retrieveComprehensiveUserProfileDataAggregated" } }, "/api/v1/user-info/people/search": { "get": { "tags": [ "Users Info" ], "summary": "Comprehensive search and analytics engine for user discovery and analysis", "description": "Powerful search platform that enables advanced user discovery with comprehensive filtering capabilities. Supports complex queries across multiple dimensions including performance metrics, risk profiles, investment patterns, and account characteristics. Ideal for identifying users based on specific trading behaviors and performance criteria.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "84e852a9-bbac-4fc1-8556-40a295a06bc6" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "period", "in": "query", "description": "Defines the time period for analyzing user metrics and performance data. Supports various predefined intervals for consistent analysis.", "required": true, "schema": { "type": "string", "enum": [ "CurrMonth", "CurrQuarter", "CurrYear", "LastYear", "LastTwoYears", "OneMonthAgo", "TwoMonthsAgo", "ThreeMonthsAgo", "SixMonthsAgo", "OneYearAgo" ] }, "example": "LastYear" }, { "name": "isTestAccount", "in": "query", "description": "When set to true, filters results to include only test/demo accounts. When false, shows only live accounts. Optional filter.", "required": false, "schema": { "type": "boolean" }, "example": false }, { "name": "optIn", "in": "query", "description": "Filter for users who have explicitly opted in to specific features or programs. Used for compliance and feature-specific filtering.", "required": false, "schema": { "type": "boolean" }, "example": true }, { "name": "blocked", "in": "query", "description": "When true, includes only blocked accounts in the results. Used for compliance and risk management purposes.", "required": false, "schema": { "type": "boolean" }, "example": false }, { "name": "page", "in": "query", "description": "Page number for pagination.", "required": false, "schema": { "type": "integer", "example": 1 } }, { "name": "pageSize", "in": "query", "description": "Number of results per page.", "required": false, "schema": { "type": "integer", "example": 10 } }, { "name": "sort", "in": "query", "description": "Sort results by specific field (e.g., -copiers).", "required": false, "schema": { "type": "string", "example": "-copiers" } }, { "name": "popularInvestor", "in": "query", "description": "Filter for popular investors.", "required": false, "schema": { "type": "boolean" } }, { "name": "gainMax", "in": "query", "description": "Max gain value filter.", "required": false, "schema": { "type": "integer", "example": 100 } }, { "name": "maxDailyRiskScoreMin", "in": "query", "description": "Minimum daily risk score.", "required": false, "schema": { "type": "integer", "example": 1 } }, { "name": "maxDailyRiskScoreMax", "in": "query", "description": "Maximum daily risk score.", "required": false, "schema": { "type": "integer", "example": 7 } }, { "name": "maxMonthlyRiskScoreMin", "in": "query", "description": "Minimum monthly risk score.", "required": false, "schema": { "type": "integer", "example": 1 } }, { "name": "maxMonthlyRiskScoreMax", "in": "query", "description": "Maximum monthly risk score.", "required": false, "schema": { "type": "integer", "example": 6 } }, { "name": "weeksSinceRegistrationMin", "in": "query", "description": "Minimum weeks since registration.", "required": false, "schema": { "type": "integer", "example": 75 } }, { "name": "countryId", "in": "query", "description": "The registered country ID of the user", "required": false, "schema": { "type": "integer", "example": 101 } }, { "name": "instrumentId", "in": "query", "description": "The instrument ID (you can also use this to exclude an instrument e.g., -5).", "required": false, "schema": { "type": "integer", "example": -5 } }, { "name": "instrumentPctMin", "in": "query", "description": "Minimum percentage of investment in the requested instrument ID.", "required": false, "schema": { "type": "integer", "example": 100 } }, { "name": "instrumentPctMax", "in": "query", "description": "Maximum percentage of investment in the requested instrument ID.", "required": false, "schema": { "type": "integer", "example": 100 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "totalItems": { "type": "integer" }, "items": { "type": "array", "items": { "type": "object", "properties": { "customerId": { "type": "integer" }, "userName": { "type": "string" }, "fullName": { "type": "string" }, "hasAvatar": { "type": "boolean" }, "isSocialConnected": { "type": "boolean" }, "isTestAccount": { "type": "boolean" }, "displayFullName": { "type": "boolean" }, "bonusOnly": { "type": "boolean" }, "blocked": { "type": "boolean" }, "verified": { "type": "boolean" }, "popularInvestor": { "type": "boolean" }, "copyBlock": { "type": "boolean" }, "isFund": { "type": "boolean" }, "isBronze": { "type": "boolean" }, "fundType": { "type": "integer" }, "tags": { "type": "array", "items": { "type": "integer" } }, "gain": { "type": "number", "format": "float" }, "dailyGain": { "type": "number", "format": "float" }, "thisWeekGain": { "type": "number", "format": "float" }, "riskScore": { "type": "integer" }, "maxDailyRiskScore": { "type": "integer" }, "maxMonthlyRiskScore": { "type": "integer" }, "copiers": { "type": "integer" }, "copiedTrades": { "type": "integer" }, "copyTradesPct": { "type": "number", "format": "float" }, "copyInvestmentPct": { "type": "number", "format": "float" }, "baseLineCopiers": { "type": "integer" }, "copiersGain": { "type": "number", "format": "float" }, "aumTier": { "type": "integer" }, "aumTierV2": { "type": "integer" }, "aumTierDesc": { "type": "string", "nullable": true }, "virtualCopiers": { "type": "integer" }, "trades": { "type": "integer" }, "winRatio": { "type": "number", "format": "float" }, "dailyDd": { "type": "number", "format": "float" }, "weeklyDd": { "type": "number", "format": "float" }, "profitableWeeksPct": { "type": "number", "format": "float" }, "profitableMonthsPct": { "type": "number", "format": "float" }, "velocity": { "type": "number", "format": "float" }, "exposure": { "type": "number", "format": "float" }, "avgPosSize": { "type": "number", "format": "float" }, "optimalCopyPosSize": { "type": "number", "format": "float" }, "highLeveragePct": { "type": "number", "format": "float" }, "mediumLeveragePct": { "type": "number", "format": "float" }, "lowLeveragePct": { "type": "number", "format": "float" }, "peakToValley": { "type": "number", "format": "float" }, "peakToValleyStart": { "type": "string", "format": "date-time" }, "peakToValleyEnd": { "type": "string", "format": "date-time" }, "longPosPct": { "type": "number", "format": "float" }, "topTradedInstrumentId": { "type": "integer" }, "topTradedAssetClassId": { "type": "integer" }, "topTradedInstrumentPct": { "type": "number", "format": "float" }, "totalTradedInstruments": { "type": "integer" }, "activeWeeks": { "type": "integer" }, "firstActivity": { "type": "integer", "description": "Number of days since the beginning of the interval of a user's first trading activity" }, "lastActivity": { "type": "integer", "description": "Number of days from the last trading activity till the end of the interval" }, "activeWeeksPct": { "type": "number", "format": "float" }, "weeksSinceRegistration": { "type": "integer" }, "country": { "type": "string" }, "affiliateId": { "type": "integer" }, "instrumentPct": { "type": "number", "format": "float" }, "countryId": { "type": "integer", "description": "The registered country ID of the user" }, "isPopularInvestor": { "type": "boolean", "description": "Indicates if the user is a popular investor" }, "topTradedAssetId": { "type": "integer", "description": "Top traded asset class ID in this interval" } } } } }, "required": [ "totalItems", "items" ] } } } } }, "operationId": "comprehensiveSearchAnalyticsEngineUserDiscovery" } }, "/api/v1/user-info/people/{username}/daily-gain": { "get": { "tags": [ "Users Info" ], "summary": "Retrieve granular performance data for specific time periods", "description": "Provides detailed performance analytics including daily gains, cumulative returns, and period-specific metrics within a specified date range. Supports various time-based analyses and performance reporting requirements.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "f3fcbba2-53b9-46bb-87c2-5c5ec4ef4ee1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "in": "path", "description": "Unique identifier of the user whose performance data is being requested", "schema": { "type": "string" }, "required": true, "example": "trader123" }, { "name": "minDate", "in": "query", "description": "Start date for the analysis period (inclusive) in YYYY-MM-DD format", "schema": { "type": "string", "format": "date" }, "required": true, "example": "2024-01-01" }, { "name": "maxDate", "in": "query", "description": "End date for the analysis period (inclusive) in YYYY-MM-DD format", "schema": { "type": "string", "format": "date" }, "required": true, "example": "2024-12-31" }, { "name": "type", "in": "query", "description": "Specifies the granularity of the performance data: 'Daily' for day-by-day metrics or 'Period' for aggregated period statistics", "schema": { "type": "string", "enum": [ "Daily", "Period" ] }, "required": true, "example": "Daily" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/getUserDailyGainResponse" }, "examples": { "dailyExample": { "summary": "Daily Gains Example", "value": [ { "timestamp": "2023-01-01T00:00:00Z", "gain": 0.0 }, { "timestamp": "2023-01-02T00:00:00Z", "gain": 0.14 }, { "timestamp": "2023-01-03T00:00:00Z", "gain": -0.26 }, { "timestamp": "2023-01-04T00:00:00Z", "gain": 0.68 } ] }, "periodExample": { "summary": "Period Gain Example", "value": { "gain": 7.52 } } } } } } }, "operationId": "retrieveGranularPerformanceDataSpecificTime" } }, "/api/v1/user-info/people/{username}/gain": { "get": { "tags": [ "Users Info" ], "summary": "Retrieve detailed historical performance metrics and analytics for a specified user", "description": "Returns comprehensive historical monthly and yearly performance data including gain percentages, risk-adjusted returns, and detailed trading statistics. This endpoint provides both aggregated and time-series performance metrics.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a0f00368-7db0-4174-ad86-4cd6d313d7d3" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "description": "Unique identifier of the user whose performance metrics are being requested", "in": "path", "schema": { "type": "string" }, "required": true, "example": "trader123" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/getUserGainResponse" } } } } }, "operationId": "retrieveDetailedHistoricalPerformanceMetricsAnalytics" } }, "/api/v1/user-info/people/{username}/portfolio/live": { "get": { "tags": [ "Users Info" ], "summary": "Get the live portfolio of a user", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "6adb70f2-6c01-47a0-8775-0c289ac3fe7a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "description": "The username of the user to retrieve the live portfolio for.", "in": "path", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "realizedCreditPct": { "type": "number", "format": "decimal", "description": "Credit as a percentage of the realized credit" }, "unrealizedCreditPct": { "type": "number", "format": "decimal", "description": "Credit as a percentage of the unrealized credit" }, "positions": { "type": "array", "items": { "type": "object", "properties": { "positionId": { "type": "integer", "description": "Position ID" }, "openTimestamp": { "type": "string", "format": "date-time", "description": "Open Timestamp" }, "openRate": { "type": "number", "format": "decimal", "description": "Open Rate" }, "instrumentId": { "type": "integer", "description": "Instrument ID" }, "isBuy": { "type": "boolean", "description": "Buy/Sell" }, "leverage": { "type": "integer", "description": "Leverage" }, "takeProfitRate": { "type": "number", "format": "decimal", "description": "Take Profit" }, "stopLossRate": { "type": "number", "format": "decimal", "description": "Stop Loss" }, "socialTradeId": { "type": "integer", "description": "Mirror ID" }, "parentPositionId": { "type": "integer", "description": "Parent Position ID" }, "investmentPct": { "type": "number", "format": "decimal", "description": "Realized Investment" }, "netProfit": { "type": "number", "format": "decimal", "description": "Profit Percentage" }, "trailingStopLoss": { "type": "boolean", "description": "Trailing Stop loss enabled" } } } }, "socialTrades": { "type": "array", "items": { "type": "object", "properties": { "socialTradeId": { "type": "integer", "description": "Internal Mirror ID" }, "parentUsername": { "type": "string", "description": "Parent Username" }, "stopLossPercentage": { "type": "number", "format": "decimal", "description": "Stop Loss" }, "openTimestamp": { "type": "string", "format": "date-time", "description": "Opening Timestamp" }, "investmentPct": { "type": "number", "format": "decimal", "description": "Investment Pct" }, "openInvestmentPct": { "type": "number", "format": "decimal", "description": "Open Trades in Mirror" }, "netProfit": { "type": "number", "format": "decimal", "description": "Profit Pct" }, "openNetProfit": { "type": "number", "format": "decimal", "description": "Net profit of opened trades" }, "closedNetProfit": { "type": "number", "format": "decimal", "description": "Net profit of closed trades" }, "realizedPct": { "type": "number", "format": "decimal", "description": "Live Realized percentage" }, "unrealizedPct": { "type": "number", "format": "decimal", "description": "Unrealized" }, "isClosing": { "type": "boolean", "description": "Pending Close" }, "positions": { "type": "array", "items": { "type": "object", "properties": { "positionId": { "type": "integer", "description": "Position ID" }, "openTimestamp": { "type": "string", "format": "date-time", "description": "Open Timestamp" }, "openRate": { "type": "number", "format": "decimal", "description": "Open Rate" }, "instrumentId": { "type": "integer", "description": "Instrument ID" }, "isBuy": { "type": "boolean", "description": "Buy/Sell" }, "leverage": { "type": "integer", "description": "Leverage" }, "takeProfitRate": { "type": "number", "format": "decimal", "description": "Take Profit" }, "stopLossRate": { "type": "number", "format": "decimal", "description": "Stop Loss" }, "socialTradeId": { "type": "integer", "description": "Mirror ID" }, "parentPositionId": { "type": "integer", "description": "Parent Position ID" }, "investmentPct": { "type": "number", "format": "decimal", "description": "Realized Investment" }, "netProfit": { "type": "number", "format": "decimal", "description": "Profit Percentage" }, "trailingStopLoss": { "type": "boolean", "description": "Trailing Stop loss enabled" } } } } } } } } } } } } }, "operationId": "getLivePortfolioUser" } }, "/api/v1/user-info/people/{username}/tradeinfo": { "get": { "tags": [ "Users Info" ], "summary": "Get trade info for a specific user", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "93d6c631-4763-45fc-9eca-9b15c40773c0" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "description": "The username of the user to retrieve the discovery info for.", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "period", "in": "query", "description": "The period filter (e.g., LastTwoYears).", "required": true, "schema": { "type": "string", "enum": [ "CurrMonth", "CurrQuarter", "CurrYear", "LastYear", "LastTwoYears", "OneMonthAgo", "TwoMonthsAgo", "ThreeMonthsAgo", "SixMonthsAgo", "OneYearAgo" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "userName": { "type": "string", "description": "The username of the customer" }, "fullName": { "type": "string", "description": "Full name of the customer" }, "weeksSinceRegistration": { "type": "integer", "description": "Number of weeks since registration" }, "countryId": { "type": "integer", "description": "The registered country ID of the user" }, "affiliateId": { "type": "integer", "description": "The affiliate ID of the user" }, "isPopularInvestor": { "type": "boolean", "description": "Is the customer a popular investor" }, "isFund": { "type": "boolean", "description": "Does this customer represent a fund" }, "hasAvatar": { "type": "boolean", "description": "Does the customer have a picture" }, "gain": { "type": "number", "format": "float", "description": "The periodic gain of the user" }, "dailyGain": { "type": "number", "format": "float", "description": "The user's last day gain" }, "thisWeekGain": { "type": "number", "format": "float", "description": "The user's gain from the beginning of the trading week" }, "riskScore": { "type": "integer", "description": "The current risk score of the user" }, "maxDailyRiskScore": { "type": "integer", "description": "The maximum daily risk score of the user in this interval" }, "maxMonthlyRiskScore": { "type": "integer", "description": "The maximum monthly risk score of the user in this interval" }, "copiers": { "type": "integer", "description": "The current number of copiers of this user" }, "copiedTrades": { "type": "integer", "description": "The total number of copied trades in this interval" }, "copyTradesPct": { "type": "number", "format": "float", "description": "The percentage of copied trades in this interval of all trades" }, "copyInvestmentPct": { "type": "number", "format": "float", "description": "The percentage of invested amounts in copied trades in this interval of all investments" }, "baseLineCopiers": { "type": "integer", "description": "The number of copiers one week ago" }, "copiersGain": { "type": "number", "format": "float", "description": "The gain percentage of the number of copiers in a week" }, "aumTier": { "type": "integer", "description": "The total assets under management of the user, in a scale of 0-4, where 4 is the highest tier" }, "aumTierDesc": { "type": "string", "description": "Description of the AUM Tier" }, "fundType": { "type": "integer", "description": "Fund Type" }, "virtualCopiers": { "type": "integer", "description": "The total amount of virtual copiers of this user" }, "trades": { "type": "integer", "description": "The total number of trades in this interval" }, "topTradedInstrumentId": { "type": "integer", "description": "Top Traded Instrument ID in this interval" }, "topTradedAssetId": { "type": "integer", "description": "Top Traded Asset ID in this interval" }, "winRatio": { "type": "number", "format": "float", "description": "The winning ratio of all closed trades in this interval" }, "dailyDd": { "type": "number", "format": "float", "description": "The maximum daily draw-down of the user in this interval" }, "weeklyDd": { "type": "number", "format": "float", "description": "The maximum weekly draw-down of this user in this interval" }, "peakToValley": { "type": "number", "format": "float", "description": "The peak to valley draw-down in this interval" }, "profitableWeeksPct": { "type": "number", "format": "float", "description": "The percentage of trading weeks which were profitable in this interval" }, "profitableMonthsPct": { "type": "number", "format": "float", "description": "The percentage of months which were profitable in this interval" }, "avgPosSize": { "type": "number", "format": "float", "description": "Average position size relative to the realized equity on opening the trade" }, "highLeveragePct": { "type": "number", "format": "float", "description": "High leverage trades percentage in this interval" }, "mediumLeveragePct": { "type": "number", "format": "float", "description": "Medium leverage trades percentage in this interval" }, "lowLeveragePct": { "type": "number", "format": "float", "description": "Low leverage trades percentage in this interval" }, "firstActivity": { "type": "integer", "description": "Number of days since the beginning of the interval of a user trading activity" }, "lastActivity": { "type": "integer", "description": "Number of days from the last trading activity till the end of the interval" }, "activeWeeksPct": { "type": "number", "format": "float", "description": "The percentage of weeks in the interval which the user had active trades" }, "instrumentPct": { "type": "number", "format": "float", "description": "Percentage of investment in the requested instrument ID" } } } } } } }, "operationId": "getTradeInfoSpecificUser" } }, "/api/v1/watchlists": { "get": { "tags": [ "Watchlists" ], "summary": "Get user watchlists", "description": "Retrieves all watchlists for the authenticated user with optional pagination and built-in watchlist management.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a23f4ec5-4334-4bd2-a5e6-27543bfde4c9" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "itemsPerPageForSingle", "in": "query", "description": "Number of items to include per watchlist for pagination", "schema": { "type": "integer", "format": "int32", "default": 100, "minimum": 1, "maximum": 1000, "example": 100 } }, { "name": "ensureBuiltinWatchlists", "in": "query", "description": "Whether to ensure built-in watchlists are included", "schema": { "type": "boolean", "default": true, "example": true } }, { "name": "addRelatedAssets", "in": "query", "description": "Whether to include related assets in the response", "schema": { "type": "boolean", "default": false, "example": false } } ], "responses": { "200": { "description": "Successfully retrieved user watchlists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "operationId": "getUserWatchlists" }, "post": { "tags": [ "Watchlists" ], "summary": "Create a new watchlist", "description": "Creates a new watchlist for the authenticated user with the specified name and type.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "629691ba-bb2b-4e3c-9e23-a1f354025822" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "name", "in": "query", "description": "Name of the new watchlist", "required": true, "schema": { "type": "string", "maxLength": 100, "example": "Tech Watchlist" } }, { "name": "type", "in": "query", "description": "Type of watchlist to create", "schema": { "type": "string", "enum": [ "Static", "Dynamic" ], "default": "Static", "example": "Static" } }, { "name": "dynamicQuery", "in": "query", "description": "Dynamic query URL for dynamic watchlists", "schema": { "type": "string" } } ], "responses": { "201": { "description": "Watchlist created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "operationId": "createANewWatchlist" } }, "/api/v1/watchlists/default-watchlist/selected-items": { "post": { "tags": [ "Watchlists" ], "summary": "Create default watchlist with selected items", "description": "Creates a default watchlist populated with the specified items.", "requestBody": { "description": "Items to include in the default watchlist", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WatchlistItemDto" } } } } }, "responses": { "201": { "description": "Default watchlist created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "551daa42-12de-478c-b3a2-2b4c2a1a193a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "operationId": "createDefaultWatchlistWithSelectedItems" } }, "/api/v1/watchlists/default-watchlists/items": { "get": { "tags": [ "Watchlists" ], "summary": "Get default watchlist items", "description": "Retrieves items from user's default watchlists with optional pagination.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8728c1c7-1dc2-47b7-97ae-89b7de489bf1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "itemsLimit", "in": "query", "description": "Maximum number of items to return", "schema": { "type": "integer", "format": "int32" }, "example": 123456 }, { "name": "itemsPerPage", "in": "query", "description": "Number of items per page for pagination", "schema": { "type": "integer", "format": "int32", "default": 100 }, "example": 100 } ], "responses": { "200": { "description": "Successfully retrieved default watchlist items", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WatchlistItemDto" } } } } } }, "operationId": "getDefaultWatchlistItems" } }, "/api/v1/watchlists/newasdefault-watchlist": { "post": { "tags": [ "Watchlists" ], "summary": "Create watchlist and set as default", "description": "Creates a new watchlist and immediately sets it as the user's default watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a6361668-9105-402a-a786-10a96dc76298" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "name", "in": "query", "description": "Name of the new watchlist", "required": true, "schema": { "type": "string", "maxLength": 100 }, "example": "Tech Watchlist" }, { "name": "type", "in": "query", "description": "Type of watchlist to create", "schema": { "type": "string", "default": "Static", "enum": [ "Static", "Dynamic" ] }, "example": "Static" }, { "name": "dynamicQuery", "in": "query", "description": "Query string for dynamic watchlists", "schema": { "type": "string" } } ], "responses": { "201": { "description": "Watchlist created and set as default successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "operationId": "createWatchlistAndSetAsDefault" } }, "/api/v1/watchlists/public/{userId}": { "get": { "tags": [ "Watchlists" ], "summary": "Get user's public watchlists", "description": "Retrieves all public watchlists for a specific user.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8b51647e-8058-40e1-8a1e-bffd83f090e4" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "userId", "in": "path", "description": "User ID whose public watchlists to retrieve", "required": true, "schema": { "type": "integer", "format": "int32" }, "example": 12345 }, { "name": "itemsPerPageForSingle", "in": "query", "description": "Number of items per watchlist", "schema": { "type": "integer", "format": "int32", "default": 100 }, "example": 50 } ], "responses": { "200": { "description": "Successfully retrieved public watchlists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "operationId": "getUserSPublicWatchlists" } }, "/api/v1/watchlists/public/{userId}/{watchlistId}": { "get": { "tags": [ "Watchlists" ], "summary": "Get single public watchlist", "description": "Retrieves a specific public watchlist from a user.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9240375b-cb71-43d7-afbb-0452d1c5d35a" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "userId", "in": "path", "description": "User ID who owns the watchlist", "required": true, "schema": { "type": "integer", "format": "int32" }, "example": 12345 }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" }, { "name": "pageNumber", "in": "query", "description": "Page number for pagination", "schema": { "type": "integer", "format": "int32", "default": 0 }, "example": 0 }, { "name": "itemsPerPage", "in": "query", "description": "Number of items per page", "schema": { "type": "integer", "format": "int32", "default": 100 }, "example": 30 } ], "responses": { "200": { "description": "Successfully retrieved public watchlist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistResponse" } } } } }, "operationId": "getSinglePublicWatchlist" } }, "/api/v1/watchlists/rank/{watchlistId}": { "put": { "tags": [ "Watchlists" ], "summary": "Change watchlist rank", "description": "Updates the display rank of a watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "9b133378-9700-464a-aa83-92e5b0dc41a9" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" }, { "name": "newRank", "in": "query", "description": "New rank position for the watchlist", "required": true, "schema": { "type": "integer", "format": "int32", "example": 500 } } ], "responses": { "204": { "description": "Watchlist rank updated successfully" } }, "operationId": "changeWatchlistRank" } }, "/api/v1/watchlists/setUserSelectedUserDefault/{watchlistId}": { "put": { "tags": [ "Watchlists" ], "summary": "Set a specific watchlist as user's default", "description": "Sets the specified watchlist as the user's default watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "38fe16da-5365-451d-9f8d-f3e06bb40fe3" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist to set as default", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "responses": { "200": { "description": "Default watchlist set successfully" } }, "operationId": "setSpecificWatchlistUserSDefault" } }, "/api/v1/watchlists/{watchlistId}": { "get": { "tags": [ "Watchlists" ], "summary": "Get single watchlist", "description": "Retrieves a specific watchlist with its items using pagination.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "fc166ad7-1b19-45f8-acdc-5d14dc316821" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" }, { "name": "pageNumber", "in": "query", "description": "Page number for pagination", "schema": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 }, "example": 0 }, { "name": "itemsPerPage", "in": "query", "description": "Number of items per page", "schema": { "type": "integer", "format": "int32", "default": 100, "minimum": 1, "maximum": 1000 }, "example": 50 } ], "responses": { "200": { "description": "Successfully retrieved watchlist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WatchlistsResponse" } } } } }, "operationId": "getSingleWatchlist" }, "put": { "tags": [ "Watchlists" ], "summary": "Rename watchlist", "description": "Updates the name of an existing watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "07486a96-1ef5-417f-b9a2-c4de10d162a3" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" }, { "name": "newName", "in": "query", "description": "New name for the watchlist", "required": true, "schema": { "type": "string", "maxLength": 100 }, "example": "Updated Watchlist" } ], "responses": { "204": { "description": "Watchlist renamed successfully" } }, "operationId": "renameWatchlist" }, "delete": { "tags": [ "Watchlists" ], "summary": "Delete watchlist", "description": "Removes a watchlist and all its items.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "f2c1a05a-eef0-45c1-9b53-3bb36e8e1aab" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist to delete", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "responses": { "204": { "description": "Watchlist deleted successfully" } }, "operationId": "deleteWatchlist" } }, "/api/v1/watchlists/{watchlistId}/items": { "post": { "tags": [ "Watchlists" ], "summary": "Add items to watchlist", "description": "Adds new items to an existing watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "bba0ac38-7ad7-460a-a359-a8d8a5958d03" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "requestBody": { "description": "Items to add to the watchlist", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WatchlistItemDto" } } } } }, "responses": { "201": { "description": "Items added successfully" } }, "operationId": "addItemsToWatchlist" }, "put": { "tags": [ "Watchlists" ], "summary": "Update items in watchlist", "description": "Updates existing items in a watchlist (rank, etc.).", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "96697288-1bfe-4c1f-b750-b6872a7f6a1d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "requestBody": { "description": "Items to update in the watchlist", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WatchlistItemDto" } } } } }, "responses": { "204": { "description": "Items updated successfully" } }, "operationId": "updateItemsInWatchlist" }, "delete": { "tags": [ "Watchlists" ], "summary": "Remove items from watchlist", "description": "Removes specified items from a watchlist.", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "90e34eb0-31bc-414d-8451-20546f3035ac" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "watchlistId", "in": "path", "description": "Unique identifier of the watchlist", "required": true, "schema": { "type": "string" }, "example": "12345" } ], "requestBody": { "description": "Items to remove from the watchlist", "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WatchlistItemDto" } } } } }, "responses": { "204": { "description": "Items removed successfully" } }, "operationId": "removeItemsFromWatchlist" } }, "/api/v2/agent-portfolios": { "post": { "tags": [ "Agent Portfolios" ], "summary": "Create Agent Portfolio (v2)", "description": "Creates a new agent-portfolio using scope names. Scopes are specified by name (scopeNames); scope ids are not supported in v2. IMPORTANT: investmentAmountInUsd is the amount deducted from YOUR (the caller's) account balance to copy-trade this agent-portfolio \u2014 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.", "operationId": "createAgentPortfolioV2", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioV2Request" } } } }, "responses": { "201": { "description": "Agent-portfolio and user token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioV2Response" } } } }, "207": { "description": "Agent-portfolio created but user token provisioning failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAgentPortfolioPartialResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "ScopeNameNotAllowed": { "summary": "Scope name not allowed", "value": { "errorCode": "ScopeNameNotAllowed", "errorMessage": "Scope name not allowed" } }, "NameTooShort": { "summary": "Agent-portfolio name too short", "value": { "errorCode": "ValidationFailed", "errorMessage": "Agent-portfolio name must be between 6 and 10 characters" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "1f7bab86-9687-4f77-9714-7caae8542911" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v2/agent-portfolios/user-tokens/scopes": { "get": { "tags": [ "Agent Portfolios" ], "summary": "Get Allowed Scopes (v2)", "description": "Returns the permission scope names that may be assigned to agent-portfolio user tokens.", "operationId": "getAgentPortfolioAllowedScopesV2", "responses": { "200": { "description": "Allowed scopes retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAllowedScopesResponse" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "0b9f5b04-1fc4-492a-a2c2-02731caf3ce4" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ] } }, "/api/v2/agent-portfolios/{agentPortfolioId}/user-tokens": { "post": { "tags": [ "Agent Portfolios" ], "summary": "Create User Token (v2)", "description": "Creates a new user token for the specified agent-portfolio using scope names. Scopes are specified by name (scopeNames); scope ids are not supported in v2.", "operationId": "createAgentPortfolioUserTokenV2", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "8651915d-62c3-4941-a275-9cc731a88658" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserTokenV2Request" } } } }, "responses": { "201": { "description": "User token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserTokenResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "ScopeNamesRequired": { "summary": "Scope names are required", "value": { "errorCode": "ScopeIdsRequired", "errorMessage": "ScopeNames is required" } } } } } }, "403": { "description": "Forbidden \u2014 a requested scope name is not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "ScopeNameNotAllowed", "errorMessage": "Scope name not allowed" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } } } }, "409": { "description": "Conflict \u2014 a user token with the requested name already exists for this agent-portfolio", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UserKeyNameAlreadyExists", "errorMessage": "UserKeyName already exists" } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "MaxUserTokensExceeded", "errorMessage": "Maximum number of user tokens exceeded" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v2/agent-portfolios/{agentPortfolioId}/user-tokens/{userTokenId}": { "patch": { "tags": [ "Agent Portfolios" ], "summary": "Update User Token (v2)", "description": "Updates the settings of an existing user token using scope names. At least one field must be provided. Scopes are specified by name (scopeNames); scope ids are not supported in v2.", "operationId": "updateAgentPortfolioUserTokenV2", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "1448a179-93c0-4bad-815e-5da83901f5f7" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "agentPortfolioId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the agent-portfolio." }, { "name": "userTokenId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The unique identifier of the user token to update." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserTokenV2Request" } } } }, "responses": { "204": { "description": "User token updated successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "NoChanges": { "summary": "No changes provided", "value": { "errorCode": "NoChangesDetected", "errorMessage": "At least one field must be provided" } } } } } }, "403": { "description": "Forbidden \u2014 a requested scope name is not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "ScopeNameNotAllowed", "errorMessage": "Scope name not allowed" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "Unauthorized", "errorMessage": "Unauthorized" } } } }, "404": { "description": "Agent-portfolio or user token not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "AgentPortfolioNotFound": { "summary": "Agent-portfolio not found", "value": { "errorCode": "NotFound", "errorMessage": "Agent-portfolio not found" } }, "UserTokenNotFound": { "summary": "User token not found", "value": { "errorCode": "NotFound", "errorMessage": "User token not found" } } } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "TooManyRequests", "errorMessage": "Too many requests" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "errorCode": "UnhandledException", "errorMessage": "Global Error" } } } } } } }, "/api/v2/portfolios/{username}/assets/history": { "get": { "tags": [ "Users Stats" ], "summary": "Get asset allocation history", "description": "Returns a daily asset-allocation breakdown for a publicly visible portfolio. Data is only available for investors who have not opted out \u2014 opted-out portfolios return 403 for third-party callers. Callers must authenticate with their own token. Use period OR minDate+maxDate (mutually exclusive). All ratio fields use decimal fraction format: 0.5 = 50%.", "operationId": "getAssetsHistory", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "f4fcd100-888b-4064-abd1-0489221a7245" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "period", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/RankingPeriod" }, "description": "Predefined rolling window. Mutually exclusive with minDate/maxDate.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "minDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Start date inclusive (YYYY-MM-DD). Mutually exclusive with period. Required together with maxDate when period is omitted.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "maxDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "End date inclusive (YYYY-MM-DD). Mutually exclusive with period. Required together with minDate when period is omitted.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0 }, "description": "Downsample time axis to at most N buckets. Omit or pass 0 for no downsampling." } ], "responses": { "200": { "description": "Successful response", "headers": { "Cache-Control": { "description": "public, max-age=3600 for opted-in users; private, max-age=3600 for opted-out self-view.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetsHistoryResponse" }, "example": { "userName": "john.smith", "results": [ { "date": "2024-01-31", "cashPct": 0.28, "cashOfTotalEquityPct": 0.24, "assets": [ { "instrumentId": 1001, "symbol": "AAPL", "investedPct": 0.45, "valuePct": 0.51 } ] } ] } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Target user has opted out of portfolio exposure", "headers": { "Cache-Control": { "description": "no-store", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "502": { "description": "Upstream dependency returned a server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "503": { "description": "Upstream dependency timed out or was unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/api/v2/portfolios/{username}/copiers": { "get": { "tags": [ "Users Stats" ], "summary": "Get current copier count and AUM tier for a public portfolio", "description": "Returns the investor's live copier count and assets-under-management tier for a public username. Requires `etoro-public:user-info:read`.", "operationId": "getPortfolioCopiers", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "1650ea9b-d3c8-4796-9a7c-0123d49fa2d7" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "in": "path", "required": true, "description": "Public eToro username.", "schema": { "type": "string", "minLength": 1, "maxLength": 50 } } ], "responses": { "200": { "description": "Current copiers snapshot for the requested portfolio.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CopiersCurrentResponse" }, "examples": { "populated": { "value": { "copiers": 42, "aumTier": 3, "aumTierDesc": "Gold" } } } } } }, "400": { "description": "Request validation failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorResponse" } } } }, "401": { "description": "Missing or invalid authentication credentials.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorResponse" } } } }, "403": { "description": "User has opted out of public profile display.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorResponse" } } } }, "404": { "description": "Username not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardErrorResponse" } } } } } } }, "/api/v2/portfolios/{username}/exposure/history": { "get": { "tags": [ "Users Stats" ], "summary": "Get market exposure history", "description": "Returns daily directional exposure breakdown per instrument for a publicly visible portfolio. Data is only available for investors who have not opted out - opted-out portfolios return 403 for third-party callers. Callers must authenticate with their own token. Use period OR minDate+maxDate (mutually exclusive). All values are decimal fractions of total daily investment: 0.5 = 50%. Simulated positions are excluded.", "operationId": "getExposureHistory", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "6a5d26d7-545a-4bd2-9b1b-c99b91c917f9" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The eToro username of the portfolio owner." }, { "name": "period", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/RankingPeriod" }, "description": "Predefined rolling window. Mutually exclusive with minDate/maxDate.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "minDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "Start date inclusive (ISO 8601 date, YYYY-MM-DD). Mutually exclusive with period. Required together with maxDate when period is omitted.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "maxDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" }, "description": "End date inclusive (ISO 8601 date, YYYY-MM-DD). Mutually exclusive with period. Required together with minDate when period is omitted.", "x-mutual-exclusivity-group": "dateFilter" }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0 }, "description": "Downsample time axis to at most N buckets. Omit or pass 0 for no downsampling." } ], "responses": { "200": { "description": "Successful response", "headers": { "Cache-Control": { "description": "public, max-age=3600 for opted-in users; private, max-age=3600 for opted-out self-view.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExposureHistoryResponse" }, "example": { "userName": "john.smith", "results": [ { "date": "2024-01-31", "absExposurePct": 0.72, "exposureItems": [ { "instrumentId": 1001, "symbol": "AAPL", "netExposurePct": 0.43, "absExposurePct": 0.43 }, { "instrumentId": 2005, "symbol": "TSLA", "netExposurePct": -0.25, "absExposurePct": 0.25 } ] } ] } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Target user has opted out of portfolio exposure", "headers": { "Cache-Control": { "description": "no-store", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "502": { "description": "Upstream service returned an error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "504": { "description": "Upstream service timed out", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/api/v2/portfolios/{username}/gain/{granularity}": { "get": { "tags": [ "Users Stats" ], "summary": "Get investor gain time-series", "description": "Returns a gain time-series scoped by date range, count, or a combination of one date and a count. Gain values are decimal fractions: 0.06 = 6%, -0.03 = -3%.", "operationId": "getGainHistory", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "cbc3fc06-56f5-4ece-8fad-0fe276be7499" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "granularity", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "daily", "monthly", "yearly" ] } }, { "name": "minDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "maxDate", "in": "query", "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "count", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } } ], "responses": { "200": { "description": "Successful response", "headers": { "Cache-Control": { "description": "public, max-age=3600 for opted-in users; private, max-age=3600 for opted-out self-view.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GainHistoryResponse" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Target user has opted out of portfolio exposure", "headers": { "Cache-Control": { "description": "no-store", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/api/v2/trading/execution/demo/orders": { "post": { "tags": [ "Trading Demo" ], "summary": "Create an order", "description": "This endpoint allows traders to place an order. Leverage, stop-loss, and take-profit settings can be applied. Order size must use exactly one of amount, units, or contracts. A unique X-Request-Id header (GUID) is required for idempotency. Currently only orders to open a position are supported.", "operationId": "createDemoOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "5148cfb6-9c50-4c14-81e1-45527d0848b1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderRequest" }, "example": { "action": "open", "transaction": "buy", "symbol": "AAPL", "instrumentId": 101, "settlementType": "cfd", "orderType": "mkt", "triggerRate": null, "leverage": 2, "amount": 1000.0, "orderCurrency": "usd", "units": null, "contracts": null, "stopLossRate": 1.2, "takeProfitRate": 1.5, "stopLossType": "fixed", "additionalMargin": null, "positionIds": null } } } }, "responses": { "200": { "description": "Order submitted successfully. Returns the created order details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderResponse" }, "example": { "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8", "orderId": 13902598, "referenceId": "1c94300c-90aa-4303-9d00-dec376d74efb" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/execution/demo/orders/{orderId}": { "delete": { "tags": [ "Trading Demo" ], "summary": "Cancels an order before it is executed", "description": "This endpoint allows traders to cancel an order before execution. If the order has already been processed, cancellation will not be possible. This operation is idempotent when the order is already closed or cancelled.", "operationId": "cancelDemoOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "d1b4fc5a-251f-464b-9e13-41153fbb9a96" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "description": "The ID of the order to cancel.", "schema": { "type": "integer", "format": "int64" }, "example": 13902598 } ], "responses": { "200": { "description": "Order cancellation request submitted successfully.", "content": { "application/json": { "schema": { "type": "object", "description": "Acknowledgment when the service returns a confirmation payload.", "properties": { "token": { "type": "string", "format": "uuid", "description": "Optional confirmation token for the cancellation request." } } }, "example": { "token": "7f1da128-f516-4710-8474-915566c4b22e" } } } }, "400": { "description": "Invalid request. Validation failed or unsupported order type.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Order not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/execution/orders": { "post": { "tags": [ "Trading Real" ], "summary": "Create an order", "description": "This endpoint allows traders to place an order. Leverage, stop-loss, and take-profit settings can be applied. Order size must use exactly one of amount, units, or contracts. A unique X-Request-Id header (GUID) is required for idempotency. Currently only orders to open a position are supported.", "operationId": "createRealOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "86d5b1d1-846e-44d6-b1c9-0b1991dbabb7" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderRequestForRealCreateOrderDocs" }, "example": { "action": "open", "transaction": "buy", "symbol": "AAPL", "instrumentId": 101, "orderType": "mkt", "triggerRate": null, "leverage": 2, "amount": 1000.0, "orderCurrency": "usd", "units": null, "contracts": null, "stopLossRate": 1.2, "takeProfitRate": 1.5, "stopLossType": "fixed", "additionalMargin": null, "positionIds": null } } } }, "responses": { "200": { "description": "Order submitted successfully. Returns the created order details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderResponse" }, "example": { "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8", "orderId": 13902598, "referenceId": "1c94300c-90aa-4303-9d00-dec376d74efb" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/execution/orders/{orderId}": { "delete": { "tags": [ "Trading Real" ], "summary": "Cancels an order before it is executed", "description": "This endpoint allows traders to cancel an order before execution. If the order has already been processed, cancellation will not be possible. This operation is idempotent when the order is already closed or cancelled.", "operationId": "cancelRealOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ba62ef26-e833-45cc-9cbe-7eaace601999" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "description": "The ID of the order to cancel.", "schema": { "type": "integer", "format": "int64" }, "example": 13902598 } ], "responses": { "200": { "description": "Order cancellation request submitted successfully.", "content": { "application/json": { "schema": { "type": "object", "description": "Acknowledgment when the service returns a confirmation payload.", "properties": { "token": { "type": "string", "format": "uuid", "description": "Optional confirmation token for the cancellation request." } } }, "example": { "token": "7f1da128-f516-4710-8474-915566c4b22e" } } } }, "400": { "description": "Invalid request. Validation failed or unsupported order type.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Order not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/costs": { "post": { "tags": [ "Trading Real" ], "summary": "Get a what-if cost breakdown for opening or closing a position", "description": "Returns the markup, market spread, transaction fee, overnight fee, over-weekend fee, and SDRT that would apply if the supplied order were executed now. For `action: open`, exactly one of `symbol` or `instrumentId` must be provided and `leverage` must be at least 1. For `action: close`, `positionIds` must be non-empty.", "operationId": "getCost", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a3da1c20-5040-4f37-aa49-5bab12627d0b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderRequest" }, "examples": { "open": { "summary": "Cost for opening a position", "value": { "action": "open", "transaction": "buy", "instrumentId": 101, "settlementType": "cfd", "orderType": "mkt", "leverage": 2, "amount": 1000.0, "orderCurrency": "usd" } }, "close": { "summary": "Cost for closing one or more positions", "value": { "action": "close", "transaction": "sell", "positionIds": [ 13902598, 13902599 ] } } } } } }, "responses": { "200": { "description": "Cost breakdown resolved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCostResponse" }, "example": { "instrumentId": 101, "symbol": "AAPL", "costs": [ { "costType": "markup", "amount": 0.15, "currency": "USD" }, { "costType": "marketSpread", "amount": 0.03, "currency": "USD" }, { "costType": "transactionFee", "amount": 1.0, "currency": "USD" }, { "costType": "overnightFee", "amount": 0.25, "currency": "USD" }, { "costType": "overWeekendFee", "amount": 0.75, "currency": "USD" }, { "costType": "sdrt", "amount": 0.5, "currency": "USD" } ], "lastUpdated": "2026-05-25T08:30:00Z" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Instrument or position not found." }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/demo/costs": { "post": { "tags": [ "Trading Demo" ], "summary": "Get a what-if cost breakdown for opening or closing a position", "description": "Returns the markup, market spread, transaction fee, overnight fee, over-weekend fee, and SDRT that would apply if the supplied order were executed now against the demo account. For `action: open`, exactly one of `symbol` or `instrumentId` must be provided and `leverage` must be at least 1. For `action: close`, `positionIds` must be non-empty.", "operationId": "getCostDemo", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "44f1086b-bf83-4782-a040-7e1c435e3ad3" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedOrderRequest" }, "examples": { "open": { "summary": "Cost for opening a position", "value": { "action": "open", "transaction": "buy", "instrumentId": 101, "settlementType": "cfd", "orderType": "mkt", "leverage": 2, "amount": 1000.0, "orderCurrency": "usd" } }, "close": { "summary": "Cost for closing one or more positions", "value": { "action": "close", "transaction": "sell", "positionIds": [ 13902598, 13902599 ] } } } } } }, "responses": { "200": { "description": "Cost breakdown resolved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCostResponse" }, "example": { "instrumentId": 101, "symbol": "AAPL", "costs": [ { "costType": "markup", "amount": 0.15, "currency": "USD" }, { "costType": "marketSpread", "amount": 0.03, "currency": "USD" }, { "costType": "transactionFee", "amount": 1.0, "currency": "USD" }, { "costType": "overnightFee", "amount": 0.25, "currency": "USD" }, { "costType": "overWeekendFee", "amount": 0.75, "currency": "USD" }, { "costType": "sdrt", "amount": 0.5, "currency": "USD" } ], "lastUpdated": "2026-05-25T08:30:00Z" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Instrument or position not found." }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/demo/eligibility": { "post": { "tags": [ "Trading Demo" ], "summary": "Check trading permissions, limits, and available leverage for one or more instruments", "description": "Returns per-instrument trading configuration for the authenticated account - position limits, permitted order types, stop-loss and take-profit boundaries, and available leverage by settlement type and direction. Instruments not found are listed in notFoundInstrumentIds and notFoundSymbols. At least one of instrumentIds or symbols must be supplied; the combined length must not exceed 100 instruments.", "operationId": "getInstrumentEligibilityDemo", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b25ace04-5fd6-4358-b744-90a110b4a55d" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityRequest" }, "example": { "instrumentIds": [ 1001 ], "symbols": [ "AAPL" ], "currency": "USD" } } } }, "responses": { "200": { "description": "Eligibility resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityResponse" }, "example": { "currency": "USD", "eligibilities": [ { "instrumentId": 1001, "symbol": "AAPL", "minPositionExposure": 50.0, "maxUnitsPerOrder": 10000.0, "allowOpenPosition": true, "allowClosePosition": true, "allowPartialClosePosition": true, "allowMitOrders": true, "allowEntryOrders": false, "allowExitOrders": false, "allowTrailingStopLoss": true, "requiresW8Ben": null, "unitsQuantityType": "FractionalUnits", "orderFillBehaviorType": "BestEffort", "allowedOrderQuantityType": "Both", "tradeUnitType": "Units", "initialMarginInAssetCurrency": null, "stopLossMarginInAssetCurrency": null, "additionalBufferPercent": null, "leverageConfigs": [ { "settlementType": "CFD", "direction": "LONG", "leverageValues": [ 1, 2, 5 ], "isPotential": false, "minPositionAmount": 50.0, "allowEditStopLoss": true, "minStopLossPercentage": 5.0, "maxStopLossPercentage": 50.0, "defaultStopLossPercentage": 50.0, "allowEditTakeProfit": true, "minTakeProfitPercentage": 5.0, "maxTakeProfitPercentage": 1000.0, "defaultTakeProfitPercentage": 1000.0, "allowStopLossTakeProfit": true } ] } ], "notFoundInstrumentIds": [], "notFoundSymbols": [] } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/demo/orders:lookup": { "get": { "tags": [ "Trading Demo" ], "summary": "Get Order Information and Position Details for Demo Account", "description": "Retrieves comprehensive information about a specific order, including the order status, execution details, and all positions that were opened or closed from this order. This endpoint is essential for tracking order execution and identifying which positions were created as a result of a specific order request. The response includes detailed position information with PositionID values that can be used to query position-specific details. Provide exactly one of orderId or referenceId.", "operationId": "lookupDemoOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "20d64a1d-a050-46aa-9119-f00385c55bc0" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "query", "description": "Numeric order identifier. Mutually exclusive with referenceId.", "schema": { "type": "integer", "format": "int64" } }, { "name": "referenceId", "in": "query", "description": "Request ID header sent during order submission. Mutually exclusive with orderId.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Order information retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrderInfoResponse" }, "example": { "accountId": 7765437, "gcid": 987654321, "portfolioId": 1, "orderId": 13902598, "action": "open", "transaction": "buy", "type": "mkt", "etoroOrderTypeId": 17, "status": { "id": 1, "name": "Executed", "errorCode": 0, "errorMessage": null }, "asset": { "symbol": "AAPL", "instrumentId": 101, "currency": "USD", "settlementType": "cfd", "leverage": 2, "side": "long" }, "orderCurrency": "usd", "requestedAmount": 1000.0, "requestedUnits": null, "requestedContracts": null, "frozenAmount": 1002.5, "requestedTriggerRate": null, "openStopLossRate": 1.2, "openTakeProfitRate": 1.5, "stopLossType": "fixed", "totalCosts": 2.5, "positionsToClose": [], "positionExecutions": [ { "positionId": 9001, "state": "open", "investedAmountCurrency": 1000, "initialExposureAccountCurrency": 1000.0, "initialExposureAssetCurrency": 1000.0, "addedFunds": 0.0, "marginAccountCurrency": 1000.0, "marginAssetCurrency": 1000.0, "remainingUnits": 10.5, "remainingContracts": 10.5, "stopLossRate": 1.2, "takeProfitRate": 1.5, "openingData": { "openTime": "2024-01-01T09:00:00Z", "orderId": 5001, "executionTime": "2024-01-01T09:00:01Z", "units": 10.5, "contracts": null, "avgPrice": 95.238095, "avgConversionRate": 1.0, "marketSpread": 0.0002, "markup": 0.0, "priceId": 9876543210, "fees": 2.5, "taxes": 0.0 } } ], "requestTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-01T09:00:01Z", "openActionType": "customer", "requestType": "byUnits" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Order not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/eligibility": { "post": { "tags": [ "Trading Real" ], "summary": "Check trading permissions, limits, and available leverage for one or more instruments", "description": "Returns per-instrument trading configuration for the authenticated account - position limits, permitted order types, stop-loss and take-profit boundaries, and available leverage by settlement type and direction. Instruments not found are listed in notFoundInstrumentIds and notFoundSymbols. At least one of instrumentIds or symbols must be supplied; the combined length must not exceed 100 instruments.", "operationId": "getInstrumentEligibility", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "31ce2517-9c7f-4592-9621-c022bc40c76b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityRequest" }, "example": { "instrumentIds": [ 1001 ], "symbols": [ "AAPL" ], "currency": "USD" } } } }, "responses": { "200": { "description": "Eligibility resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityResponse" }, "example": { "currency": "USD", "eligibilities": [ { "instrumentId": 1001, "symbol": "AAPL", "minPositionExposure": 50.0, "maxUnitsPerOrder": 10000.0, "allowOpenPosition": true, "allowClosePosition": true, "allowPartialClosePosition": true, "allowMitOrders": true, "allowEntryOrders": false, "allowExitOrders": false, "allowTrailingStopLoss": true, "requiresW8Ben": null, "unitsQuantityType": "FractionalUnits", "orderFillBehaviorType": "BestEffort", "allowedOrderQuantityType": "Both", "tradeUnitType": "Units", "initialMarginInAssetCurrency": null, "stopLossMarginInAssetCurrency": null, "additionalBufferPercent": null, "leverageConfigs": [ { "settlementType": "CFD", "direction": "LONG", "leverageValues": [ 1, 2, 5 ], "isPotential": false, "minPositionAmount": 50.0, "allowEditStopLoss": true, "minStopLossPercentage": 5.0, "maxStopLossPercentage": 50.0, "defaultStopLossPercentage": 50.0, "allowEditTakeProfit": true, "minTakeProfitPercentage": 5.0, "maxTakeProfitPercentage": 1000.0, "defaultTakeProfitPercentage": 1000.0, "allowStopLossTakeProfit": true } ] } ], "notFoundInstrumentIds": [], "notFoundSymbols": [] } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v2/trading/info/orders:lookup": { "get": { "tags": [ "Trading Real" ], "summary": "Get Order Information and Position Details for Real Account", "description": "Retrieves comprehensive information about a specific order, including the order status, execution details, and all positions that were opened or closed from this order. This endpoint is essential for tracking order execution and identifying which positions were created as a result of a specific order request. The response includes detailed position information with PositionID values that can be used to query position-specific details. Provide exactly one of orderId or referenceId.", "operationId": "lookupRealOrder", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "7e94ff5d-a987-4e52-991d-72b95b90b3d1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "query", "description": "Numeric order identifier. Mutually exclusive with referenceId.", "schema": { "type": "integer", "format": "int64" } }, { "name": "referenceId", "in": "query", "description": "Request ID header sent during order submission. Mutually exclusive with orderId.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Order information retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrderInfoResponse" }, "example": { "accountId": 7765437, "gcid": 987654321, "portfolioId": 1, "orderId": 13902598, "action": "open", "transaction": "buy", "type": "mkt", "etoroOrderTypeId": 17, "status": { "id": 1, "name": "Executed", "errorCode": 0, "errorMessage": null }, "asset": { "symbol": "AAPL", "instrumentId": 101, "currency": "USD", "settlementType": "cfd", "leverage": 2, "side": "long" }, "orderCurrency": "usd", "requestedAmount": 1000.0, "requestedUnits": null, "requestedContracts": null, "frozenAmount": 1002.5, "requestedTriggerRate": null, "openStopLossRate": 1.2, "openTakeProfitRate": 1.5, "stopLossType": "fixed", "totalCosts": 2.5, "positionsToClose": [], "positionExecutions": [ { "positionId": 9001, "state": "open", "investedAmountCurrency": 1000, "initialExposureAccountCurrency": 1000.0, "initialExposureAssetCurrency": 1000.0, "addedFunds": 0.0, "marginAccountCurrency": 1000.0, "marginAssetCurrency": 1000.0, "remainingUnits": 10.5, "remainingContracts": 10.5, "stopLossRate": 1.2, "takeProfitRate": 1.5, "openingData": { "openTime": "2024-01-01T09:00:00Z", "orderId": 5001, "executionTime": "2024-01-01T09:00:01Z", "units": 10.5, "contracts": null, "avgPrice": 95.238095, "avgConversionRate": 1.0, "marketSpread": 0.0002, "markup": 0.0, "priceId": 9876543210, "fees": 2.5, "taxes": 0.0 } } ], "requestTime": "2024-01-01T09:00:00Z", "lastUpdate": "2024-01-01T09:00:01Z", "openActionType": "customer", "requestType": "byUnits" } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Order not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } } } }, "/api/v1/trading/execution/demo/limit-orders": { "post": { "tags": [ "Deprecated" ], "summary": "Places a Market-if-touched order (similar to Limit order) to open a position when a threshold price is reached.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nA Market-if-touched order is an order to open a new long or short position when a specific price or better appears in the Market. The price threshold is used to trigger a Market Order. This endpoint allows traders to set up Market-if-touched orders with parameters like leverage, stop-loss, and take-profit settings.", "operationId": "openLimitOrderDemo", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument." }, "IsBuy": { "type": "boolean", "description": "Indicates whether the order will open a long (true) or short (false) position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage ratio for the order." }, "Amount": { "type": "number", "format": "double", "nullable": true, "description": "The amount of the trade in the account currency [USD]. Required if AmountInUnits is not provided." }, "AmountInUnits": { "type": "number", "format": "double", "nullable": true, "description": "The number of units of the asset. Required if Amount is not provided. For most assets this can be a fractional number. Note that for Future Contracts this number should indicate the number of underlying units, and not the number of contracts, according to the formula: AmountInUnits = contract multiplier * number of contracts." }, "StopLossRate": { "type": "number", "format": "double", "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "Rate": { "type": "number", "format": "double", "description": "The trigger price at which a Market order to open the position will be sent for execution. The trigger price must be better than the current price. This means that the trigger price must be lower than current price for Long positions, and higher than current price for Short positions." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsDiscounted": { "type": "boolean", "nullable": true, "description": "SHOULD NOT BE EXTERNALZIED" }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "Indicates if stop-loss is disabled." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "Indicates if take-profit is disabled." }, "CID": { "type": "integer", "format": "int32", "description": "SHOULD NOT BE EXTERNALIZED." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Market-if-touched order successfully placed. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order creation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "26fab899-92be-42c8-9d60-ca63bc08cd14" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/execution/demo/limit-orders/{orderId}": { "delete": { "tags": [ "Deprecated" ], "summary": "Cancels a Market-if-touched order that has not yet been executed.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to cancel a Market-if-touched order before it is executed. Once canceled, the order will no longer be processed.", "operationId": "cancelLimitOrderDemo", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "ba08e8a6-1a49-450e-8f4f-15fe111976d1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the Market-if-touched order to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the Market-if-touched order. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/execution/demo/market-open-orders/by-amount": { "post": { "tags": [ "Deprecated" ], "summary": "Create a market order to open a position by specifying the amount of cash you would like to use in the trade.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to place a market order to open a position by specifying the investment amount instead of specifying the number of units. The trade will be executed at the market price, and leverage, stop-loss, and take-profit settings can be applied.", "operationId": "openMarketPositionByAmountDemo", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument to trade." }, "IsBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier for the trade." }, "Amount": { "type": "number", "format": "double", "description": "The amount of money to invest in the trade." }, "StopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "True if no stop-loss is set for this order." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "True if no take-profit is set for this order." } }, "required": [ "InstrumentID", "IsBuy", "Leverage", "Amount" ] } } } }, "responses": { "200": { "description": "Successfully opened a market order.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForOpen": { "type": "object", "properties": { "instrumentID": { "type": "integer", "description": "The ID of the traded instrument." }, "amount": { "type": "integer", "description": "The invested amount." }, "isBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "leverage": { "type": "integer", "description": "The leverage applied to the trade." }, "stopLossRate": { "type": "integer", "description": "The stop-loss threshold rate, if applicable." }, "takeProfitRate": { "type": "integer", "description": "The take-profit thereshold rate, if applicable." }, "isTslEnabled": { "type": "boolean", "description": "Indicates if trailing stop-loss is enabled." }, "mirrorID": { "type": "integer", "description": "ID related to mirrored trades, if applicable." }, "totalExternalCosts": { "type": "integer", "description": "Total external costs associated with opening the trade." }, "orderID": { "type": "integer", "description": "The unique order identifier." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the order." }, "CID": { "type": "integer", "description": "Customer ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was opened." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The last update timestamp of the order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the order." } } }, "example": { "orderForOpen": { "instrumentID": 100000, "amount": 150, "isBuy": true, "leverage": 1, "stopLossRate": 0, "takeProfitRate": 0, "isTslEnabled": false, "mirrorID": 0, "totalExternalCosts": 0, "orderID": 13902598, "orderType": 17, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T15:47:15.9370502Z", "lastUpdate": "2025-04-02T15:47:15.9370502Z" }, "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "eff9aecd-c392-45be-b379-dfc16a2da2e7" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/execution/demo/market-open-orders/by-units": { "post": { "tags": [ "Deprecated" ], "summary": "Places a Market Order to open a position by specifying the number of units you would like to trade.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to place a market order to open a position by specifying the number of units (rather than an amount in cash). The trade is executed at the current market price, and optional settings like leverage, stop-loss, and take-profit can be applied.", "operationId": "openMarketPositionByUnitsDemo", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument to trade." }, "IsBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier for the trade." }, "AmountInUnits": { "type": "number", "format": "double", "description": "The number of units of the asset. Required if Amount is not provided. For most assets this can be a fractional number. Note that for Future Contracts this number should indicate the number of underlying units, and not the number of contracts, according to the formula: AmountInUnits = contract multiplier * number of contracts." }, "StopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "True if no stop-loss is set for this order." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "True if no take-profit is set for this order." } }, "required": [ "InstrumentID", "IsBuy", "Leverage", "AmountInUnits" ] } } } }, "responses": { "200": { "description": "Successfully opened a market order.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForOpen": { "type": "object", "properties": { "instrumentID": { "type": "integer", "description": "The ID of the traded instrument." }, "amount": { "type": "integer", "description": "The amount invested in the trade." }, "amountInUnits": { "type": "number", "format": "double", "description": "The number of units traded." }, "isBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "leverage": { "type": "integer", "description": "The leverage applied to the trade." }, "stopLossRate": { "type": "integer", "description": "The stop-loss threshold rate, if applicable." }, "takeProfitRate": { "type": "integer", "description": "The take-profit thereshold rate, if applicable." }, "isTslEnabled": { "type": "boolean", "description": "Indicates if trailing stop-loss is enabled." }, "mirrorID": { "type": "integer", "description": "ID related to mirrored trades, if applicable." }, "totalExternalCosts": { "type": "integer", "description": "Total external costs associated with the trade." }, "lotCount": { "type": "integer", "description": "The number of lots in the order." }, "orderID": { "type": "integer", "description": "The unique order identifier." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the order." }, "CID": { "type": "integer", "description": "Customer Account ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was opened." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The last update timestamp of the order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the order." } } }, "example": { "orderForOpen": { "instrumentID": 100000, "amount": 0, "amountInUnits": 0.001, "isBuy": true, "leverage": 1, "stopLossRate": 0, "takeProfitRate": 0, "isTslEnabled": false, "mirrorID": 0, "totalExternalCosts": 0, "lotCount": 0, "orderID": 13906629, "orderType": 18, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T15:56:50.7496838Z", "lastUpdate": "2025-04-02T15:56:50.7496838Z" }, "token": "43ceb769-cff6-45ec-8ad7-292b7401353f" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "f4ce3033-f7d7-426d-96b4-f261ef64c05e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/execution/demo/market-open-orders/{orderId}": { "delete": { "tags": [ "Deprecated" ], "summary": "Cancels a market order for open before it is executed.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to cancel a market order for open before execution. If the order has already been processed, cancellation will not be possible.", "operationId": "cancelOpenMarketOrderDemo", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "a8518935-f0d8-49d8-9c15-c04a665da4dd" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the market order for open to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the pending market order. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/execution/limit-orders": { "post": { "tags": [ "Deprecated" ], "summary": "Places a Market-if-touched order (similar to Limit order) to open a position when a threshold price is reached.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nA Market-if-touched order is an order to open a new long or short position when a specific price or better appears in the Market. The price threshold is used to trigger a Market Order. This endpoint allows traders to set up Market-if-touched orders with parameters like leverage, stop-loss, and take-profit settings.", "operationId": "openLimitOrder", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument." }, "IsBuy": { "type": "boolean", "description": "Indicates whether the order will open a long (true) or short (false) position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage ratio for the order." }, "Amount": { "type": "number", "format": "double", "nullable": true, "description": "The amount of the trade in the account currency [USD]. Required if AmountInUnits is not provided." }, "AmountInUnits": { "type": "number", "format": "double", "nullable": true, "description": "The number of units of the asset. Required if Amount is not provided. For most assets this can be a fractional number. Note that for Future Contracts this number should indicate the number of underlying units, and not the number of contracts, according to the formula: AmountInUnits = contract multiplier * number of contracts." }, "StopLossRate": { "type": "number", "format": "double", "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "Rate": { "type": "number", "format": "double", "description": "The trigger price at which a Market order to open the position will be sent for execution. The trigger price must be better than the current price. This means that the trigger price must be lower than current price for Long positions, and higher than current price for Short positions." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsDiscounted": { "type": "boolean", "nullable": true, "description": "SHOULD NOT BE EXTERNALZIED" }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "Indicates if stop-loss is disabled." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "Indicates if take-profit is disabled." }, "CID": { "type": "integer", "format": "int32", "description": "SHOULD NOT BE EXTERNALIZED." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Market-if-touched order successfully placed. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order creation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "4e1e6a7c-018b-4e17-8ade-3006f9b54d2b" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/execution/limit-orders/{orderId}": { "delete": { "tags": [ "Deprecated" ], "summary": "Cancels a Market-if-touched order that has not yet been executed.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to cancel a Market-if-touched order before it is executed. Once canceled, the order will no longer be processed.", "operationId": "cancelLimitOrder", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "c381880f-7d0c-4346-82c1-2329d468720e" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the Market-if-touched order to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the Market-if-touched order. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/execution/market-open-orders/by-amount": { "post": { "tags": [ "Deprecated" ], "summary": "Create a market order to open a position by specifying the amount of cash you would like to use in the trade.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to place a market order to open a position by specifying the investment amount instead of specifying the number of units. The trade will be executed at the market price, and leverage, stop-loss, and take-profit settings can be applied.", "operationId": "openMarketPositionByAmount", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument to trade." }, "IsBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier for the trade." }, "Amount": { "type": "number", "format": "double", "description": "The amount of money to invest in the trade." }, "StopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "True if no stop-loss is set for this order." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "True if no take-profit is set for this order." } }, "required": [ "InstrumentID", "IsBuy", "Leverage", "Amount" ] } } } }, "responses": { "200": { "description": "Successfully opened a market order.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForOpen": { "type": "object", "properties": { "instrumentID": { "type": "integer", "description": "The ID of the traded instrument." }, "amount": { "type": "integer", "description": "The invested amount." }, "isBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "leverage": { "type": "integer", "description": "The leverage applied to the trade." }, "stopLossRate": { "type": "integer", "description": "The stop-loss threshold rate, if applicable." }, "takeProfitRate": { "type": "integer", "description": "The take-profit thereshold rate, if applicable." }, "isTslEnabled": { "type": "boolean", "description": "Indicates if trailing stop-loss is enabled." }, "mirrorID": { "type": "integer", "description": "ID related to mirrored trades, if applicable." }, "totalExternalCosts": { "type": "integer", "description": "Total external costs associated with opening the trade." }, "orderID": { "type": "integer", "description": "The unique order identifier." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the order." }, "CID": { "type": "integer", "description": "Customer ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was opened." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The last update timestamp of the order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the order." } } }, "example": { "orderForOpen": { "instrumentID": 100000, "amount": 150, "isBuy": true, "leverage": 1, "stopLossRate": 0, "takeProfitRate": 0, "isTslEnabled": false, "mirrorID": 0, "totalExternalCosts": 0, "orderID": 13902598, "orderType": 17, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T15:47:15.9370502Z", "lastUpdate": "2025-04-02T15:47:15.9370502Z" }, "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "7a83a55e-139d-4e88-9450-baa64cf75715" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/execution/market-open-orders/by-units": { "post": { "tags": [ "Deprecated" ], "summary": "Places a Market Order to open a position by specifying the number of units you would like to trade.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to place a market order to open a position by specifying the number of units (rather than an amount in cash). The trade is executed at the current market price, and optional settings like leverage, stop-loss, and take-profit can be applied.", "operationId": "openMarketPositionByUnits", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "InstrumentID": { "type": "integer", "format": "int32", "description": "The unique identifier of the financial instrument to trade." }, "IsBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "Leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier for the trade." }, "AmountInUnits": { "type": "number", "format": "double", "description": "The number of units of the asset. Required if Amount is not provided. For most assets this can be a fractional number. Note that for Future Contracts this number should indicate the number of underlying units, and not the number of contracts, according to the formula: AmountInUnits = contract multiplier * number of contracts." }, "StopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "TakeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "IsTslEnabled": { "type": "boolean", "nullable": true, "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "IsNoStopLoss": { "type": "boolean", "nullable": true, "description": "True if no stop-loss is set for this order." }, "IsNoTakeProfit": { "type": "boolean", "nullable": true, "description": "True if no take-profit is set for this order." } }, "required": [ "InstrumentID", "IsBuy", "Leverage", "AmountInUnits" ] } } } }, "responses": { "200": { "description": "Successfully opened a market order.", "content": { "application/json": { "schema": { "type": "object", "properties": { "orderForOpen": { "type": "object", "properties": { "instrumentID": { "type": "integer", "description": "The ID of the traded instrument." }, "amount": { "type": "integer", "description": "The amount invested in the trade." }, "amountInUnits": { "type": "number", "format": "double", "description": "The number of units traded." }, "isBuy": { "type": "boolean", "description": "True for a long position, false for a short position." }, "leverage": { "type": "integer", "description": "The leverage applied to the trade." }, "stopLossRate": { "type": "integer", "description": "The stop-loss threshold rate, if applicable." }, "takeProfitRate": { "type": "integer", "description": "The take-profit thereshold rate, if applicable." }, "isTslEnabled": { "type": "boolean", "description": "Indicates if trailing stop-loss is enabled." }, "mirrorID": { "type": "integer", "description": "ID related to mirrored trades, if applicable." }, "totalExternalCosts": { "type": "integer", "description": "Total external costs associated with the trade." }, "lotCount": { "type": "integer", "description": "The number of lots in the order." }, "orderID": { "type": "integer", "description": "The unique order identifier." }, "orderType": { "type": "integer", "description": "The type of order executed." }, "statusID": { "type": "integer", "description": "The status of the order." }, "CID": { "type": "integer", "description": "Customer Account ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was opened." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The last update timestamp of the order." } } }, "token": { "type": "string", "format": "uuid", "description": "A unique confirmation token for the order." } } }, "example": { "orderForOpen": { "instrumentID": 100000, "amount": 0, "amountInUnits": 0.001, "isBuy": true, "leverage": 1, "stopLossRate": 0, "takeProfitRate": 0, "isTslEnabled": false, "mirrorID": 0, "totalExternalCosts": 0, "lotCount": 0, "orderID": 13906629, "orderType": 18, "statusID": 1, "CID": 7765437, "openDateTime": "2025-04-02T15:56:50.7496838Z", "lastUpdate": "2025-04-02T15:56:50.7496838Z" }, "token": "43ceb769-cff6-45ec-8ad7-292b7401353f" } } } } }, "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "44c91841-9144-46bc-8320-957315279427" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/execution/market-open-orders/{orderId}": { "delete": { "tags": [ "Deprecated" ], "summary": "Cancels a market order for open before it is executed.", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nThis endpoint allows traders to cancel a market order for open before execution. If the order has already been processed, cancellation will not be possible.", "operationId": "cancelOpenMarketOrder", "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "99871678-c1cc-4c89-9a72-903e0e6529d1" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "description": "The unique identifier of the market order for open to be canceled." } ], "responses": { "200": { "description": "Successfully canceled the pending market order. The response includes a confirmation token.", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "format": "uuid", "description": "A confirmation token indicating the order cancellation." } }, "required": [ "token" ] }, "example": { "token": "9af05785-be29-482d-a892-9d9be4fd34bc" } } } } }, "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/info/demo/orders/{orderId}": { "get": { "tags": [ "Deprecated" ], "summary": "Get Order Information and Position Details for Demo Account", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nRetrieves comprehensive information about a specific order for opening a position, including the order status, execution details, and all positions that were opened from this order. This endpoint is essential for tracking order execution and identifying which positions were created as a result of a specific order request. The response includes detailed position information with PositionID values that can be used to query position-specific details.", "operationId": "getDemoOrderForOpenInfo", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "d2821231-fe26-4031-9c20-337104b4efaa" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "description": "The unique identifier of the order for opening a position. This is the OrderID that was returned when the order was initially created.", "schema": { "type": "integer", "format": "int64" }, "example": 123456789 } ], "responses": { "200": { "description": "Successfully retrieved order information and associated position details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderForOpenInfoResponse" }, "example": { "token": "550e8400-e29b-41d4-a716-446655440000", "orderID": 123456789, "cid": 987654321, "statusID": 1, "orderType": 1, "openActionType": 1, "errorCode": null, "errorMessage": null, "instrumentID": 67890, "amount": 1000.0, "units": 10.5, "requestOccurred": "2024-01-15T10:30:00Z", "positions": [ { "positionID": 9876543210, "orderType": 1, "occurred": "2024-01-15T10:30:15Z", "rate": 1.2345, "units": 10.5, "conversionRate": 1.0, "amount": 1000.0, "isOpen": true } ] } } } }, "400": { "description": "Bad Request - Invalid orderId format, or validation error occurred." }, "404": { "description": "Not Found - The specified order was not found for the provided OrderID." }, "500": { "description": "Internal Server Error - An unexpected error occurred while processing the request." } }, "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/info/real/orders/{orderId}": { "get": { "tags": [ "Deprecated" ], "summary": "Get Order Information and Position Details for Real Account", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nRetrieves comprehensive information about a specific order for opening a position, including the order status, execution details, and all positions that were opened from this order. This endpoint is essential for tracking order execution and identifying which positions were created as a result of a specific order request. The response includes detailed position information with PositionID values that can be used to query position-specific details.", "operationId": "getRealOrderForOpenInfo", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "67a6927c-4349-40a3-9c31-c98b26f4b863" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." }, { "name": "orderId", "in": "path", "required": true, "description": "The unique identifier of the order for opening a position. This is the OrderID that was returned when the order was initially created.", "schema": { "type": "integer", "format": "int64" }, "example": 123456789 } ], "responses": { "200": { "description": "Successfully retrieved order information and associated position details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderForOpenInfoResponse" }, "example": { "token": "550e8400-e29b-41d4-a716-446655440000", "orderID": 123456789, "cid": 987654321, "statusID": 1, "orderType": 1, "openActionType": 1, "errorCode": null, "errorMessage": null, "instrumentID": 67890, "amount": 1000.0, "units": 10.5, "requestOccurred": "2024-01-15T10:30:00Z", "positions": [ { "positionID": 9876543210, "orderType": 1, "occurred": "2024-01-15T10:30:15Z", "rate": 1.2345, "units": 10.5, "conversionRate": 1.0, "amount": 1000.0, "isOpen": true } ] } } } }, "400": { "description": "Bad Request - Invalid orderId format, or validation error occurred." }, "404": { "description": "Not Found - The specified order was not found for the provided OrderID." }, "500": { "description": "Internal Server Error - An unexpected error occurred while processing the request." } }, "deprecated": true, "x-original-tags": [ "Trading Real" ] } }, "/api/v1/trading/info/demo/eligibility": { "post": { "tags": [ "Deprecated" ], "summary": "Check trading permissions, limits, and available leverage for one or more instruments", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nReturns per-instrument trading configuration for the authenticated account - position limits, permitted order types, stop-loss and take-profit boundaries, and available leverage by settlement type and direction. Instruments not found are listed in notFoundInstrumentIds and notFoundSymbols. At least one of instrumentIds or symbols must be supplied; the combined length must not exceed 100 instruments.", "operationId": "getInstrumentEligibilityDemoDeprecated", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "21e80d1f-5f99-4f93-b337-5f5e63582279" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityRequest" }, "example": { "instrumentIds": [ 1001 ], "symbols": [ "AAPL" ], "currency": "USD" } } } }, "responses": { "200": { "description": "Eligibility resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityResponse" }, "example": { "currency": "USD", "eligibilities": [ { "instrumentId": 1001, "symbol": "AAPL", "minPositionExposure": 50.0, "maxUnitsPerOrder": 10000.0, "allowOpenPosition": true, "allowClosePosition": true, "allowPartialClosePosition": true, "allowMitOrders": true, "allowEntryOrders": false, "allowExitOrders": false, "allowTrailingStopLoss": true, "requiresW8Ben": null, "unitsQuantityType": "FractionalUnits", "orderFillBehaviorType": "BestEffort", "allowedOrderQuantityType": "Both", "tradeUnitType": "Units", "initialMarginInAssetCurrency": null, "stopLossMarginInAssetCurrency": null, "additionalBufferPercent": null, "leverageConfigs": [ { "settlementType": "CFD", "direction": "LONG", "leverageValues": [ 1, 2, 5 ], "isPotential": false, "minPositionAmount": 50.0, "allowEditStopLoss": true, "minStopLossPercentage": 5.0, "maxStopLossPercentage": 50.0, "defaultStopLossPercentage": 50.0, "allowEditTakeProfit": true, "minTakeProfitPercentage": 5.0, "maxTakeProfitPercentage": 1000.0, "defaultTakeProfitPercentage": 1000.0, "allowStopLossTakeProfit": true } ] } ], "notFoundInstrumentIds": [], "notFoundSymbols": [] } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } }, "deprecated": true, "x-original-tags": [ "Trading Demo" ] } }, "/api/v1/trading/info/eligibility": { "post": { "tags": [ "Deprecated" ], "summary": "Check trading permissions, limits, and available leverage for one or more instruments", "description": "Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.\n\nReturns per-instrument trading configuration for the authenticated account - position limits, permitted order types, stop-loss and take-profit boundaries, and available leverage by settlement type and direction. Instruments not found are listed in notFoundInstrumentIds and notFoundSymbols. At least one of instrumentIds or symbols must be supplied; the combined length must not exceed 100 instruments.", "operationId": "getInstrumentEligibilityDeprecated", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "x-request-id", "in": "header", "required": true, "schema": { "type": "string", "format": "uuid", "example": "b8990cdd-54f3-4a3b-89c1-7a9486f6fdc9" }, "description": "A unique request identifier." }, { "name": "x-api-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663" }, "description": "API key for authentication." }, { "name": "x-user-key", "in": "header", "required": true, "schema": { "type": "string", "format": "password", "example": "eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_" }, "description": "User-specific authentication key." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityRequest" }, "example": { "instrumentIds": [ 1001 ], "symbols": [ "AAPL" ], "currency": "USD" } } } }, "responses": { "200": { "description": "Eligibility resolved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstrumentEligibilityResponse" }, "example": { "currency": "USD", "eligibilities": [ { "instrumentId": 1001, "symbol": "AAPL", "minPositionExposure": 50.0, "maxUnitsPerOrder": 10000.0, "allowOpenPosition": true, "allowClosePosition": true, "allowPartialClosePosition": true, "allowMitOrders": true, "allowEntryOrders": false, "allowExitOrders": false, "allowTrailingStopLoss": true, "requiresW8Ben": null, "unitsQuantityType": "FractionalUnits", "orderFillBehaviorType": "BestEffort", "allowedOrderQuantityType": "Both", "tradeUnitType": "Units", "initialMarginInAssetCurrency": null, "stopLossMarginInAssetCurrency": null, "additionalBufferPercent": null, "leverageConfigs": [ { "settlementType": "CFD", "direction": "LONG", "leverageValues": [ 1, 2, 5 ], "isPotential": false, "minPositionAmount": 50.0, "allowEditStopLoss": true, "minStopLossPercentage": 5.0, "maxStopLossPercentage": 50.0, "defaultStopLossPercentage": 50.0, "allowEditTakeProfit": true, "minTakeProfitPercentage": 5.0, "maxTakeProfitPercentage": 1000.0, "defaultTakeProfitPercentage": 1000.0, "allowStopLossTakeProfit": true } ] } ], "notFoundInstrumentIds": [], "notFoundSymbols": [] } } } }, "400": { "description": "Invalid request. Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Unauthorized. Invalid or missing authentication.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal server error." } }, "deprecated": true, "x-original-tags": [ "Trading Real" ] } } }, "components": { "schemas": { "PublicAggregatedInfoResponse": { "type": "object", "description": "Container for the aggregated user information response", "properties": { "users": { "type": "array", "description": "Array of user profiles with their associated information", "items": { "$ref": "#/components/schemas/PublicAggregatedInfoUser" } } } }, "PublicAggregatedInfoUser": { "type": "object", "description": "Comprehensive user profile information including account details, verification status, and preferences", "properties": { "gcid": { "type": "integer", "description": "Global Customer ID - Unique identifier across all systems" }, "realCID": { "type": "integer", "description": "Customer ID for real trading account" }, "demoCID": { "type": "integer", "nullable": true, "description": "Customer ID for demo/practice account if available" }, "username": { "type": "string", "description": "Unique username identifier for the user" }, "language": { "type": "integer", "nullable": true, "description": "User's preferred language ID based on system language codes" }, "languageIsoCode": { "type": "string", "description": "ISO 639-1 language code for user's preferred language" }, "country": { "type": "integer", "nullable": true, "description": "User's registered country ID based on system country codes" }, "allowDisplayFullName": { "type": "boolean", "description": "Indicates whether the user has consented to displaying their full name publicly" }, "userBio": { "$ref": "#/components/schemas/PublicAggregatedInfoUiUserBio", "description": "Structured biographical information including trading strategy" }, "whiteLabel": { "type": "integer", "nullable": true, "description": "White label partner identifier if user belongs to a partner program" }, "optOut": { "type": "boolean", "description": "Indicates if user has opted out of public profile features" }, "homepage": { "type": "integer", "nullable": true }, "playerStatus": { "type": "integer", "nullable": true }, "piLevel": { "type": "integer", "nullable": true }, "isPi": { "type": "boolean", "description": "Indicates if user is a Professional Investor with special privileges" }, "avatars": { "type": "array", "items": { "$ref": "#/components/schemas/PublicAggregatedInfoUiUserAvatar" } }, "masterAccountCid": { "type": "integer", "nullable": true }, "accountType": { "type": "integer", "nullable": true }, "fundType": { "type": "string", "nullable": true }, "isVerified": { "type": "boolean" }, "verificationLevel": { "type": "integer", "description": "User's current verification level (0-3, where 3 is fully verified)" }, "accountStatus": { "type": "integer", "nullable": true, "description": "Current account status code indicating active, suspended, or other states" }, "gdprInfo": { "type": "object", "nullable": true, "properties": { "accountStatus": { "$ref": "#/components/schemas/PublicAggregatedInfoAccountStatus" }, "playerStatus": { "$ref": "#/components/schemas/PublicAggregatedInfoPlayerStatus" }, "playerStatusReason": { "$ref": "#/components/schemas/PublicAggregatedInfoPlayerStatusReason" } } }, "firstName": { "type": "string", "nullable": true, "description": "User's first name (visible if allowDisplayFullName is true)" }, "middleName": { "type": "string", "nullable": true, "description": "User's middle name" }, "lastName": { "type": "string", "nullable": true, "description": "User's last name (visible if allowDisplayFullName is true)" }, "aboutMe": { "type": "string", "nullable": true, "description": "User's full about me text" }, "aboutMeShort": { "type": "string", "nullable": true, "description": "Short summary of user's about me text" }, "customerRestrictions": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "CID": { "type": "integer", "description": "Customer ID" }, "restrictionTypeID": { "type": "integer", "description": "Type of restriction" }, "reasonID": { "type": "integer", "description": "Reason for restriction" }, "occured": { "type": "string", "format": "date-time", "description": "When the restriction occurred" } } }, "description": "List of customer restrictions applied to the account" }, "userFlowSignature": { "type": "string" } } }, "PublicAggregatedInfoUiUserBio": { "type": "object", "properties": { "gcid": { "type": "integer" }, "languageCode": { "type": "string", "nullable": true }, "aboutMe": { "type": "string", "nullable": true, "description": "User's full about me text" }, "aboutMeShort": { "type": "string", "nullable": true, "description": "Short summary of user's about me text" }, "strategyID": { "type": "integer", "nullable": true, "description": "ID of the user's trading strategy" } } }, "PublicAggregatedInfoUiUserAvatar": { "type": "object", "properties": { "url": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "type": { "type": "string", "enum": [ "Original", "OriginalCropped", "Resized", "Retouched" ], "description": "Type of avatar image" } } }, "PublicAggregatedInfoAccountStatus": { "type": "integer", "enum": [ 1, 2 ], "x-enumNames": [ "Open", "Closed" ], "nullable": true }, "PublicAggregatedInfoPlayerStatus": { "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], "x-enumNames": [ "Normal", "Blocked", "ChatBlocked", "BlockedUponRequest", "Warning", "BlockedUnderInvestigation", "ScalpersBlock", "BlockedPayPalInvestigation", "TradeBlock", "DepositBlocked", "SocialIndex", "CopyBlock", "PendingVerification", "BlockedFailedVerification", "BlockTrading" ], "nullable": true }, "PublicAggregatedInfoPlayerStatusReason": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 ], "x-enumNames": [ "None", "FailedVerification", "ExpiredDocument", "CloseAccountByUser", "Risk", "Chargeback", "AMLAccountClosed", "HRC", "Underage", "Deceased", "AML", "AMLreview", "OffMarketAbuse", "Overpayment", "RiskCheck", "ThirdParty", "PayPalInvestigation", "NOC_NOF_RFI", "WCHMatch", "Other", "RightToBeForgotten", "SelfService", "ByRequest", "ACHChargeback", "PWMBChargeback", "Abuse", "AffiliateAccount", "PendingDocs", "EmployeeAccount", "PIAccount", "CheckoutChargeback", "CheckoutRetrievel", "CheckoutCaptureDecline", "EToroMoneyRestriction", "AbusiveTrading", "HackedAccount", "PartnersAndPIs", "CS_ManagementDecision", "Deposits", "KYC", "AccountClosed", "Tax", "Corporate" ], "nullable": true }, "RankingPeriod": { "type": "string", "enum": [ "CurrMonth", "OneMonthAgo", "TwoMonthsAgo", "CurrQuarter", "ThreeMonthsAgo", "SixMonthsAgo", "CurrYear", "OneYearAgo", "LastYear", "LastTwoYears" ] }, "AssetsHistoryResponse": { "type": "object", "required": [ "userName", "results" ], "properties": { "userName": { "type": "string", "description": "Echoes the requested username." }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/AssetsHistoryEntry" } } } }, "AssetsHistoryEntry": { "type": "object", "required": [ "date", "cashPct", "cashOfTotalEquityPct", "assets" ], "properties": { "date": { "type": "string", "format": "date", "description": "Date of this snapshot (YYYY-MM-DD)" }, "cashPct": { "type": "number", "description": "Cash/credit as a ratio of realized equity (cash + invested capital, excluding open P&L). Decimal fraction: 0.5 = 50%." }, "cashOfTotalEquityPct": { "type": "number", "description": "Cash/credit as a ratio of total equity (cash + invested capital + open P&L). Decimal fraction: 0.5 = 50%." }, "assets": { "type": "array", "description": "Per-instrument breakdown. Mirror allocations are excluded.", "items": { "$ref": "#/components/schemas/AssetsHistoryAsset" } } } }, "AssetsHistoryAsset": { "type": "object", "required": [ "instrumentId", "symbol", "investedPct", "valuePct" ], "properties": { "instrumentId": { "type": "integer" }, "symbol": { "type": "string", "description": "Trading symbol for this instrument (e.g. AAPL, TSLA)" }, "investedPct": { "type": "number", "description": "Amount invested in this instrument as a ratio of realized equity. Decimal fraction: 0.5 = 50%." }, "valuePct": { "type": "number", "description": "Current value of this instrument as a ratio of total equity. Decimal fraction: 0.5 = 50%." } } }, "Error": { "type": "object", "required": [ "success", "timestamp", "requestId" ], "properties": { "success": { "type": "boolean" }, "error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "details": { "type": "string" }, "field": { "type": "string" }, "value": { "type": "string" } } }, "timestamp": { "type": "string", "format": "date-time" }, "requestId": { "type": "string" } } }, "ProblemDetails": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } }, "additionalProperties": {} }, "AccountType": { "type": "string", "enum": [ "trading", "options", "cash" ] }, "candlesResponse": { "type": "object", "description": "Response containing historical price data in candlestick format", "properties": { "interval": { "type": "string", "description": "Time interval of the returned candles. Matches the interval parameter from the request.", "enum": [ "OneMinute", "FiveMinutes", "TenMinutes", "FifteenMinutes", "ThirtyMinutes", "OneHour", "FourHours", "OneDay", "OneWeek" ] }, "candles": { "type": "array", "description": "List of candle data grouped by instrument", "items": { "type": "object", "description": "Candle data for a specific instrument", "properties": { "instrumentId": { "type": "integer", "description": "Identifier of the instrument these candles belong to" }, "candles": { "type": "array", "description": "List of individual candles representing price action over time", "items": { "type": "object", "description": "Individual candle data point", "properties": { "instrumentID": { "type": "integer", "description": "Identifier of the instrument this candle belongs to" }, "fromDate": { "type": "string", "format": "date-time", "description": "Start time of the candle period in ISO 8601 format" }, "open": { "type": "number", "format": "float", "description": "Opening price at the start of the candle period" }, "high": { "type": "number", "format": "float", "description": "Highest price reached during the candle period" }, "low": { "type": "number", "format": "float", "description": "Lowest price reached during the candle period" }, "close": { "type": "number", "format": "float", "description": "Closing price at the end of the candle period" }, "volume": { "type": "number", "format": "float", "description": "Trading volume during the candle period" } } } }, "rangeOpen": { "type": "number", "format": "float", "description": "Opening price of the first candle in the range" }, "rangeClose": { "type": "number", "format": "float", "description": "Closing price of the last candle in the range" }, "rangeHigh": { "type": "number", "format": "float", "description": "Highest price across all candles in the range" }, "rangeLow": { "type": "number", "format": "float", "description": "Lowest price across all candles in the range" }, "volume": { "type": "number", "format": "float", "description": "Total trading volume across all candles in the range" } } } } } }, "closingPricesResponse": { "type": "array", "description": "List of closing prices for all instruments", "items": { "type": "object", "description": "Closing price information for a specific instrument", "properties": { "instrumentId": { "type": "integer", "description": "Unique identifier of the instrument" }, "officialClosingPrice": { "type": "number", "format": "float", "description": "Most recent official closing price for the instrument" }, "isMarketOpen": { "type": "boolean", "description": "Obsolete - Do not use" }, "closingPrices": { "type": "object", "description": "Historical closing prices at different time intervals", "properties": { "daily": { "type": "object", "description": "Official closing price from the previous trading day", "properties": { "price": { "type": "number", "format": "float", "description": "Closing price value" }, "date": { "type": "string", "format": "date-time", "description": "Date and time of the closing price in ISO 8601 format" } } }, "weekly": { "type": "object", "description": "Official closing price from the previous trading week", "properties": { "price": { "type": "number", "format": "float", "description": "Closing price value" }, "date": { "type": "string", "format": "date-time", "description": "Date and time of the closing price in ISO 8601 format" } } }, "monthly": { "type": "object", "description": "Official closing price from the previous trading month", "properties": { "price": { "type": "number", "format": "float", "description": "Closing price value. A value of -1 indicates no data available." }, "date": { "type": "string", "format": "date-time", "description": "Date and time of the closing price in ISO 8601 format. Default date (0001-01-01) indicates no data available." } } } } } } } }, "TncInfo": { "type": "object", "description": "Terms and conditions the client must show and the user must accept before withdrawal.", "required": [ "tncDocId", "url" ], "properties": { "tncDocId": { "type": "integer", "format": "int64", "description": "Identifier to send back on withdrawal creation.", "example": 12345 }, "url": { "type": "string", "description": "Link the client displays to user (webview/browser).", "example": "https://example.com/tnc/withdraw-crypto-from-trading" } } }, "PublicErrorResponse": { "type": "object", "description": "Error response with code and message.", "required": [ "errorCode", "errorMessage" ], "properties": { "errorCode": { "type": "string", "description": "Machine-readable error code.", "example": "GeneralError" }, "errorMessage": { "type": "string", "description": "Human-readable error message.", "example": "Internal server error. Please retry or contact support" } } }, "ScopeNameItem": { "type": "object", "properties": { "name": { "type": "string", "description": "The permission scope name.", "example": "etoro-public:trade.real:read" } } }, "GetAllowedScopesResponse": { "type": "object", "properties": { "scopes": { "type": "array", "items": { "$ref": "#/components/schemas/ScopeNameItem" }, "description": "The permission scope names that may be assigned to agent-portfolio user tokens.", "example": [ { "name": "etoro-public:trade.real:read" }, { "name": "etoro-public:trade.real:write" } ] } } }, "CreateAgentPortfolioV2Request": { "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" }, "scopeNames": { "type": "array", "items": { "type": "string" }, "description": "The set of permission scope names to grant to the provisioned user token. Available scopes: etoro-public:trade.real:read, etoro-public:trade.real:write, etoro-public:trade.demo:read, etoro-public:trade.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", "scopeNames" ] }, "CreateAgentPortfolioV2Response": { "type": "object", "properties": { "agentPortfolioId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created agent-portfolio.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "agentPortfolioName": { "type": "string", "description": "The display name assigned to the agent-portfolio.", "example": "MyPort1" }, "agentPortfolioGcid": { "type": "integer", "description": "The GCID associated with the agent-portfolio.", "example": 12345678 }, "agentPortfolioVirtualBalance": { "type": "number", "description": "The fixed virtual balance (in USD) that the agent-portfolio was funded with. The investmentAmountInUsd used to copy is proportional to this balance.", "example": 10000 }, "mirrorId": { "type": "integer", "description": "The Trading API mirror ID for this agent-portfolio's copy trade.", "example": 12345 }, "userTokens": { "type": "array", "items": { "$ref": "#/components/schemas/CreateAgentPortfolioV2UserTokenItem" }, "description": "The user tokens generated during agent-portfolio creation." } } }, "CreateAgentPortfolioV2UserTokenItem": { "type": "object", "properties": { "userTokenId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created user token.", "example": "f9e8d7c6-b5a4-3210-fedc-ba9876543210" }, "userToken": { "type": "string", "description": "The generated user token secret. Only available at creation time.", "example": "sk_live_a1b2c3d4e5f6..." }, "userTokenName": { "type": "string", "description": "The user-defined name for the user token.", "example": "my-trading-token" }, "clientId": { "type": "string", "format": "uuid", "description": "The OAuth client identifier associated with the user token.", "example": "c1d2e3f4-a5b6-7890-cdef-123456789abc" }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "The set of whitelisted IP addresses authorized to use this token.", "example": [ "192.168.1.1" ] }, "scopes": { "type": "array", "items": { "$ref": "#/components/schemas/ScopeNameItem" }, "description": "The permission scopes (by name) granted to this token.", "example": [ { "name": "etoro-public:trade.real:read" } ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "The expiration date and time of the user token in UTC.", "example": "2026-12-31T23:59:59Z" } } }, "CreateUserTokenV2Request": { "type": "object", "properties": { "userTokenName": { "type": "string", "description": "A human-readable name to identify the user token.", "example": "my-trading-token" }, "scopeNames": { "type": "array", "items": { "type": "string" }, "description": "The set of permission scope names to grant to this token. Available scopes: etoro-public:trade.real:read, etoro-public:trade.real:write, etoro-public:trade.demo:read, etoro-public:trade.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 this token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "An optional expiration date and time for the token in UTC.", "example": "2026-12-31T23:59:59Z" } }, "required": [ "userTokenName", "scopeNames" ] }, "UpdateUserTokenV2Request": { "type": "object", "properties": { "scopeNames": { "type": "array", "items": { "type": "string" }, "description": "An updated set of permission scope names for the token. Available scopes: etoro-public:trade.real:read, etoro-public:trade.real:write, etoro-public:trade.demo:read, etoro-public:trade.demo:write.", "example": [ "etoro-public:trade.real:read", "etoro-public:trade.real:write" ] }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "An updated set of IPv4 addresses allowed to use this token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "An updated expiration date and time (UTC) for the token.", "example": "2026-12-31T23:59:59Z" } } }, "ErrorResponse": { "type": "object", "properties": { "errorCode": { "type": "string" }, "errorMessage": { "type": "string" } } }, "GetAgentPortfoliosResponse": { "type": "object", "properties": { "agentPortfolios": { "type": "array", "items": { "$ref": "#/components/schemas/AgentPortfolioItem" }, "description": "The collection of agent-portfolios owned by the user." } } }, "AgentPortfolioItem": { "type": "object", "properties": { "agentPortfolioId": { "type": "string", "format": "uuid", "description": "The unique identifier of the agent-portfolio.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "agentPortfolioName": { "type": "string", "description": "The display name of the agent-portfolio.", "example": "MyPort1" }, "agentPortfolioGcid": { "type": "integer", "description": "The GCID associated with the agent-portfolio.", "example": 12345678 }, "agentPortfolioVirtualBalance": { "type": "number", "description": "The fixed virtual balance (in USD) that the agent-portfolio was funded with. The investmentAmountInUsd used to copy is proportional to this balance.", "example": 10000 }, "mirrorId": { "type": "integer", "description": "The Trading API mirror ID for this agent-portfolio's copy trade.", "example": 12345 }, "createdAt": { "type": "string", "format": "date-time", "description": "When this agent-portfolio was created.", "example": "2026-03-01T10:30:00+00:00" }, "userTokens": { "type": "array", "items": { "$ref": "#/components/schemas/AgentPortfolioUserTokenItem" }, "description": "The user tokens associated with this agent-portfolio." } } }, "AgentPortfolioUserTokenItem": { "type": "object", "properties": { "userTokenId": { "type": "string", "format": "uuid", "description": "The unique identifier of the user token.", "example": "f9e8d7c6-b5a4-3210-fedc-ba9876543210" }, "userTokenName": { "type": "string", "description": "The user-defined name for the user token.", "example": "my-trading-token" }, "clientId": { "type": "string", "format": "uuid", "description": "The OAuth client identifier associated with the user token.", "example": "c1d2e3f4-a5b6-7890-cdef-123456789abc" }, "externalApplicationName": { "type": "string", "description": "The name of the external application registered for this token.", "example": "Trading Bot v2" }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "The set of whitelisted IP addresses authorized to use this token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "The expiration date and time of the user token in UTC.", "example": "2026-12-31T23:59:59Z" }, "scopeIds": { "type": "array", "items": { "type": "integer" }, "deprecated": true, "description": "[DEPRECATED \u2014 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.", "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" ] }, "createdAt": { "type": "string", "format": "date-time", "description": "When this user token was created.", "example": "2026-03-01T10:30:00Z" } } }, "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" ] }, "CreateAgentPortfolioResponse": { "type": "object", "properties": { "agentPortfolioId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created agent-portfolio.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "agentPortfolioName": { "type": "string", "description": "The display name assigned to the agent-portfolio.", "example": "MyPort1" }, "agentPortfolioGcid": { "type": "integer", "description": "The GCID associated with the agent-portfolio.", "example": 12345678 }, "agentPortfolioVirtualBalance": { "type": "number", "description": "The fixed virtual balance (in USD) that the agent-portfolio was funded with. The investmentAmountInUsd used to copy is proportional to this balance.", "example": 10000 }, "mirrorId": { "type": "integer", "description": "The Trading API mirror ID for this agent-portfolio's copy trade.", "example": 12345 }, "userTokens": { "type": "array", "items": { "$ref": "#/components/schemas/CreateAgentPortfolioUserTokenItem" }, "description": "The user tokens generated during agent-portfolio creation." } } }, "CreateAgentPortfolioPartialResponse": { "type": "object", "properties": { "agentPortfolioId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created agent-portfolio.", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "agentPortfolioName": { "type": "string", "description": "The display name assigned to the agent-portfolio.", "example": "MyPort1" }, "agentPortfolioGcid": { "type": "integer", "description": "The GCID associated with the agent-portfolio.", "example": 12345678 }, "agentPortfolioVirtualBalance": { "type": "integer", "description": "The fixed virtual balance (in USD) that the agent-portfolio was funded with. The investmentAmountInUsd used to copy is proportional to this balance.", "example": 10000 }, "mirrorId": { "type": "integer", "description": "The Trading API mirror ID for this agent-portfolio's copy trade.", "example": 12345 }, "userTokenCreated": { "type": "boolean", "description": "Always false \u2014 indicates that the user token was not created.", "example": false } } }, "CreateAgentPortfolioUserTokenItem": { "type": "object", "properties": { "userTokenId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created user token.", "example": "f9e8d7c6-b5a4-3210-fedc-ba9876543210" }, "userToken": { "type": "string", "description": "The generated user token secret. Only available at creation time.", "example": "sk_live_a1b2c3d4e5f6..." }, "userTokenName": { "type": "string", "description": "The user-defined name for the user token.", "example": "my-trading-token" }, "clientId": { "type": "string", "format": "uuid", "description": "The OAuth client identifier associated with the user token.", "example": "c1d2e3f4-a5b6-7890-cdef-123456789abc" }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "The set of whitelisted IP addresses authorized to use this token.", "example": [ "192.168.1.1" ] }, "scopeIds": { "type": "array", "items": { "type": "integer" }, "deprecated": true, "description": "[DEPRECATED \u2014 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.", "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" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "The expiration date and time of the user token in UTC.", "example": "2026-12-31T23:59:59Z" } } }, "CreateUserTokenRequest": { "type": "object", "properties": { "userTokenName": { "type": "string", "description": "A human-readable name to identify the user token.", "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 this 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 this token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "An optional expiration date and time for the token in UTC.", "example": "2026-12-31T23:59:59Z" } }, "required": [ "userTokenName" ] }, "CreateUserTokenResponse": { "type": "object", "properties": { "userTokenId": { "type": "string", "format": "uuid", "description": "The unique identifier of the newly created user token.", "example": "f9e8d7c6-b5a4-3210-fedc-ba9876543210" }, "userToken": { "type": "string", "description": "The generated user token secret. Only available at creation time.", "example": "sk_live_a1b2c3d4e5f6..." }, "userTokenName": { "type": "string", "description": "The display name of the user token.", "example": "my-trading-token" }, "clientId": { "type": "string", "format": "uuid", "description": "The client identifier of the application the token is associated with.", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "ipsWhitelist": { "type": "array", "items": { "type": "string" }, "description": "The IPv4 addresses from which the token is allowed to be used. Null or empty when unrestricted.", "example": [ "192.168.1.1" ] }, "scopeNames": { "type": "array", "items": { "type": "string" }, "description": "The authorized scope names granted to the token.", "example": [ "etoro-public:trade.real:read" ] }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "The UTC expiration date of the token. Null when the token does not expire.", "example": "2026-12-31T23:59:59Z" }, "createdAt": { "type": "string", "format": "date-time", "description": "The UTC timestamp at which the token was created.", "example": "2026-03-06T12:00:00Z" } } }, "UpdateUserTokenRequest": { "type": "object", "properties": { "scopeIds": { "type": "array", "items": { "type": "integer" }, "deprecated": true, "description": "[DEPRECATED \u2014 use scopeNames instead] An updated set of permission scope identifiers for the 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 updated set of IPv4 addresses allowed to use this token.", "example": [ "192.168.1.1" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "An updated expiration date and time (UTC) for the token.", "example": "2026-12-31T23:59:59Z" } } }, "WatchlistItemDto": { "type": "object", "description": "Represents an item in a watchlist", "required": [ "itemId", "itemType" ], "properties": { "itemId": { "type": "integer", "format": "int32", "description": "Unique identifier of the financial instrument", "example": 12345 }, "itemType": { "type": "string", "description": "Type of the financial instrument (e.g., 'Instrument', 'Person')", "example": "Instrument" }, "itemRank": { "type": "integer", "format": "int32", "description": "Ranking position of the item in the watchlist", "default": 0, "example": 1 }, "itemAddedReason": { "type": "string", "description": "Reason the item was added to the watchlist", "example": "Manual" }, "itemAddedDate": { "type": "string", "format": "date-time", "description": "Date and time the item was added" }, "market": { "type": "object", "description": "Market metadata for the instrument when included", "properties": { "id": { "type": "string" }, "symbolName": { "type": "string" }, "displayName": { "type": "string" }, "assetTypeId": { "type": "integer", "format": "int32" }, "assetTypeSubCategoryId": { "type": "integer", "format": "int32", "nullable": true }, "exchangeId": { "type": "integer", "format": "int32" }, "hasExpirationDate": { "type": "boolean" }, "avatar": { "type": "object", "properties": { "small": { "type": "string" }, "medium": { "type": "string" }, "large": { "type": "string" }, "svg": { "type": "object", "nullable": true, "description": "SVG avatar with background and text colors", "properties": { "url": { "type": "string" }, "backgroundColor": { "type": "string" }, "textColor": { "type": "string" } } } } } } } } }, "WatchlistResponse": { "type": "object", "description": "Represents a watchlist with its metadata and items", "properties": { "watchlistId": { "type": "string", "description": "Unique identifier of the watchlist", "example": "12345" }, "name": { "type": "string", "description": "Display name of the watchlist", "example": "Tech Watchlist" }, "Gcid": { "type": "integer", "format": "int32", "description": "Global Customer ID of the watchlist owner", "example": 12345 }, "watchlistType": { "type": "string", "enum": [ "Static", "Dynamic", "RecentlyInvested", "Default" ], "description": "Type of the watchlist", "example": "Static" }, "totalItems": { "type": "integer", "format": "int32", "description": "Total number of items in the watchlist", "example": 100 }, "isDefault": { "type": "boolean", "description": "Whether this is a default system watchlist", "example": true }, "isUserSelectedDefault": { "type": "boolean", "description": "Whether this is the user's selected default watchlist", "example": true }, "watchlistRank": { "type": "integer", "format": "int32", "description": "Display order rank of the watchlist", "example": 1 }, "dynamicUrl": { "type": "string", "nullable": true, "description": "URL for dynamic watchlist queries" }, "items": { "type": "array", "description": "Items contained in the watchlist", "items": { "$ref": "#/components/schemas/WatchlistItemDto" }, "example": [ { "itemId": 12345, "itemType": "Instrument", "itemRank": 1 } ] }, "relatedAssets": { "type": "array", "description": "Related asset IDs", "nullable": true, "items": { "type": "integer", "format": "int32" }, "example": [ 12345, 67890 ] } } }, "WatchlistsResponse": { "type": "object", "description": "Response containing multiple watchlists with metadata", "properties": { "status": { "type": "integer", "format": "int32", "description": "HTTP status code of the response", "example": 200 }, "watchlists": { "type": "array", "description": "List of user watchlists", "items": { "$ref": "#/components/schemas/WatchlistResponse" } }, "exception": { "type": "object", "description": "Exception details when the request partially failed", "properties": { "invalidItems": { "type": "array", "description": "List of invalid item identifiers", "items": { "type": "string" } }, "reason": { "type": "string", "description": "Reason for the exception" }, "message": { "type": "string", "description": "Human-readable exception message" } } }, "meta": { "type": "object", "description": "Response metadata including pagination info", "properties": { "pageNumber": { "type": "integer", "format": "int32", "description": "Current page number", "example": 0 }, "itemsPerPage": { "type": "integer", "format": "int32", "description": "Number of items per page", "example": 100 }, "maxItemsInWatchlistLimit": { "type": "integer", "format": "int32", "description": "Maximum allowed items per watchlist", "example": 1000 }, "maxWatchlistsLimit": { "type": "integer", "format": "int32", "description": "Maximum allowed watchlists per user", "example": 10 } } }, "isSucceeded": { "type": "boolean", "description": "Whether the request succeeded", "example": true } } }, "CuratedListsResponse": { "type": "object", "description": "Response containing curated investment lists", "properties": { "curatedLists": { "type": "array", "description": "List of curated investment lists", "items": { "$ref": "#/components/schemas/CuratedList" } } } }, "CuratedList": { "type": "object", "description": "Represents a curated investment list", "properties": { "uuid": { "type": "string", "description": "Unique identifier of the curated list", "example": "12345" }, "name": { "type": "string", "description": "Display name of the curated list", "example": "Tech Watchlist" }, "description": { "type": "string", "description": "Description of the curated list", "example": "A list of tech stocks" }, "listImageUrl": { "type": "string", "description": "URL of the list's image", "example": "https://example.com/tech-watchlist.jpg" }, "items": { "type": "array", "description": "Items in the curated list", "items": { "$ref": "#/components/schemas/CuratedListItem" }, "example": [ { "instrumentId": 12345 } ] } } }, "CuratedListItem": { "type": "object", "description": "Represents an item in a curated list", "properties": { "instrumentId": { "type": "integer", "format": "int32", "description": "ID of the financial instrument", "example": 12345 } } }, "MarketRecommendationsResponse": { "type": "object", "description": "Response containing market recommendations", "properties": { "ResponseType": { "type": "string", "description": "Type of recommendation response", "example": "Instrument" }, "Recommendations": { "type": "array", "description": "List of recommended instrument IDs", "items": { "type": "integer", "format": "int32" }, "example": [ 12345, 67890 ] } } }, "getUserGainResponse": { "type": "object", "properties": { "monthly": { "type": "array", "items": { "$ref": "#/components/schemas/gainEntry" } }, "yearly": { "type": "array", "items": { "$ref": "#/components/schemas/gainEntry" } } } }, "getUserDailyGainResponse": { "oneOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/gainEntry" } }, { "type": "object", "properties": { "gain": { "type": "number" } } } ] }, "gainEntry": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "gain": { "type": "number" } } }, "PortfolioResponseWithPnl": { "type": "object", "description": "Comprehensive portfolio information including positions, orders, and account status", "properties": { "clientPortfolio": { "$ref": "#/components/schemas/ClientPortfolio", "description": "Container for all portfolio-related information" } } }, "ClientPortfolio": { "type": "object", "properties": { "positions": { "type": "array", "items": { "$ref": "#/components/schemas/Position" }, "description": "List of currently open trading positions" }, "credit": { "type": "number", "format": "float", "description": "Available trading balance in USD, representing funds available for new actions" }, "mirrors": { "type": "array", "items": { "$ref": "#/components/schemas/Mirror" }, "description": "Copy trading configurations and positions" }, "orders": { "type": "array", "items": { "$ref": "#/components/schemas/Order" }, "description": "List of pending orders" }, "ordersForOpen": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForOpen" }, "description": "Active orders to open positions" }, "ordersForClose": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForClose" }, "description": "Active orders to close positions" }, "ordersForCloseMultiple": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForCloseMultiple" }, "description": "Active orders to close multiple positions" }, "bonusCredit": { "type": "number", "format": "float", "description": "Bonus credit amount in USD in the account" }, "unrealizedPnL": { "type": "number", "format": "float", "description": "Total unrealized profit and loss across all open positions in the portfolio" }, "accountCurrencyId": { "type": "integer", "description": "Currency ID of the account (1 = USD)" }, "stockOrders": { "type": "array", "items": { "type": "object" }, "description": "Stock-specific pending orders" }, "entryOrders": { "type": "array", "items": { "type": "object" }, "description": "Entry orders awaiting execution" }, "exitOrders": { "type": "array", "items": { "type": "object" }, "description": "Exit orders awaiting execution" } } }, "Position": { "type": "object", "properties": { "positionID": { "type": "integer", "description": "Unique identifier for the position" }, "CID": { "type": "integer", "description": "Customer ID associated with the position" }, "openDateTime": { "type": "string", "format": "date-time", "description": "Timestamp when the position was opened in ISO 8601 format" }, "openRate": { "type": "number", "format": "float", "description": "Entry price of the position in the instrument's currency" }, "instrumentID": { "type": "integer", "description": "Identifier of the traded instrument" }, "mirrorID": { "type": "integer", "description": "Mirror ID if the position is part of copy trading, 0 otherwise" }, "parentPositionID": { "type": "integer", "description": "Parent position ID for mirrored positions, 0 otherwise" }, "isBuy": { "type": "boolean", "description": "Position direction: true for long (buy) positions, false for short (sell) positions" }, "takeProfitRate": { "type": "number", "format": "float", "description": "Rate at which TakeProfit will trigger and send MarketOrder to close the position" }, "stopLossRate": { "type": "number", "format": "float", "description": "Rate at which StopLoss will trigger and send MarketOrder to close the position" }, "amount": { "type": "number", "format": "float", "description": "USD amount allocated to the position. This amount includes both the initial investment, and additional margin allocated to the position as collateral" }, "leverage": { "type": "integer", "description": "Leverage multiplier applied to the position" }, "orderID": { "type": "integer", "description": "Original orderID the position was opened by. Need to match together with orderType" }, "orderType": { "type": "integer", "description": "Original orderType of the order the position was opened by. Need to match together with orderId" }, "units": { "type": "number", "format": "float", "description": "Number of units in the position" }, "totalFees": { "type": "number", "format": "float", "description": "Total overnight fees and dividends charged/paid on the position in USD. Negative amount represents refund" }, "initialAmountInDollars": { "type": "number", "format": "float", "description": "Initial investment USD amount in the position. This value does not change in case the position was partially closed" }, "isTslEnabled": { "type": "boolean", "description": "Indication if TrailingStopLoss feature is active on this position" }, "stopLossVersion": { "type": "integer", "description": "Manual stop loss edit version. Each time StopLossRate is manually update this value is incremented" }, "isSettled": { "type": "boolean", "description": "Obsolete" }, "redeemStatusID": { "type": "integer", "description": "If the position is currently in redeem process, this value represents the current status" }, "initialUnits": { "type": "number", "format": "float", "description": "Initial invested units in the position. This value does not change in case the position was partially closed" }, "isPartiallyAltered": { "type": "boolean", "description": "Indication whether this position was partially closed" }, "unitsBaseValueDollars": { "type": "number", "format": "float", "description": "USD value of the current units in the position, based on the initial investment. If the position was not partially altered, this value equals initialAmountInDollars" }, "isDiscounted": { "type": "boolean", "description": "Obsolete. This value is used to indicate if the relevant prices for the position are Ask/Bid or AskDiscounted/BidDiscounted" }, "openPositionActionType": { "type": "integer", "description": "Position open reason" }, "settlementTypeID": { "type": "integer", "description": "Position investment type. 0 - CFD, 1 - Real Asset, 2 - SWAP, 3 - Crypto MarginTrade, 4 - Future Contract" }, "isDetached": { "type": "boolean", "description": "Indication if the position was originally opened inside a mirror and detached from it" }, "openConversionRate": { "type": "number", "format": "float", "description": "Conversion rate from the asset currency to USD at the time the position was opened" }, "pnlVersion": { "type": "integer", "description": "Pnl formula used for calculating profit and loss" }, "totalExternalFees": { "type": "number", "format": "float", "description": "Total fees in USD charged on the position. Example - TicketFee. This value does not include overnight fees and dividends" }, "totalExternalTaxes": { "type": "number", "format": "float", "description": "Total taxes in USD charged on the position. Example - SDRT" }, "isNoTakeProfit": { "type": "boolean", "description": "Indication if TakeProfit is enabled for the position. false = enabled, true = disabled" }, "isNoStopLoss": { "type": "boolean", "description": "Indication if StopLoss is enabled for the position. false = enabled, true = disabled" }, "lotCount": { "type": "number", "format": "float", "description": "Number of lots the position represents. For FutureContracts, this value represents the number of contracts acquired. This property is not relevant for instruments that are not futures instruments" }, "unrealizedPnL": { "type": "object", "nullable": true, "description": "Unrealized profit/loss details for the position (only present in PnL endpoints)", "properties": { "pnL": { "type": "number", "format": "float", "description": "Unrealized P&L in account currency" }, "pnlAssetCurrency": { "type": "number", "format": "float", "description": "Unrealized P&L in asset currency" }, "exposureInAccountCurrency": { "type": "number", "format": "float", "description": "Current exposure in account currency" }, "exposureInAssetCurrency": { "type": "number", "format": "float", "description": "Current exposure in asset currency" }, "marginInAccountCurrency": { "type": "number", "format": "float", "description": "Margin in account currency" }, "marginInAssetCurrency": { "type": "number", "format": "float", "description": "Margin in asset currency" }, "marginCurrencyId": { "type": "integer", "description": "Currency ID for margin" }, "assetCurrencyId": { "type": "integer", "description": "Currency ID for the asset" }, "closeRate": { "type": "number", "format": "float", "description": "Current close rate" }, "closeConversionRate": { "type": "number", "format": "float", "description": "Current close conversion rate" }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp of the PnL calculation" } } } } }, "Mirror": { "type": "object", "properties": { "mirrorID": { "type": "integer", "description": "Unique identifier for the mirror" }, "CID": { "type": "integer", "description": "Customer ID associated with the mirror" }, "parentCID": { "type": "integer", "description": "Customer ID of the trader being copied" }, "stopLossPercentage": { "type": "number", "format": "float", "description": "The precentage of the mirror value that the StopLossAmount represented at the time of the last edit. Adding or removing funds from the mirror will trigger recalculation of StopLossAmount based on this value compared to the current mirror value" }, "isPaused": { "type": "boolean", "description": "Indication if the mirror is currently paused, restricting open of additional positions inside the mirror" }, "copyExistingPositions": { "type": "boolean", "description": "Indication if mirror originally copied all parent existing position on mirror registration" }, "availableAmount": { "type": "number", "format": "float", "description": "Available to trade USD balance in the mirror. This balance is reserved for mirror operations" }, "stopLossAmount": { "type": "number", "format": "float", "description": "USD value of the mirror at which MirrorStopLoss will be triggered and cause liquidation of the mirror. Adding or removing funds from the mirror will trigger recalculation of this value based on StopLossPercentage compared to the current mirror value" }, "initialInvestment": { "type": "number", "format": "float", "description": "USD amount initially invested in the mirror" }, "depositSummary": { "type": "number", "format": "float", "description": "Total USD amount deposited into the mirror after initial investment" }, "withdrawalSummary": { "type": "number", "format": "float", "description": "Total USD amount withdrawn from the mirror" }, "positions": { "type": "array", "items": { "$ref": "#/components/schemas/Position" }, "description": "List of currently open trading positions in the mirror" }, "parentUsername": { "type": "string", "description": "Username of the trader being copied" }, "closedPositionsNetProfit": { "type": "number", "format": "float", "description": "Total USD net profit of all positions that closed in the mirror" }, "startedCopyDate": { "type": "string", "format": "date-time", "description": "Date and time when the mirror trading was initiated" }, "pendingForClosure": { "type": "boolean", "description": "Indication if the mirror is in closure process" }, "parentMirrors": { "type": "array", "items": { "type": "object" }, "description": "Parent mirrors for this mirror (if any)" }, "mirrorCalculationType": { "type": "integer", "description": "(Obsolete) Mirror positions weights calculation methodology" }, "ordersForOpen": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForOpen" }, "description": "Active orders in the mirror to open positions" }, "ordersForClose": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForClose" }, "description": "Active orders in the mirror to close positions" }, "ordersForCloseMultiple": { "type": "array", "items": { "$ref": "#/components/schemas/OrderForCloseMultiple" }, "description": "Active orders in the mirror to close positions" }, "mirrorStatusID": { "type": "integer", "description": "Current status of the mirror. 0 - Active, 1 - Paused, 2 - Pending Closure, 3 - In Alignment Process" }, "delayedOrderForClose": { "type": "array", "items": { "type": "object" }, "description": "Delayed orders for closing positions" }, "delayedOrderForOpen": { "type": "array", "items": { "type": "object" }, "description": "Delayed orders for opening positions" }, "entryOrders": { "type": "array", "items": { "type": "object" }, "description": "Entry orders awaiting execution in the mirror" }, "exitOrders": { "type": "array", "items": { "type": "object" }, "description": "Exit orders awaiting execution in the mirror" } } }, "Order": { "type": "object", "properties": { "orderId": { "type": "integer", "description": "Unique identifier for the order" }, "cid": { "type": "integer", "description": "Customer ID associated with the order" }, "openDateTime": { "type": "string", "format": "date-time", "description": "Date and time when the order was created" }, "instrumentId": { "type": "integer", "description": "Identifier of the instrument being traded" }, "isBuy": { "type": "boolean", "description": "Direction of the position. true - Long, false - Short" }, "takeProfitRate": { "type": "number", "format": "float", "description": "Rate at which TakeProfit will trigger and send MarketOrder to close the position once it is open" }, "stopLossRate": { "type": "number", "format": "float", "description": "Rate at which StopLoss will trigger and send MarketOrder to close the position once it is open" }, "rate": { "type": "number", "format": "float", "description": "Asset rate at which to send market order to the market" }, "amount": { "type": "number", "format": "float", "description": "USD amount to invest in the position" }, "leverage": { "type": "integer", "description": "Leverage multiplier to apply to the position" }, "units": { "type": "number", "format": "float", "description": "Units to open the position. If this value is greater than zero the position will open on the requested units, and not amount" }, "isTslEnabled": { "type": "boolean", "description": "Indication if to enable TSL feature on the position once it is open" }, "executionType": { "type": "integer", "description": "Type of order execution" }, "isDiscounted": { "type": "boolean", "description": "Obsolete" }, "isNoTakeProfit": { "type": "boolean", "description": "Indication if TakeProfit is enabled for the order. false = enabled, true = disabled" }, "isNoStopLoss": { "type": "boolean", "description": "Indication if StopLoss is enabled for the order. false = enabled, true = disabled" } } }, "OrderForOpen": { "type": "object", "properties": { "orderId": { "type": "integer", "description": "Unique identifier for the order" }, "orderType": { "type": "integer", "description": "Type of order executed" }, "statusId": { "type": "integer", "description": "Status of the order" }, "cid": { "type": "integer", "description": "Customer ID associated with the order" }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was opened." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The last update timestamp of the order." }, "instrumentId": { "type": "integer", "description": "The unique identifier of the financial instrument to trade." }, "amount": { "type": "number", "format": "float", "description": "The amount of money to invest in the trade." }, "amountInUnits": { "type": "number", "format": "float", "description": "The number of units to trade." }, "isBuy": { "type": "boolean", "description": "True for a buy (long) order, false for a sell (short) order." }, "leverage": { "type": "integer", "description": "The leverage multiplier for the trade." }, "stopLossRate": { "type": "number", "format": "float", "description": "The stop-loss rate at which the trade will automatically close to limit losses." }, "takeProfitRate": { "type": "number", "format": "float", "description": "The take-profit rate at which the trade will automatically close to secure profits." }, "isTslEnabled": { "type": "boolean", "description": "Indicates whether a trailing stop-loss is enabled." }, "isDiscounted": { "type": "boolean", "description": "Indicates if the order is eligible for a discount." }, "mirrorId": { "type": "integer", "description": "ID related to mirrored trades, if applicable." }, "frozenAmount": { "type": "number", "format": "float", "description": "Amount frozen for the order." }, "totalExternalCosts": { "type": "number", "format": "float", "description": "Total external costs associated with the trade." }, "isNoTakeProfit": { "type": "boolean", "description": "True if no take-profit is set for this order." }, "isNoStopLoss": { "type": "boolean", "description": "True if no stop-loss is set for this order." }, "lotCount": { "type": "number", "format": "float", "description": "The number of lots in the order." }, "openPositionActionType": { "type": "integer", "description": "Position open reason." }, "externalOperation": { "type": "object", "description": "External operation details, if any.", "nullable": true } } }, "OrderForClose": { "type": "object", "properties": { "orderId": { "type": "integer", "description": "Unique identifier for the closing order." }, "orderType": { "type": "integer", "description": "Type of order executed." }, "statusId": { "type": "integer", "description": "Status of the closing order." }, "cid": { "type": "integer", "description": "Customer ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was placed." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The timestamp of the last update to this order." }, "instrumentId": { "type": "integer", "description": "The ID of the instrument traded." }, "unitsToDeduct": { "type": "number", "format": "float", "description": "The number of units closed in this order." }, "lotsToDeduct": { "type": "number", "format": "float", "description": "The number of lots closed in this order." }, "positionId": { "type": "integer", "description": "The ID of the closed position." } } }, "OrderForCloseMultiple": { "type": "object", "properties": { "orderId": { "type": "integer", "description": "Unique identifier for the closing order." }, "orderType": { "type": "integer", "description": "Type of order executed." }, "statusId": { "type": "integer", "description": "Status of the closing order." }, "cid": { "type": "integer", "description": "Customer ID associated with the order." }, "openDateTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was placed." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The timestamp of the last update to this order." }, "instrumentId": { "type": "integer", "description": "The ID of the instrument traded." }, "unitsToDeduct": { "type": "number", "format": "float", "description": "The number of units closed in this order." }, "lotsToDeduct": { "type": "number", "format": "float", "description": "The number of lots closed in this order." }, "pendingClosePositionIds": { "type": "array", "items": { "type": "integer" }, "description": "IDs of positions pending close in this order." } } }, "OrderForOpenInfoResponse": { "type": "object", "description": "Comprehensive order information response containing order details and all positions opened from this order.", "required": [ "orderID", "CID", "statusID", "orderType", "instrumentID", "requestOccurred" ], "properties": { "token": { "type": "string", "description": "Tracking token for the request, used for correlation and debugging purposes. This token is generated by the system and can be used to track the request through various system components.", "example": "550e8400-e29b-41d4-a716-446655440000" }, "orderID": { "type": "integer", "format": "int64", "description": "The unique identifier of the order. This is the same OrderID that was provided in the request path parameter.", "example": 123456789 }, "CID": { "type": "integer", "format": "int64", "description": "Customer ID (CID) associated with the order. This identifies the user account that created the order.", "example": 987654321 }, "referenceID": { "type": "string", "description": "Reference tracking ID for the order request.", "example": "00000000-0000-0000-0000-000000000000" }, "statusID": { "type": "integer", "description": "Current status of the order. Common values: 0 = Pending, 1 = Executed, 2 = Cancelled, 3 = Rejected, 4 = Partially Executed. The exact meaning of status codes may vary based on order type and system configuration.", "example": 1 }, "orderType": { "type": "integer", "description": "Type of the order. Common values: 1 = Market Order, 2 = Limit Order, 3 = Stop Order. The exact order types depend on the trading system configuration.", "example": 1 }, "openActionType": { "type": "integer", "description": "The action type that triggered the order creation. This indicates the reason or context for opening the position, such as manual trade, copy trading, automated strategy, etc.", "example": 1 }, "errorCode": { "type": "integer", "format": "nullable", "description": "Error code if the order execution failed or encountered an error. This field is null if the order was successful. Error codes are system-specific and should be referenced against the system's error code documentation.", "example": null }, "errorMessage": { "type": "string", "format": "nullable", "description": "Human-readable error message describing any error that occurred during order processing. This field is null if the order was successful. Provides additional context beyond the errorCode.", "example": null }, "instrumentID": { "type": "integer", "description": "The unique identifier of the financial instrument that the order was placed for. This corresponds to the instrument being traded (e.g., stock, currency pair, commodity).", "example": 67890 }, "amount": { "type": "number", "format": "decimal", "description": "The USD amount that was requested to be invested in the position. This represents the monetary value allocated to the order.", "example": 1000.0 }, "units": { "type": "number", "format": "decimal", "description": "The number of units that were requested to be traded. If the order was placed by units rather than amount, this value represents the requested quantity.", "example": 10.5 }, "requestOccurred": { "type": "string", "format": "date-time", "description": "The timestamp when the order request was initially created and submitted to the system. This is in ISO 8601 format (UTC).", "example": "2024-01-15T10:30:00Z" }, "positions": { "type": "array", "description": "List of all positions that were opened as a result of this order. Each position in this array represents a successfully executed position created from the order. This array is empty if the order has not yet been executed or if execution failed.", "items": { "$ref": "#/components/schemas/OrderForOpenPositionInfo" } } } }, "OrderForOpenPositionInfo": { "type": "object", "description": "Detailed information about a position that was opened from an order. This object contains all the essential details needed to identify and track the position.", "required": [ "positionID", "orderType", "occurred", "rate", "units", "amount", "isOpen" ], "properties": { "positionID": { "type": "integer", "format": "int64", "description": "The unique identifier of the position that was opened from this order. This PositionID is the key property that can be used to query detailed position information, track position status, and perform position-specific operations. This is the primary identifier for the position in the trading system.", "example": 9876543210 }, "orderType": { "type": "integer", "description": "The type of order that was used to open this position. This matches the orderType from the parent order and indicates the execution method (e.g., Market Order, Limit Order).", "example": 1 }, "occurred": { "type": "string", "format": "date-time", "description": "The exact timestamp when this position was opened and executed. This is in ISO 8601 format (UTC) and represents when the position became active in the trading system.", "example": "2024-01-15T10:30:15Z" }, "rate": { "type": "number", "format": "decimal", "description": "The execution rate (price) at which the position was opened. This is the actual price at which the trade was executed, which may differ from the requested rate depending on market conditions and order type.", "example": 1.2345 }, "units": { "type": "number", "format": "decimal", "description": "The number of units in the position. This represents the quantity of the instrument that was acquired when the position was opened.", "example": 10.5 }, "conversionRate": { "type": "number", "format": "decimal", "description": "The currency conversion rate that was applied when opening the position. This rate is used to convert between the instrument's base currency and the account currency (typically USD) at the time of execution.", "example": 1.0 }, "amount": { "type": "number", "format": "decimal", "description": "The USD amount that was invested in this position. This represents the monetary value allocated to this specific position.", "example": 1000.0 }, "isOpen": { "type": "boolean", "description": "Indicates whether the position is currently open (true) or has been closed (false). This status reflects the current state of the position at the time the order information was retrieved.", "example": true } } }, "GetOrderInfoResponse": { "type": "object", "description": "Detailed information about a specific order retrieved via the orders lookup endpoint.", "properties": { "accountId": { "type": "integer", "format": "int64", "description": "The account identifier associated with this order." }, "gcid": { "type": "integer", "format": "int64", "description": "The global customer identifier." }, "portfolioId": { "type": "integer", "format": "int32", "description": "The portfolio identifier." }, "orderId": { "type": "integer", "format": "int64", "description": "The unique identifier of the order." }, "action": { "type": "string", "description": "The order action. Possible values: open, close." }, "transaction": { "type": "string", "description": "The transaction direction. Possible values: buy, sell, sellShort, buyToCover." }, "type": { "type": "string", "description": "The order type. Possible values: mkt, mit." }, "etoroOrderTypeId": { "type": "integer", "format": "int32", "description": "The internal eToro order type identifier." }, "status": { "$ref": "#/components/schemas/GetOrderInfoStatus" }, "asset": { "$ref": "#/components/schemas/GetOrderInfoAsset" }, "orderCurrency": { "type": "string", "description": "The currency used for the order." }, "requestedAmount": { "type": "number", "format": "double", "nullable": true, "description": "The requested monetary amount for the order." }, "requestedUnits": { "type": "number", "format": "double", "nullable": true, "description": "The requested number of units for the order." }, "requestedContracts": { "type": "number", "format": "double", "nullable": true, "description": "The requested number of contracts for the order." }, "frozenAmount": { "type": "number", "format": "double", "nullable": true, "description": "The amount frozen/reserved for the order including costs." }, "requestedTriggerRate": { "type": "number", "format": "double", "nullable": true, "description": "The trigger rate for limit or stop orders." }, "openStopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss rate at order open." }, "openTakeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit rate at order open." }, "stopLossType": { "type": "string", "nullable": true, "description": "The stop-loss type. Possible values: fixed, trailing." }, "totalCosts": { "type": "number", "format": "double", "description": "Total costs associated with the order." }, "positionsToClose": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "List of position IDs to close as part of a close order." }, "positionExecutions": { "type": "array", "items": { "$ref": "#/components/schemas/GetOrderInfoPositionExecution" }, "description": "List of position executions resulting from this order." }, "requestTime": { "type": "string", "format": "date-time", "description": "The timestamp when the order was requested." }, "lastUpdate": { "type": "string", "format": "date-time", "description": "The timestamp of the last update to the order." }, "openActionType": { "type": "string", "description": "The action type that initiated the order." }, "requestType": { "type": "string", "description": "The request sizing type. Possible values: byAmount, byUnits, byContracts." } } }, "GetOrderInfoStatus": { "type": "object", "description": "Status information for the order.", "properties": { "id": { "type": "integer", "format": "int32", "description": "Status identifier. Common values: 1 = Executed, 2 = Cancelled, 3 = Rejected." }, "name": { "type": "string", "description": "Human-readable status name." }, "errorCode": { "type": "integer", "format": "int32", "description": "Error code if the order failed. Zero indicates no error." }, "errorMessage": { "type": "string", "nullable": true, "description": "Human-readable error message if the order failed." } } }, "GetOrderInfoAsset": { "type": "object", "description": "Asset information associated with the order.", "properties": { "symbol": { "type": "string", "description": "The asset ticker symbol." }, "instrumentId": { "type": "integer", "format": "int32", "description": "The eToro instrument identifier." }, "currency": { "type": "string", "description": "The asset's base currency." }, "settlementType": { "type": "string", "description": "Settlement type. Possible values: cfd, real, realFutures, marginTrade." }, "leverage": { "type": "integer", "format": "int32", "description": "The leverage applied to the order." }, "side": { "type": "string", "description": "The position side. Possible values: long, short." } } }, "GetOrderInfoPositionExecution": { "type": "object", "description": "Details of a position execution resulting from the order.", "properties": { "positionId": { "type": "integer", "format": "int64", "description": "The unique identifier of the executed position." }, "state": { "type": "string", "description": "The current state of the position. Possible values: open, closed." }, "investedAmountCurrency": { "type": "number", "format": "double", "description": "The invested amount in the account currency." }, "initialExposureAccountCurrency": { "type": "number", "format": "double", "description": "The initial exposure in the account currency." }, "initialExposureAssetCurrency": { "type": "number", "format": "double", "description": "The initial exposure in the asset currency." }, "addedFunds": { "type": "number", "format": "double", "description": "Additional funds added to the position." }, "marginAccountCurrency": { "type": "number", "format": "double", "description": "Margin held in the account currency." }, "marginAssetCurrency": { "type": "number", "format": "double", "description": "Margin held in the asset currency." }, "remainingUnits": { "type": "number", "format": "double", "description": "Remaining units in the position." }, "remainingContracts": { "type": "number", "format": "double", "nullable": true, "description": "Remaining contracts in the position." }, "stopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss rate for the position." }, "takeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit rate for the position." }, "openingData": { "$ref": "#/components/schemas/GetOrderInfoOpeningData" } } }, "GetOrderInfoOpeningData": { "type": "object", "description": "Execution data recorded when the position was opened.", "properties": { "openTime": { "type": "string", "format": "date-time", "description": "The timestamp when the position was opened." }, "orderId": { "type": "integer", "format": "int64", "description": "The order identifier that opened the position." }, "executionTime": { "type": "string", "format": "date-time", "description": "The execution timestamp." }, "units": { "type": "number", "format": "double", "nullable": true, "description": "Number of units executed." }, "contracts": { "type": "number", "format": "double", "nullable": true, "description": "Number of contracts executed." }, "avgPrice": { "type": "number", "format": "double", "description": "The average execution price." }, "avgConversionRate": { "type": "number", "format": "double", "description": "The average currency conversion rate applied." }, "marketSpread": { "type": "number", "format": "double", "description": "The market spread at execution time." }, "markup": { "type": "number", "format": "double", "description": "The markup applied to the spread." }, "priceId": { "type": "integer", "format": "int64", "description": "The price snapshot identifier used for execution." }, "fees": { "type": "number", "format": "double", "description": "Fees charged for the execution." }, "taxes": { "type": "number", "format": "double", "description": "Taxes applied to the execution." } } }, "UnifiedOrderRequest": { "type": "object", "description": "Request payload for creating an order to open or close a position.", "required": [ "action", "transaction" ], "properties": { "action": { "type": "string", "description": "The order action type. Possible values: open, close.", "enum": [ "open", "close" ], "example": "open" }, "transaction": { "type": "string", "description": "The transaction direction. Possible values: buy, sell, sellShort, buyToCover.", "enum": [ "buy", "sell", "sellShort", "buyToCover" ], "example": "buy" }, "symbol": { "type": "string", "description": "The asset ticker symbol. Required for open orders.", "nullable": true, "example": "AAPL" }, "instrumentId": { "type": "integer", "format": "int32", "description": "The eToro instrument identifier. Required for open orders.", "nullable": true, "example": 101 }, "settlementType": { "type": "string", "description": "The settlement type. Possible values: cfd, real, realFutures, marginTrade. Required for open orders.", "nullable": true, "enum": [ "cfd", "real", "realFutures", "marginTrade" ], "example": "cfd" }, "orderType": { "type": "string", "description": "The order execution type. Possible values: mkt (market), mit (market if touched).", "enum": [ "mkt", "mit" ], "example": "mkt" }, "triggerRate": { "type": "number", "format": "double", "nullable": true, "description": "The trigger rate for mit orders. Required for mit orders." }, "leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier to apply. Required for open orders.", "nullable": true, "example": 2 }, "amount": { "type": "number", "format": "double", "nullable": true, "description": "The monetary amount to invest in the order currency. Mutually exclusive with units and contracts.", "example": 1000.0 }, "orderCurrency": { "type": "string", "description": "The currency for the order amount. Typically usd.", "nullable": true, "example": "usd" }, "units": { "type": "number", "format": "double", "nullable": true, "description": "The number of units to trade. Mutually exclusive with amount and contracts." }, "contracts": { "type": "number", "format": "double", "nullable": true, "description": "The number of contracts to trade. Mutually exclusive with amount and units." }, "stopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss rate at which the position will automatically close.", "example": 1.2 }, "takeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit rate at which the position will automatically close.", "example": 1.5 }, "stopLossType": { "type": "string", "nullable": true, "description": "The stop-loss type. Possible values: fixed, trailing.", "enum": [ "fixed", "trailing" ], "example": "fixed" }, "additionalMargin": { "type": "number", "format": "double", "nullable": true, "description": "Additional margin to allocate to the position." }, "positionIds": { "type": "array", "items": { "type": "integer", "format": "int64" }, "nullable": true, "description": "List of position IDs to close. Required for close orders." } } }, "UnifiedOrderResponse": { "type": "object", "description": "Response payload after successfully submitting an order.", "properties": { "token": { "type": "string", "format": "uuid", "description": "A tracking token for the order request, used for correlation and debugging.", "example": "066faaee-e1e9-49d2-a568-c6e1cc336ad8" }, "orderId": { "type": "integer", "format": "int64", "description": "The unique identifier of the created order.", "example": 13902598 }, "referenceId": { "type": "string", "format": "uuid", "description": "The client reference identifier for the order, matching the X-Request-Id header if provided.", "example": "1c94300c-90aa-4303-9d00-dec376d74efb" } } }, "GetCostResponse": { "type": "object", "description": "Cost breakdown for a hypothetical open or close order.", "properties": { "instrumentId": { "type": "integer", "format": "int32", "description": "Identifier of the instrument the cost breakdown applies to." }, "symbol": { "type": "string", "nullable": true, "description": "Symbol of the instrument" }, "costs": { "type": "array", "items": { "$ref": "#/components/schemas/CostBreakdown" }, "description": "Cost components that would apply to the proposed order." }, "lastUpdated": { "type": "string", "format": "date-time", "description": "Timestamp (ISO 8601) at which the cost figures were generated." } } }, "CostBreakdown": { "type": "object", "description": "Individual cost component (markup, fees, SDRT) in the requested order currency.", "properties": { "costType": { "type": "string", "description": "Identifies which cost component this entry represents.", "enum": [ "markup", "marketSpread", "transactionFee", "overnightFee", "overWeekendFee", "sdrt" ] }, "amount": { "type": "number", "format": "double", "description": "The monetary value of this cost component, expressed in `currency`." }, "currency": { "type": "string", "description": "ISO 4217 currency code in which `amount` is denominated." } } }, "AggregatedPortfolioResponse": { "type": "object", "description": "Complete snapshot of the authenticated user's investment portfolio, organized by asset.", "properties": { "cid": { "type": "integer", "format": "int32", "description": "Customer ID." }, "timestamp": { "type": "string", "format": "date-time", "description": "Time at which this portfolio snapshot was calculated." }, "accountCurrency": { "type": "string", "description": "ISO 4217 code of the account's base currency (e.g. 'USD')." }, "accountTotals": { "$ref": "#/components/schemas/AggregatedPortfolioAccountTotals" }, "instrumentAggregates": { "type": "array", "description": "Positions held directly (not via copy trading), grouped by instrument.", "items": { "$ref": "#/components/schemas/AggregatedPortfolioInstrumentAggregate" } }, "mirrors": { "type": "array", "description": "Copy-trading relationships the user has active.", "items": { "$ref": "#/components/schemas/AggregatedPortfolioMirrorAggregate" } } } }, "AggregatedPortfolioAccountTotals": { "type": "object", "description": "Account-level balance and equity totals.", "properties": { "accountAvailableCash": { "type": "number", "format": "double", "description": "Cash available for new trades: accountBalance minus accountFrozenCash." }, "accountFrozenCash": { "type": "number", "format": "double", "description": "Cash reserved for pending open orders." }, "accountCurrentPnl": { "type": "number", "format": "double", "description": "Unrealized P&L across all manual positions and copy-trading mirrors in account currency." }, "accountTotalValue": { "type": "number", "format": "double", "description": "Total portfolio value: accountAvailableCash + accountTotalUsedMargin + accountCurrentPnl." }, "accountTotalUsedMargin": { "type": "number", "format": "double", "description": "Total margin in use: manual position margins + frozen order amounts + mirror active margins." }, "accountBalance": { "type": "number", "format": "double", "description": "Total cash balance (available + frozen), excluding invested amounts." } } }, "AggregatedPortfolioInstrumentAggregate": { "type": "object", "description": "Aggregated data across all positions for a single instrument.", "properties": { "instrumentId": { "type": "integer", "format": "int32", "description": "eToro instrument identifier." }, "assetCurrency": { "type": "string", "description": "ISO 4217 code of the instrument's base currency (e.g. 'USD', 'EUR')." }, "totalMarginAccountCurrency": { "type": "number", "format": "double", "description": "Sum of margins across all positions for this instrument, in account currency." }, "totalFees": { "type": "number", "format": "double", "description": "Sum of transaction fees taken on positions of this instrument, in asset currency." }, "totalFeesAcctCcy": { "type": "number", "format": "double", "description": "Sum of transaction fees taken on positions of this instrument, in account currency." }, "totalTaxes": { "type": "number", "format": "double", "description": "Sum of taxes for this instrument, in asset currency." }, "totalTaxesAcctCcy": { "type": "number", "format": "double", "description": "Sum of taxes for this instrument, in account currency." }, "totalMarginAssetCurrency": { "type": "number", "format": "double", "description": "Sum of margins across all positions for this instrument, in asset currency." }, "pnlAssetCurrency": { "type": "number", "format": "double", "nullable": true, "description": "Unrealized P&L for this instrument in asset currency. Null when P&L calculation is not requested." }, "accountCurrencyRoePercent": { "type": "number", "format": "double", "description": "Return on equity in account currency: accountCurrencyReturn / totalMarginAccountCurrency." }, "netContracts": { "type": "number", "format": "double", "description": "Net contracts across all positions (positive = net long, negative = net short)." }, "netUnits": { "type": "number", "format": "double", "description": "Net units across all positions (positive = net long, negative = net short)." }, "netCurrentExposureAssetCurrency": { "type": "number", "format": "double", "description": "Net current market exposure in asset currency." }, "netCurrentExposureAccountCurrency": { "type": "number", "format": "double", "description": "Net current market exposure in account currency." }, "netInitialExposureAccountCurrency": { "type": "number", "format": "double", "description": "Net initial exposure at open in account currency." }, "accountCurrencyReturn": { "type": "number", "format": "double", "description": "Unrealized P&L for this instrument in account currency." }, "liquidationValueAccountCurrency": { "type": "number", "format": "double", "description": "Current liquidation value in account currency: totalMarginAccountCurrency + accountCurrencyReturn." }, "liquidationValueAssetCurrency": { "type": "number", "format": "double", "description": "Current liquidation value in asset currency." }, "avgLeverage": { "type": "number", "format": "double", "description": "Average leverage across all positions for this instrument." }, "avgOpenRate": { "type": "number", "format": "double", "description": "Weighted average open rate across all positions for this instrument." }, "netAvgOpenRate": { "type": "number", "format": "double", "description": "Direction-aware weighted average open rate (long contributions minus short)." }, "avgConversionRate": { "type": "number", "format": "double", "description": "Weighted average asset-to-account-currency conversion rate at position open." } } }, "AggregatedPortfolioMirrorAggregate": { "type": "object", "description": "Aggregated data for a single copy-trading relationship.", "properties": { "mirrorId": { "type": "integer", "format": "int32", "description": "Mirror identifier. A value of 0 represents manually held positions." }, "mirrorAvailableCash": { "type": "number", "format": "double", "description": "Cash available within this mirror for new copy positions." }, "mirrorDepositTotal": { "type": "number", "format": "double", "description": "Total amount ever deposited into this mirror: initialInvestment + depositSummary." }, "mirrorWithdrawalTotal": { "type": "number", "format": "double", "description": "Total amount ever withdrawn from this mirror." }, "mirrorStopLossPercentage": { "type": "number", "format": "double", "description": "Stop-loss threshold as a percentage of the mirror's current value." }, "mirrorStopLoss": { "type": "number", "format": "double", "description": "Stop-loss threshold in account currency. The mirror liquidates when its value falls to this level." }, "mirrorClosedPositionsPnl": { "type": "number", "format": "double", "description": "Accumulated net profit from all closed positions within this mirror." }, "mirrorTotals": { "$ref": "#/components/schemas/AggregatedPortfolioMirrorTotals" }, "instrumentAggregates": { "type": "array", "description": "Positions held within this copy-trading mirror, grouped by instrument.", "items": { "$ref": "#/components/schemas/AggregatedPortfolioInstrumentAggregate" } } } }, "AggregatedPortfolioMirrorTotals": { "type": "object", "description": "Aggregated totals for a copy-trading mirror.", "properties": { "mirrorNetFunding": { "type": "number", "format": "double", "description": "Net amount funded into the mirror: mirrorDepositTotal minus mirrorWithdrawalTotal." }, "mirrorPositionsPnl": { "type": "number", "format": "double", "description": "Total P&L from open and closed positions within the mirror, in account currency." }, "mirrorLiquidationValue": { "type": "number", "format": "double", "description": "Current mirror value: mirrorActiveMargin + mirrorPositionsPnl." }, "mirrorPositionsPnlPercent": { "type": "number", "format": "double", "description": "mirrorPositionsPnl as a percentage of mirrorLiquidationValue." }, "mirrorMarginPercent": { "type": "number", "format": "double", "description": "This mirror's active margin as a percentage of the account's total used margin." }, "mirrorValuePercent": { "type": "number", "format": "double", "description": "This mirror's liquidation value as a percentage of the account's total value." }, "mirrorActiveMargin": { "type": "number", "format": "double", "description": "Total margin in active use within this mirror: mirrorAvailableCash + sum of position margins minus closed positions P&L." } } }, "InstrumentEligibilityRequest": { "type": "object", "description": "Request payload for checking instrument eligibility. At least one of `instrumentIds` or `symbols` must be provided; combined length must not exceed 100 instruments.", "properties": { "instrumentIds": { "type": "array", "items": { "type": "integer", "format": "int32" }, "nullable": true, "description": "Optional list of instrument IDs to check." }, "symbols": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "Optional list of instrument symbols to check." }, "currency": { "type": "string", "default": "USD", "description": "Requested currency for financial amounts in the eligibility response (e.g. minimum position size). Currently only USD is supported." } } }, "InstrumentEligibilityResponse": { "type": "object", "description": "Response containing trading configuration for all requested instruments.", "properties": { "currency": { "type": "string", "description": "The currency used for all monetary values in this response." }, "eligibilities": { "type": "array", "items": { "$ref": "#/components/schemas/InstrumentEligibility" }, "description": "Trading configuration for each resolved instrument." }, "notFoundInstrumentIds": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "Instrument IDs that were requested but could not be found." }, "notFoundSymbols": { "type": "array", "items": { "type": "string" }, "description": "Symbols that were requested but could not be found." } } }, "InstrumentEligibility": { "type": "object", "description": "Full trading configuration for a single instrument, including position limits, trading permissions, order configuration, margin settings, and available leverage.", "properties": { "instrumentId": { "type": "integer", "format": "int32", "description": "Unique identifier for the instrument." }, "symbol": { "type": "string", "description": "Trading symbol of the instrument (e.g. AAPL, EURUSD)." }, "minPositionExposure": { "type": "number", "format": "decimal", "description": "Minimum exposure value required to open a position on this instrument." }, "maxUnitsPerOrder": { "type": "number", "format": "decimal", "description": "Maximum number of units allowed per single order." }, "allowOpenPosition": { "type": "boolean", "description": "Whether opening new positions is currently permitted." }, "allowClosePosition": { "type": "boolean", "description": "Whether closing existing positions is currently permitted." }, "allowPartialClosePosition": { "type": "boolean", "description": "Whether partially closing an existing position is permitted." }, "allowMitOrders": { "type": "boolean", "description": "Whether Market-if-Touched (limit) orders are supported." }, "allowEntryOrders": { "type": "boolean", "description": "Whether submitting open orders when the market is closed is allowed." }, "allowExitOrders": { "type": "boolean", "description": "Whether submitting close orders when the market is closed is allowed." }, "allowTrailingStopLoss": { "type": "boolean", "description": "Whether a trailing stop-loss can be set on positions for this instrument." }, "requiresW8Ben": { "type": "boolean", "nullable": true, "description": "Whether a W-8BEN tax form is required to trade this instrument. Null if not applicable." }, "unitsQuantityType": { "type": "string", "description": "What trade quantity type is allowed. Possible values: `WholeUnits`, `FractionalUnits`." }, "orderFillBehaviorType": { "type": "string", "description": "How orders are filled for this instrument. Possible values: `BestEffort`, `FillOrKill`." }, "allowedOrderQuantityType": { "type": "string", "description": "How order size can be specified. Possible values: `Units`, `Amount`, `Both`." }, "tradeUnitType": { "type": "string", "description": "Unit type used to express trade size. Possible values: `Units`, `Lots`." }, "initialMarginInAssetCurrency": { "type": "number", "format": "decimal", "nullable": true, "description": "Initial margin expressed in the asset currency. Null if not applicable." }, "stopLossMarginInAssetCurrency": { "type": "number", "format": "decimal", "nullable": true, "description": "Stop-loss margin expressed in the asset currency. Null if not applicable." }, "additionalBufferPercent": { "type": "number", "format": "decimal", "nullable": true, "description": "Additional buffer applied to the current rate to limit the order execution price - usually for low-liquidity assets. This also causes additional funds to be reserved for the order. Null if no buffer." }, "leverageConfigs": { "type": "array", "items": { "$ref": "#/components/schemas/LeverageConfiguration" }, "description": "Available leverage configurations, each specific to a settlement type and direction." } } }, "LeverageConfiguration": { "type": "object", "description": "Leverage configuration for a specific settlement type and trade direction combination.", "properties": { "settlementType": { "type": "string", "description": "The settlement type this configuration applies to. Possible values: CFD, REAL, REAL_FUTURES, MARGIN_TRADE." }, "direction": { "type": "string", "description": "The trade direction. Possible values: LONG, SHORT." }, "leverageValues": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "Available leverage multipliers for this settlement type and direction." }, "isPotential": { "type": "boolean", "description": "Additional user questionnaire may be required to allow the user to trade with this setup of settlement and leverages." }, "minPositionAmount": { "type": "number", "format": "decimal", "description": "Minimum monetary collateral required to open a position under this leverage configuration." }, "allowEditStopLoss": { "type": "boolean", "description": "Whether the stop-loss can be edited for positions under this configuration." }, "minStopLossPercentage": { "type": "number", "format": "decimal", "description": "Minimum stop-loss percentage allowed from the allocated margin of the position." }, "maxStopLossPercentage": { "type": "number", "format": "decimal", "description": "Maximum stop-loss percentage allowed from the allocated margin of the position." }, "defaultStopLossPercentage": { "type": "number", "format": "decimal", "description": "Default stop-loss percentage applied when no explicit value is provided." }, "allowEditTakeProfit": { "type": "boolean", "description": "Whether the take-profit can be edited." }, "minTakeProfitPercentage": { "type": "number", "format": "decimal", "description": "Minimum take-profit percentage allowed from the allocated margin of the position." }, "maxTakeProfitPercentage": { "type": "number", "format": "decimal", "description": "Maximum take-profit percentage allowed from the allocated margin of the position." }, "defaultTakeProfitPercentage": { "type": "number", "format": "decimal", "description": "Default take-profit percentage applied when no explicit value is provided." }, "allowStopLossTakeProfit": { "type": "boolean", "description": "Whether stop-loss and take-profit can be set on a position." } } }, "InstrumentSearchResponse": { "type": "object", "properties": { "page": { "type": "integer", "description": "The current page number." }, "pageSize": { "type": "integer", "description": "The number of items per page." }, "totalItems": { "type": "integer", "description": "The total number of instruments matching the search criteria." }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Instrument" } } } }, "Instrument": { "type": "object", "properties": { "instrumentId": { "type": "integer", "description": "A unique identifier for the instrument." }, "displayname": { "type": "string", "description": "The display name of the instrument." }, "popularityUniques7Day": { "type": "integer", "description": "The number of unique users who viewed this instrument in the last 7 days." }, "instrumentTypeID": { "type": "integer", "description": "The type ID of the instrument." }, "instrumentType": { "type": "string", "description": "The type of the instrument." }, "exchangeID": { "type": "integer", "description": "The ID of the exchange where the instrument is traded." }, "symbol": { "type": "string", "description": "The trading symbol of the instrument." }, "isOpen": { "type": "boolean", "description": "Indicates whether the instrument is currently open for trading." }, "internalAssetClassId": { "type": "integer", "description": "The internal asset class ID." }, "internalInstrumentDisplayName": { "type": "string", "description": "The internal display name of the instrument." }, "isInternalInstrument": { "type": "boolean", "description": "Indicates whether the instrument is internal." }, "internalSymbolFull": { "type": "string", "description": "The full internal symbol of the instrument." }, "isHiddenFromClient": { "type": "boolean", "description": "Indicates whether the instrument is hidden from clients." }, "internalInstrumentId": { "type": "integer", "description": "The internal instrument ID." }, "internalCryptoTypeId": { "type": "integer", "description": "The internal crypto type ID." }, "internalExchangeId": { "type": "integer", "description": "The internal exchange ID." }, "internalExchangeName": { "type": "string", "description": "The internal exchange name." }, "internalAssetClassName": { "type": "string", "description": "The internal asset class name." }, "logo35x35": { "type": "string", "description": "The URL of the 35x35 logo." }, "logo50x50": { "type": "string", "description": "The URL of the 50x50 logo." }, "logo150x150": { "type": "string", "description": "The URL of the 150x150 logo." }, "dailyPriceChange": { "type": "number", "description": "The daily price change." }, "absDailyPriceChange": { "type": "number", "description": "The absolute daily price change." }, "weeklyPriceChange": { "type": "number", "description": "The weekly price change." }, "monthlyPriceChange": { "type": "number", "description": "The monthly price change." }, "isDelisted": { "type": "boolean", "description": "Indicates whether the instrument is delisted." }, "isCurrentlyTradable": { "type": "boolean", "description": "Indicates whether the instrument is currently tradable." }, "isExchangeOpen": { "type": "boolean", "description": "Indicates whether the exchange is open." }, "internalClosingPrice": { "type": "number", "description": "The internal closing price." }, "isActiveInPlatform": { "type": "boolean", "description": "Indicates whether the instrument is active in the platform." }, "isBuyEnabled": { "type": "boolean", "description": "Indicates whether buying is enabled for the instrument." }, "currentRate": { "type": "number", "description": "The current rate of the instrument." }, "threeMonthPriceChange": { "type": "number", "description": "The three-month price change." }, "sixMonthPriceChange": { "type": "number", "description": "The six-month price change." }, "oneYearPriceChange": { "type": "number", "description": "The one-year price change." }, "currMonthPriceChange": { "type": "number", "description": "The current month price change." }, "currQuarterPriceChange": { "type": "number", "description": "The current quarter price change." }, "currYearPriceChange": { "type": "number", "description": "The current year price change." }, "lastYearPriceChange": { "type": "number", "description": "The last year price change." }, "lastTwoYearsPriceChange": { "type": "number", "description": "The last two years price change." }, "oneMonthAgoPriceChange": { "type": "number", "description": "The price change from one month ago." }, "twoMonthsAgoPriceChange": { "type": "number", "description": "The price change from two months ago." }, "threeMonthsAgoPriceChange": { "type": "number", "description": "The price change from three months ago." }, "sixMonthsAgoPriceChange": { "type": "number", "description": "The price change from six months ago." }, "oneYearAgoPriceChange": { "type": "number", "description": "The price change from one year ago." }, "cvtBid": { "type": "number", "description": "The converted bid price." }, "cvtAsk": { "type": "number", "description": "The converted ask price." }, "cvtBiNoSpread": { "type": "number", "description": "The converted bid price without spread." }, "cvtAskNoSpread": { "type": "number", "description": "The converted ask price without spread." }, "traders7DayChange": { "type": "number", "description": "The change in the number of traders over the last 7 days." }, "traders14DayChange": { "type": "number", "description": "The change in the number of traders over the last 14 days." }, "traders30DayChange": { "type": "number", "description": "The change in the number of traders over the last 30 days." }, "popularityUniques14Day": { "type": "integer", "description": "The number of unique users who viewed this instrument in the last 14 days." }, "popularityUniques30Day": { "type": "integer", "description": "The number of unique users who viewed this instrument in the last 30 days." }, "internalIndustryId": { "type": "integer", "description": "The internal industry ID." }, "internalStockIndustryName": { "type": "string", "description": "The internal stock industry name." }, "popularityUniques": { "type": "integer", "description": "Total number of unique users interested in this instrument." }, "holdingPct": { "type": "number", "description": "The holding percentage of this instrument." }, "buyHoldingPct": { "type": "number", "description": "The buy holding percentage." }, "sellHoldingPct": { "type": "number", "description": "The sell holding percentage." }, "buyPctChange24Hours": { "type": "number", "description": "The buy percentage change in the last 24 hours." }, "absBuyPctChange24Hours": { "type": "number", "description": "The absolute buy percentage change in the last 24 hours." }, "industryNameId": { "type": "integer", "description": "The industry name ID." }, "sectorNameId": { "type": "integer", "description": "The sector name ID." } } }, "LiveRatesResponse": { "type": "object", "description": "Container for real-time market rates data", "properties": { "rates": { "type": "array", "description": "Array of current market rates for requested instruments", "items": { "type": "object", "description": "Individual instrument rate information", "properties": { "instrumentID": { "type": "integer", "description": "Unique identifier for the financial instrument" }, "ask": { "type": "number", "format": "float", "description": "Current asking price (offer) for the instrument. This is the price at which you can buy the asset." }, "bid": { "type": "number", "format": "float", "description": "Current bid price for the instrument. This is the price at which you can sell the asset." }, "lastExecution": { "type": "number", "format": "float", "description": "Price of the most recent trade execution for this instrument" }, "conversionRateAsk": { "type": "number", "format": "float", "description": "Current conversion rate (ask) from instrument's currency to USD, used for position value calculations" }, "conversionRateBid": { "type": "number", "format": "float", "description": "Current conversion rate (bid) from instrument's currency to USD, used for position value calculations" }, "date": { "type": "string", "format": "date-time", "description": "The date-time of the price in the system" }, "unitMargin": { "type": "number", "format": "float", "description": "(Obsolete) USD equivalent of the instrument price" }, "unitMarginAsk": { "type": "number", "format": "float", "description": "(Obsolete) USD equivalent of the instrument ask price" }, "unitMarginBid": { "type": "number", "format": "float", "description": "(Obsolete) USD equivalent of the instrument bid price" }, "priceRateID": { "type": "integer" }, "bidDiscounted": { "type": "number", "format": "float", "description": "Obsolete" }, "askDiscounted": { "type": "number", "format": "float", "description": "Obsolete" }, "unitMarginBidDiscounted": { "type": "number", "format": "float", "description": "Obsolete" }, "unitMarginAskDiscounted": { "type": "number", "format": "float", "description": "Obsolete" } } } } } }, "PortfolioResponse": { "type": "object", "description": "Comprehensive portfolio information including positions, orders, and account status", "properties": { "clientPortfolio": { "type": "object", "description": "Container for all portfolio-related information", "properties": { "positions": { "type": "array", "description": "List of currently open trading positions", "items": { "$ref": "#/components/schemas/Position" } }, "credit": { "type": "number", "format": "float", "description": "Available trading balance in USD, representing funds available for new positions" }, "mirrors": { "type": "array", "description": "Copy trading configurations and positions", "items": { "type": "object", "description": "Individual mirror trading setup", "properties": { "mirrorID": { "type": "integer", "description": "Unique identifier for the mirror trading configuration" }, "CID": { "type": "integer", "description": "Customer ID associated with the mirror" }, "parentCID": { "type": "integer", "description": "Customer ID of the trader being copied" }, "stopLossPercentage": { "type": "number", "format": "float", "description": "The precentage of the mirror value that the StopLossAmount represented at the time of the last edit. Adding or removing funds from the mirror will trigger recalculation of StopLossAmount based on this value compared to the current mirror value" }, "isPaused": { "type": "boolean", "description": "Indication if the mirror is currently paused, restricting open of additional positions inside the mirror" }, "copyExistingPositions": { "type": "boolean", "description": "Indication if mirror originally copied all parent existing position on mirror registration" }, "availableAmount": { "type": "number", "format": "float", "description": "Available to trade USD balance in the mirror. This balance is reserved for mirror operations" }, "stopLossAmount": { "type": "number", "format": "float", "description": "USD value of the mirror at which MirrorStopLoss will be triggered and cause liquidation of the mirror. Adding or removing funds from the mirror will trigger recalculation of this value based on StopLossPercentage compared to the current mirror value" }, "initialInvestment": { "type": "number", "format": "float", "description": "USD amount initially invested in the mirror" }, "depositSummary": { "type": "number", "format": "float", "description": "Total USD amount deposited into the mirror after initial investment" }, "withdrawalSummary": { "type": "number", "format": "float", "description": "Total USD amount withdrawn from the mirror" }, "positions": { "type": "array", "description": "Positions within this copy trading mirror", "items": { "$ref": "#/components/schemas/Position" } }, "entryOrders": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "exitOrders": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "parentUsername": { "type": "string", "description": "Username of the trader being copied" }, "closedPositionsNetProfit": { "type": "number", "format": "float", "description": "Total USD net profit of all positions that closed in the mirror" }, "startedCopyDate": { "type": "string", "format": "date-time", "description": "Date and time when the mirror trading was initiated" }, "pendingForClosure": { "type": "boolean", "description": "Indication if the mirror is in closure process" }, "parentMirrors": { "type": "array", "items": { "type": "object" } }, "mirrorCalculationType": { "type": "integer", "description": "(Obsolete) Mirror positions weights calculation methodology" }, "ordersForOpen": { "type": "array", "description": "Active orders in the mirror to open positions", "items": { "type": "object" } }, "ordersForClose": { "type": "array", "description": "Active orders in the mirror to close positions", "items": { "type": "object" } }, "ordersForCloseMultiple": { "type": "array", "description": "Active orders in the mirror to close positions", "items": { "type": "object" } }, "delayedOrderForClose": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "delayedOrderForOpen": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "mirrorStatusID": { "type": "integer", "description": "Current status of the mirror. 0 - Active, 1 - Paused, 2 - Pending Closure, 3 - In Alignment Process" } } } }, "orders": { "type": "array", "description": "List of pending orders", "items": { "type": "object", "description": "Individual order details", "properties": { "orderID": { "type": "integer", "description": "Unique identifier for the order" }, "CID": { "type": "integer", "description": "Customer ID associated with the order" }, "openDateTime": { "type": "string", "format": "date-time", "description": "Date and time when the order was created" }, "instrumentID": { "type": "integer", "description": "Identifier of the instrument being traded" }, "isBuy": { "type": "boolean", "description": "Direction of the position. true - Long, false - Short" }, "takeProfitRate": { "type": "number", "format": "float", "description": "The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price." }, "stopLossRate": { "type": "number", "format": "float", "description": "The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price." }, "rate": { "type": "number", "format": "float", "description": "Asset rate at which to send market order to the market" }, "amount": { "type": "number", "format": "float", "description": "USD amount to invest in the position" }, "leverage": { "type": "number", "format": "float", "description": "Leverage multiplier to apply to the position" }, "units": { "type": "number", "format": "float", "description": "Units to open the position. If this value is greater than zero the position will open on the requested units, and not amount" }, "isTslEnabled": { "type": "boolean", "description": "Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far." }, "executionType": { "type": "integer", "description": "Type of order execution" }, "isDiscounted": { "type": "boolean", "description": "Obsolete" } } } }, "stockOrders": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "entryOrders": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "exitOrders": { "type": "array", "description": "Obsolete", "items": { "type": "object" } }, "ordersForOpen": { "type": "array", "description": "Active orders to open positions", "items": { "type": "object" } }, "ordersForClose": { "type": "array", "description": "Active orders to close positions", "items": { "type": "object" } }, "ordersForCloseMultiple": { "type": "array", "description": "Active orders to close multiple positions", "items": { "type": "object" } }, "bonusCredit": { "type": "number", "format": "float", "description": "Bonus credit amount in USD available for trading" } } } } }, "CashAccountsResponse": { "type": "object", "description": "Response containing the user's cash accounts and creation eligibility status", "required": [ "accounts", "eligibilityStatus" ], "properties": { "accounts": { "type": "array", "description": "List of cash accounts", "items": { "$ref": "#/components/schemas/CashAccount" } }, "eligibilityStatus": { "type": "string", "description": "User's creation eligibility status for cash accounts", "enum": [ "Ineligible", "CardAndIbanEligible", "IbanEligible" ], "example": "CardAndIbanEligible" } } }, "CashAccount": { "type": "object", "description": "A single cash account with bank details and cards (account type is implied by the cash-accounts API surface)", "required": [ "id", "currency" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the cash account", "example": "b2c3d4e5-f6a7-8901-bcde-f12345678901" }, "currency": { "type": "string", "description": "ISO 4217 currency code (e.g. GBP, EUR, AUD, DKK)", "example": "GBP" }, "status": { "type": "string", "description": "Cash account status", "enum": [ "Active", "ReceiveOnly", "SpendOnly", "Suspended", "Blocked" ], "example": "Active" }, "bankAccount": { "$ref": "#/components/schemas/BankAccount", "description": "Bank account linked to this cash account" }, "cards": { "type": "array", "description": "Payment cards linked to this cash account", "items": { "$ref": "#/components/schemas/Card" } } } }, "BankAccountIdentifier": { "type": "object", "required": [ "type", "value" ], "description": "One bank identifier entry as key/value pair. `type` defines the identifier kind and `value` contains the identifier as a string.", "properties": { "type": { "type": "string", "description": "Identifier type key. Allowed examples include bankAccountNumber, ncc, iban, bic, sortCode, and bsbCode.", "example": "iban" }, "value": { "type": "string", "description": "Identifier value as returned by the bank.", "example": "GB08MRMI04133511549380" } } }, "BankAccount": { "type": "object", "description": "Bank account linked to the cash account", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the bank account", "example": "0f5270fe-200a-4c35-b788-bda212973fa2" }, "accountName": { "type": "string", "description": "Name on the bank account", "example": "John Doe" }, "identifiers": { "type": "array", "description": "List of bank identifiers represented as key/value entries. Identifier type availability is bank and country specific.", "items": { "$ref": "#/components/schemas/BankAccountIdentifier" } }, "region": { "type": "string", "description": "Region of the bank account", "example": "UK" }, "countryCode": { "type": "string", "description": "ISO 3166-1 alpha-2 country code", "example": "GB" }, "bankProvider": { "type": "string", "description": "Banking provider name", "example": "ClearBank" }, "institutionName": { "type": "string", "description": "Name of the banking institution", "example": "ClearBank" } } }, "Card": { "type": "object", "description": "Payment card linked to the cash account", "required": [ "id", "status" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier of the card", "example": "c3d4e5f6-a7b8-9012-cdef-123456789012" }, "status": { "type": "string", "description": "Current card status", "enum": [ "NotActivated", "Activated", "Blocked", "Suspended", "Risk", "Stolen", "Lost", "Expired", "Fraud" ], "example": "Activated" }, "maskedPan": { "type": "string", "description": "Masked card number", "example": "459688******0196" }, "isVirtual": { "type": "boolean", "description": "Whether this is a virtual card", "example": false }, "name": { "type": "string", "description": "Card display name", "example": "John Doe" }, "created": { "type": "string", "format": "date-time", "description": "Date and time the card was created", "example": "2025-01-15T12:00:00" }, "expirationDate": { "type": "string", "format": "date-time", "description": "Card expiration date", "example": "2028-01-31T23:59:59" } } }, "CashAccountTransactionsResponse": { "type": "object", "required": [ "results", "pagination" ], "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/CashAccountTransaction" } }, "pagination": { "$ref": "#/components/schemas/PaginationCursor" } } }, "CashAccountTransaction": { "type": "object", "required": [ "id", "accountId", "transactionType", "transactionSubtype", "direction", "status", "amount", "currency", "postedAt" ], "properties": { "id": { "type": "string" }, "accountId": { "type": "string" }, "transactionType": { "type": "string", "enum": [ "card", "internalTransfer", "bankTransfer", "balanceAdjustment" ] }, "transactionSubtype": { "type": "string", "enum": [ "unknown", "cardPayment", "contactless", "onlinePayment", "cashWithdrawal", "transferReceived", "transfer", "paymentReceived", "payment", "refund", "fee", "creditBalanceAdjustment", "debitBalanceAdjustment", "directDebit", "cryptoToFiat" ] }, "direction": { "type": "string", "enum": [ "debit", "credit" ] }, "status": { "type": "string", "enum": [ "failed", "authorized", "settled", "rejected", "returned", "expired", "unknown" ] }, "amount": { "type": "string", "description": "Decimal amount as string" }, "currency": { "type": "string", "description": "ISO 4217 alphabetic currency code" }, "originalAmount": { "type": "string", "nullable": true }, "originalCurrency": { "type": "string", "nullable": true }, "conversionRate": { "type": "string", "nullable": true }, "postedAt": { "type": "string", "format": "date-time" }, "counterparty": { "$ref": "#/components/schemas/Counterparty" }, "cardTransactionDetails": { "$ref": "#/components/schemas/CardTransactionDetails", "nullable": true }, "bankTransferTransactionDetails": { "$ref": "#/components/schemas/BankTransferDetails", "nullable": true }, "internalTransferTransactionDetails": { "$ref": "#/components/schemas/InternalTransferDetails", "nullable": true } } }, "PaginationCursor": { "type": "object", "required": [ "pageSize", "hasNext" ], "properties": { "pageSize": { "type": "integer" }, "nextPageToken": { "type": "string", "nullable": true }, "hasNext": { "type": "boolean" } } }, "Counterparty": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "merchant", "bank_account", "internal_account", "unknown" ] } } }, "CardTransactionDetails": { "type": "object", "properties": { "cardId": { "type": "string" }, "merchantName": { "type": "string" }, "country": { "type": "string" }, "authorizationStatus": { "type": "string", "enum": [ "unknown", "normal", "preAuthorize", "finalAuthorize", "incremental", "instalment", "preferredCustomer", "recurring", "delayedCharges", "noShow", "authorizeAdvice", "refund", "reversal", "sysReversal", "accountFunding" ] } } }, "BankTransferDetails": { "type": "object", "properties": { "bankIdentifier": { "type": "array", "items": { "$ref": "#/components/schemas/BankIdentifierEntry" } }, "description": { "type": "string" }, "paymentReference": { "type": "string" } } }, "BankIdentifierEntry": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "InternalTransferDetails": { "type": "object", "required": [ "transferId" ], "properties": { "transferId": { "type": "string" } } }, "CashAccountEligibilityResponse": { "type": "object", "required": [ "eligibilityStatus" ], "properties": { "eligibilityStatus": { "type": "string", "enum": [ "Ineligible", "CardAndIbanEligible", "IbanEligible" ] }, "ineligibilityReasons": { "type": "array", "items": { "type": "string" }, "nullable": true }, "prerequisite": { "$ref": "#/components/schemas/CashAccountPrerequisite", "nullable": true }, "contactInfo": { "$ref": "#/components/schemas/CashAccountContactInfo", "nullable": true }, "userInfo": { "$ref": "#/components/schemas/CashAccountUserInfo", "nullable": true } } }, "CashAccountPrerequisite": { "type": "object", "properties": { "tncInfo": { "$ref": "#/components/schemas/TncInfo" } } }, "CashAccountContactInfo": { "type": "object", "properties": { "address": { "type": "string" }, "buildingNumber": { "type": "string" }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string" }, "phone": { "type": "string" } } }, "CashAccountUserInfo": { "type": "object", "properties": { "firstName": { "type": "string" }, "middleName": { "type": "string", "nullable": true }, "lastName": { "type": "string" } } }, "CreateCashAccountRequest": { "type": "object", "required": [ "requestReferenceId", "tncDocId" ], "properties": { "requestReferenceId": { "type": "string", "format": "uuid", "description": "Client-generated idempotency key" }, "tncDocId": { "type": "integer", "format": "int64", "description": "Terms and conditions document ID accepted by the user" } } }, "CreateCashAccountAcceptedResponse": { "type": "object", "required": [ "requestReferenceId", "eligibilityStatus", "status" ], "properties": { "requestReferenceId": { "type": "string", "format": "uuid" }, "eligibilityStatus": { "type": "string" }, "status": { "type": "string", "example": "Accepted" } } }, "CashAccountCreationStatusResponse": { "type": "object", "required": [ "requestReferenceId", "status" ], "properties": { "requestReferenceId": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "Pending", "Success", "Failure" ] }, "updatedAt": { "type": "string", "format": "date-time", "nullable": true }, "account": { "$ref": "#/components/schemas/CashAccount", "nullable": true, "description": "Present only when status is Success" } } }, "BusinessErrorResponse": { "type": "object", "required": [ "errorCode", "errorMessage" ], "properties": { "errorCode": { "type": "string" }, "errorMessage": { "type": "string" } } }, "meResponse": { "type": "object", "description": "Profile of the authenticated user across eToro account types, including granted OAuth scopes.", "required": [ "gcid", "realCid", "demoCid", "username", "playerLevel", "gender", "language", "dateOfBirth", "scopes" ], "properties": { "gcid": { "type": "integer", "description": "Global Customer ID - the unique identifier for the user across all eToro systems." }, "realCid": { "type": "integer", "description": "Real account Customer ID - the identifier for the user's real trading account." }, "demoCid": { "type": "integer", "description": "Demo account Customer ID - the identifier for the user's virtual/demo trading account." }, "username": { "type": "string", "description": "The user's unique username." }, "firstName": { "type": "string", "nullable": true, "description": "The user's first name." }, "middleName": { "type": "string", "nullable": true, "description": "The user's middle name." }, "lastName": { "type": "string", "nullable": true, "description": "The user's last name." }, "playerLevel": { "type": "integer", "description": "Player level. Possible values: 1 (Bronze), 2 (Platinum), 3 (Gold), 4 (Internal), 5 (Silver), 6 (PlatinumPlus), 7 (Diamond)." }, "gender": { "type": "integer", "description": "Gender. Possible values: 0 (Unknown), 1 (Male), 2 (Female)." }, "language": { "type": "integer", "description": "Language ID (e.g. 1 = English, 2 = German)." }, "dateOfBirth": { "type": "string", "description": "Date of birth." }, "lei": { "type": "string", "nullable": true, "description": "Legal Entity Identifier (LEI), when applicable." }, "scopes": { "type": "array", "description": "OAuth scopes granted to the authenticated token.", "items": { "type": "string" } } } }, "ExposureHistoryResponse": { "type": "object", "required": [ "userName", "results" ], "properties": { "userName": { "type": "string" }, "results": { "type": "array", "description": "Daily snapshots ordered ascending by date.", "items": { "$ref": "#/components/schemas/ExposureHistoryEntry" } } } }, "ExposureHistoryEntry": { "type": "object", "required": [ "date", "absExposurePct", "exposureItems" ], "properties": { "date": { "type": "string", "format": "date", "description": "ISO 8601 date of this snapshot (YYYY-MM-DD)" }, "absExposurePct": { "type": "number", "description": "Sum of absolute exposure across all instruments as a ratio of total daily investment. Decimal fraction: 0.5 = 50%." }, "exposureItems": { "type": "array", "description": "Per-instrument exposure breakdown", "items": { "$ref": "#/components/schemas/ExposureItem" } } } }, "ExposureItem": { "type": "object", "required": [ "instrumentId", "symbol", "netExposurePct", "absExposurePct" ], "properties": { "instrumentId": { "type": "integer" }, "symbol": { "type": "string", "description": "Trading symbol for this instrument (e.g. AAPL, TSLA)" }, "netExposurePct": { "type": "number", "description": "Net exposure for this instrument as a ratio of total equity. Signed - positive = long, negative = short. Decimal fraction: 0.5 = 50%." }, "absExposurePct": { "type": "number", "description": "Absolute exposure for this instrument as a ratio of total equity. Always positive. Decimal fraction: 0.5 = 50%." } } }, "Attachment": { "type": "object", "description": "Media or link attachment", "properties": { "url": { "type": "string", "description": "Full URL of the attachment", "example": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg" }, "title": { "type": "string", "description": "Title of the attachment", "example": "Tesla Q4 Earnings Chart" }, "host": { "type": "string", "description": "Host domain of the attachment", "example": "cdn.etoro.com" }, "description": { "type": "string", "description": "Short description of the attachment", "example": "Tesla quarterly earnings breakdown" }, "mediaType": { "type": "string", "enum": [ "None", "Link", "Image", "Video" ], "description": "Type of media", "example": "Image" }, "media": { "type": "object", "description": "Media content details", "properties": { "image": { "type": "object", "description": "Image dimensions and URL", "properties": { "width": { "type": "integer", "description": "Width in pixels", "example": 1200 }, "height": { "type": "integer", "description": "Height in pixels", "example": 630 }, "url": { "type": "string", "description": "Image URL", "example": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg" } } }, "video": { "type": "object", "description": "Video source details", "properties": { "videoSourceId": { "type": "string", "description": "External video ID", "example": "dQw4w9WgXcQ" }, "videoSource": { "type": "string", "enum": [ "None", "YouTube", "Vimeo" ], "description": "Video provider", "example": "YouTube" }, "image": { "type": "object", "description": "Video thumbnail", "properties": { "width": { "type": "integer", "description": "Thumbnail width in pixels", "example": 1280 }, "height": { "type": "integer", "description": "Thumbnail height in pixels", "example": 720 }, "url": { "type": "string", "description": "Thumbnail URL", "example": "https://img.youtube.com/vi/dQw4w9WgXcQ/hqdefault.jpg" } } } } } } } } }, "Avatar": { "type": "object", "properties": { "small": { "type": "string", "nullable": true }, "medium": { "type": "string", "nullable": true }, "large": { "type": "string", "nullable": true }, "svg": { "$ref": "#/components/schemas/Svg" } }, "additionalProperties": false }, "Comment": { "type": "object", "description": "A comment (or reply) on a post, wrapped with interaction data", "properties": { "entity": { "type": "object", "description": "Core comment data", "properties": { "id": { "type": "string", "description": "Comment ID", "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }, "owner": { "$ref": "#/components/schemas/User" }, "obsoleteId": { "type": "string", "description": "Legacy numeric comment ID", "example": "98765" }, "created": { "type": "string", "format": "date-time", "description": "Creation timestamp", "example": "2025-01-15T10:30:00Z" }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last-edited timestamp", "example": "2025-01-15T11:00:00Z" }, "message": { "type": "object", "description": "Post/comment text content", "properties": { "text": { "type": "string", "description": "Text content", "example": "Excited about $TSLA earnings next week!" }, "languageCode": { "type": "string", "description": "BCP-47 language code", "example": "en" } } }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "mentions": { "type": "array", "items": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "isDirect": { "type": "boolean", "description": "Direct @-mention", "example": true } } } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "market": { "$ref": "#/components/schemas/Market" } } } }, "isSpam": { "type": "boolean", "description": "True when classified as spam", "example": false }, "editStatus": { "type": "string", "enum": [ "None", "Edited", "Moderated" ], "description": "Edit lifecycle status", "example": "None" }, "parent": { "type": "object", "description": "Parent entity reference", "properties": { "id": { "type": "string", "description": "Parent entity ID", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "obsoleteId": { "type": "string", "description": "Legacy parent ID", "example": "12345" }, "type": { "type": "string", "enum": [ "Unknown", "Post", "Comment", "Reply" ], "description": "Parent entity type", "example": "Post" } } } } }, "repliesCount": { "type": "integer", "description": "Number of direct replies to this comment", "example": 2 }, "replies": { "type": "array", "description": "Inline reply preview. Each entry has the same shape as Comment; nested `replies` arrays are not populated at this level.", "items": { "$ref": "#/components/schemas/Comment" } }, "emotionsData": { "type": "object", "description": "Aggregated emotions (likes) on an entity", "properties": { "like": { "type": "object", "properties": { "paging": { "type": "object", "description": "Pagination cursor info", "properties": { "totalCount": { "type": "integer", "description": "Total number of items", "example": 42 }, "offsetEntityId": { "type": "string", "description": "Opaque cursor for next page", "example": "b2c3d4e5-f6a7-4890-bcde-f23456789012" }, "next": { "type": "string", "description": "URL to next page", "example": "/api/v1/reactions/3fa85f64-5717-4562-b3fc-2c963f66afa6/emotions?offset=10&take=10" } } }, "emotions": { "type": "array", "items": { "$ref": "#/components/schemas/Emotion" } } } } } }, "requesterContext": { "type": "object", "description": "Requester's relationship state with the comment", "properties": { "isOwner": { "type": "boolean", "description": "Requester is the comment owner", "example": false }, "isFlaggingAsSpam": { "type": "boolean", "description": "Requester flagged this as spam", "example": false }, "isSubscribed": { "type": "boolean", "description": "Requester is subscribed to notifications", "example": false }, "isLiking": { "type": "boolean", "description": "Requester has liked this comment", "example": false }, "isSaved": { "type": "boolean", "description": "Requester has saved this comment", "example": false }, "isPinned": { "type": "boolean", "description": "Comment is pinned", "example": false }, "isRequesterBlocking": { "type": "boolean", "description": "Requester is blocking the comment owner", "example": false }, "isInteractionRestricted": { "type": "boolean", "description": "Owner has blocked the requester", "example": false } } } } }, "DiscussionUpdateRequest": { "type": "object", "description": "Request body for updating a post. Owner is derived from the auth token \u2014 do not supply it.", "properties": { "message": { "type": "string", "description": "Updated text content", "example": "Updating my view on $TSLA \u2014 still bullish but watching earnings closely." }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "Emotion": { "type": "object", "description": "A like reaction on a post or comment", "properties": { "type": { "type": "string", "enum": [ "Like" ], "description": "Emotion type (currently only Like is supported)", "example": "Like" }, "id": { "type": "string", "description": "Emotion ID", "example": "b2c3d4e5-f6a7-4890-bcde-f23456789012" }, "owner": { "$ref": "#/components/schemas/User" }, "obsoleteId": { "type": "string", "description": "Legacy numeric emotion ID", "example": "54321" }, "parent": { "type": "object", "description": "Parent entity reference", "properties": { "id": { "type": "string", "description": "Parent entity ID", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "obsoleteId": { "type": "string", "description": "Legacy parent ID", "example": "12345" }, "type": { "type": "string", "enum": [ "Unknown", "Post", "Comment", "Reply" ], "description": "Parent entity type", "example": "Post" } } }, "created": { "type": "string", "format": "date-time", "description": "When the like was created", "example": "2025-01-15T10:30:00Z" } } }, "Market": { "type": "object", "description": "Financial instrument / market", "properties": { "id": { "type": "string", "description": "Market identifier", "example": "TSLA" }, "symbolName": { "type": "string", "description": "Ticker symbol", "example": "TSLA" }, "displayName": { "type": "string", "description": "Human-readable name", "example": "Tesla" }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last update timestamp", "example": "2025-01-15T00:00:00Z" }, "assetType": { "type": "string", "enum": [ "Stocks", "Bonds", "ETF", "Index", "Warrants", "Options", "Futures", "CFD", "TRS", "FOREX", "CommodityMetals", "CommodityEnergyAgriculture", "CryptoCoin", "NFT" ], "description": "Asset class", "example": "Stocks" }, "internalId": { "type": "integer", "description": "Internal numeric market ID", "example": 59114 }, "avatar": { "type": "object", "description": "Market logo images", "properties": { "small": { "type": "string", "description": "Small logo URL (32 px)", "example": "https://cdn.etoro.com/assets/img/markets/TSLA/small.png" }, "medium": { "type": "string", "description": "Medium logo URL (64 px)", "example": "https://cdn.etoro.com/assets/img/markets/TSLA/medium.png" }, "large": { "type": "string", "description": "Large logo URL (128 px)", "example": "https://cdn.etoro.com/assets/img/markets/TSLA/large.png" }, "svg": { "type": "object", "nullable": true, "description": "SVG logo with brand colours", "properties": { "url": { "type": "string", "description": "SVG URL", "example": "https://cdn.etoro.com/assets/img/markets/TSLA/logo.svg" }, "backgroundColor": { "type": "string", "description": "Brand background colour (hex)", "example": "#CC0000" }, "textColor": { "type": "string", "description": "Brand text colour (hex)", "example": "#FFFFFF" } } } } }, "application": { "type": "string", "enum": [ "eToro", "Delta", "Gatsby" ], "description": "Source application", "example": "eToro" }, "metadata": { "type": "string", "description": "Opaque JSON metadata string", "example": "{}" }, "assetTypeId": { "type": "integer", "description": "Numeric asset type ID", "example": 10 }, "assetTypeSubCategoryId": { "type": "integer", "description": "Numeric asset sub-category ID", "example": 101 } } }, "Post": { "type": "object", "description": "A feed post returned by create / update / get-by-ID", "properties": { "id": { "type": "string", "description": "Unique post ID", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "owner": { "$ref": "#/components/schemas/User" }, "obsoleteId": { "type": "string", "description": "Legacy numeric post ID", "example": "12345" }, "created": { "type": "string", "format": "date-time", "description": "Creation timestamp", "example": "2025-01-15T10:30:00Z" }, "message": { "type": "object", "description": "Post/comment text content", "properties": { "text": { "type": "string", "description": "Text content", "example": "Excited about $TSLA earnings next week!" }, "languageCode": { "type": "string", "description": "BCP-47 language code", "example": "en" } } }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last-edited timestamp", "example": "2025-01-16T08:00:00Z" }, "isDeleted": { "type": "boolean", "description": "True when the post has been soft-deleted", "example": false }, "type": { "type": "string", "enum": [ "Default", "Share", "MarketEvent", "Trade", "Order", "Copy", "Poll", "Article" ], "description": "Post type", "example": "Default" }, "metadata": { "type": "object", "description": "Post type\u2013specific metadata \u2014 only the relevant key is populated", "properties": { "share": { "type": "object", "description": "Share metadata \u2014 present when type is Share", "properties": { "sharedPost": { "$ref": "#/components/schemas/Post" }, "sharedOriginPost": { "$ref": "#/components/schemas/Post" } } }, "marketEvent": { "type": "object", "description": "Market event metadata \u2014 present when type is MarketEvent", "properties": { "earningReportId": { "type": "integer", "description": "Earnings report ID", "example": 1042 }, "market": { "$ref": "#/components/schemas/Market" }, "stocksIndustryId": { "type": "integer", "description": "Industry sector ID", "example": 15 }, "earningsDate": { "type": "string", "format": "date-time", "description": "Earnings announcement date", "example": "2025-01-15T10:30:00Z" }, "isBeforeMarketOpen": { "type": "boolean", "description": "Event occurs before market open", "example": true }, "earningsYear": { "type": "integer", "description": "Fiscal year of earnings", "example": 2025 }, "earningsQuarter": { "type": "integer", "description": "Fiscal quarter (1\u20134)", "example": 1 }, "verified": { "type": "boolean", "description": "Whether the event data is verified", "example": true }, "marketCap": { "type": "number", "format": "double", "description": "Market capitalisation in USD", "example": 800000000000 }, "estimatedEps": { "type": "number", "format": "double", "description": "Estimated earnings per share", "example": 1.42 }, "estimatedSales": { "type": "number", "format": "double", "description": "Estimated revenue in USD", "example": 25000000000 }, "tagName": { "type": "string", "enum": [ "Reports", "Dividends", "Split", "ReverseSplit" ], "description": "Event tag", "example": "Reports" }, "textKey": { "type": "integer", "description": "Localisation key for event label", "example": 3 } } }, "trade": { "type": "object", "description": "Trade metadata \u2014 present when type is Trade", "properties": { "type": { "type": "string", "enum": [ "Open", "Close" ], "description": "Trade lifecycle stage", "example": "Open" }, "positionId": { "type": "integer", "description": "Internal position ID", "example": 987654321 }, "market": { "$ref": "#/components/schemas/Market" }, "gain": { "type": "number", "format": "float", "description": "P&L gain/loss percentage", "example": 12.5 }, "rate": { "type": "number", "format": "float", "description": "Entry/exit rate", "example": 245.3 }, "direction": { "type": "string", "enum": [ "Long", "Short" ], "description": "Trade direction", "example": "Long" } } }, "order": { "type": "object", "description": "Order metadata \u2014 present when type is Order", "properties": { "type": { "type": "string", "enum": [ "Open", "Close" ], "description": "Order lifecycle stage", "example": "Open" }, "orderId": { "type": "integer", "description": "Internal order ID", "example": 123456789 }, "market": { "$ref": "#/components/schemas/Market" }, "rate": { "type": "number", "format": "float", "description": "Limit/entry rate", "example": 240 }, "direction": { "type": "string", "enum": [ "Long", "Short" ], "description": "Order direction", "example": "Long" } } }, "copy": { "type": "object", "description": "Copy metadata \u2014 present when type is Copy", "properties": { "type": { "type": "string", "enum": [ "Start", "Stop" ], "description": "Copy event type", "example": "Start" }, "user": { "$ref": "#/components/schemas/User" } } }, "poll": { "type": "object", "description": "Poll metadata \u2014 present when type is Poll", "properties": { "id": { "type": "integer", "description": "Poll ID", "example": 55 }, "title": { "type": "string", "description": "Poll question", "example": "Where do you see $TSLA by year-end?" }, "gcid": { "type": "integer", "description": "Poll creator GCID", "example": 7890 }, "options": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Option ID", "example": 1 }, "index": { "type": "integer", "description": "Display order (1-based, matches the index supplied at poll creation)", "example": 1, "minimum": 1 }, "text": { "type": "string", "description": "Option label", "example": "Bullish" }, "isUserVoted": { "type": "boolean", "description": "Requester voted for this option", "example": false }, "votesCount": { "type": "integer", "description": "Total votes for this option", "example": 128 } } } } } }, "article": { "type": "object", "description": "Article metadata \u2014 present when post type is Article", "properties": { "id": { "type": "integer", "description": "Article ID", "example": 9001 }, "title": { "type": "string", "description": "Article title", "example": "Why TSLA Could Hit $500 This Year" }, "url": { "type": "string", "description": "Canonical article URL", "example": "https://etoro.com/news/markets/articles/why-tsla-could-hit-500" }, "rating": { "type": "string", "enum": [ "Bearish", "Bullish" ], "nullable": true, "description": "Analyst rating", "example": "Bullish" }, "featuredImage": { "$ref": "#/components/schemas/Attachment" }, "body": { "type": "string", "description": "Full article HTML body", "example": "
Tesla has shown strong fundamentals...
" }, "bodyPreview": { "type": "string", "description": "Plain-text preview (\u2248200 chars)", "example": "Tesla has shown strong fundamentals this quarter..." }, "aiSummary": { "type": "string", "description": "AI-generated summary", "example": "Analyst argues Tesla's pipeline supports a $500 target by year-end." }, "languageCode": { "type": "string", "description": "BCP-47 language code", "example": "en" }, "status": { "type": "string", "enum": [ "Draft", "Published", "Deleted" ], "description": "Publication status", "example": "Published" }, "editStatus": { "type": "string", "enum": [ "None", "Edited", "Moderated" ], "description": "Edit status", "example": "None" }, "ownerId": { "type": "integer", "description": "Author's internal user ID", "example": 7890 }, "created": { "type": "string", "format": "date-time", "description": "When the article was created", "example": "2025-01-15T10:30:00Z" }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last edit timestamp", "example": "2025-01-16T08:00:00Z" }, "published": { "type": "string", "format": "date-time", "nullable": true, "description": "Publication timestamp", "example": "2025-01-16T09:00:00Z" }, "readingTimeMinutes": { "type": "number", "format": "float", "description": "Estimated reading time", "example": 3.5 }, "wordCount": { "type": "integer", "description": "Word count", "example": 750 } } } } }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "market": { "$ref": "#/components/schemas/Market" } } } }, "mentions": { "type": "array", "items": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "isDirect": { "type": "boolean", "description": "Direct @-mention", "example": true } } } }, "isSpam": { "type": "boolean", "description": "True when the post is classified as spam", "example": false }, "editStatus": { "type": "string", "enum": [ "None", "Edited", "Moderated" ], "description": "Edit lifecycle status", "example": "None" } } }, "Svg": { "type": "object", "properties": { "url": { "type": "string", "nullable": true }, "backgroundColor": { "type": "string", "nullable": true }, "textColor": { "type": "string", "nullable": true } }, "additionalProperties": false }, "User": { "type": "object", "description": "eToro user profile (slim projection)", "properties": { "id": { "type": "string", "description": "User's GCID (string form)", "example": "7890" }, "username": { "type": "string", "description": "Unique username", "example": "johndoe" }, "firstName": { "type": "string", "description": "First name", "example": "John" }, "lastName": { "type": "string", "description": "Last name", "example": "Doe" }, "avatar": { "type": "object", "description": "Profile picture URLs", "properties": { "small": { "type": "string", "description": "32 px avatar URL", "example": "https://etoro-cdn.etorostatic.com/avatars/150X150/johndoe.jpg" }, "medium": { "type": "string", "description": "64 px avatar URL", "example": "https://etoro-cdn.etorostatic.com/avatars/200X200/johndoe.jpg" }, "large": { "type": "string", "description": "128 px avatar URL", "example": "https://etoro-cdn.etorostatic.com/avatars/300X300/johndoe.jpg" }, "svg": { "type": "object", "nullable": true, "description": "SVG avatar with brand colours (null when not available)", "properties": { "url": { "type": "string", "description": "SVG URL", "example": "https://etoro-cdn.etorostatic.com/avatars/svg/johndoe.svg" }, "backgroundColor": { "type": "string", "description": "Background colour hex", "example": "#2196F3" }, "textColor": { "type": "string", "description": "Text colour hex", "example": "#FFFFFF" } } } } }, "roles": { "type": "array", "description": "User roles", "items": { "type": "string", "enum": [ "Regular", "PI", "Moderator", "Anonymous", "eToroTeam", "eTorian", "CopyPortfolio", "Depositor", "Admin", "Verified", "Analyst" ] }, "example": [ "Regular" ] }, "isBlocked": { "type": "boolean", "description": "Owner has blocked the requester", "example": false }, "isPrivate": { "type": "boolean", "description": "User's profile is private", "example": false }, "countryCode": { "type": "integer", "description": "ISO numeric country code", "example": 840 }, "piLevel": { "type": "integer", "description": "Popular Investor level (0 = not PI)", "example": 0 } } }, "DiscussionCreateRequest": { "type": "object", "description": "Request body for creating a new discussion post", "properties": { "message": { "type": "string", "description": "Post text content (max 1000 chars)", "example": "Just opened a long position on $TSLA \u2014 strong earnings ahead!" }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "Attachments": { "type": "array", "description": "List of attachments for a post or comment (request body format)", "items": { "type": "object", "description": "Media or link attachment", "properties": { "url": { "type": "string", "description": "Full URL of the attachment", "example": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg" }, "title": { "type": "string", "description": "Title of the attachment", "example": "Tesla Q4 Earnings Chart" }, "host": { "type": "string", "description": "Host domain of the attachment", "example": "cdn.etoro.com" }, "description": { "type": "string", "description": "Short description of the attachment", "example": "Tesla quarterly earnings breakdown" }, "mediaType": { "type": "string", "enum": [ "None", "Link", "Image" ], "description": "Type of media (video not supported for upload)", "example": "Image" }, "media": { "type": "object", "description": "Media content details (images only)", "properties": { "image": { "type": "object", "description": "Image dimensions and URL", "properties": { "width": { "type": "integer", "description": "Width in pixels", "example": 1200 }, "height": { "type": "integer", "description": "Height in pixels", "example": 630 }, "url": { "type": "string", "description": "Image URL", "example": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg" } } } } } } } }, "CommentCreateRequest": { "type": "object", "description": "Request body for creating a comment or reply", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "Comment text (max 500 chars)", "example": "Great analysis! I agree \u2014 the fundamentals are solid." }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "DiscussionsResponse": { "type": "object", "description": "Paginated feed response containing a list of discussions", "properties": { "discussions": { "type": "array", "items": { "$ref": "#/components/schemas/Discussion" } }, "paging": { "type": "object", "description": "Pagination info", "properties": { "next": { "type": "string", "description": "URL to fetch the next page", "example": "/api/v1/feeds/user/7890?offset=20&take=20" }, "offSet": { "type": "integer", "description": "Current page offset", "example": 0 }, "take": { "type": "integer", "description": "Page size used for this response", "example": 20 }, "version": { "type": "string", "description": "API version string", "example": "v1" } } }, "metadata": { "type": "object", "description": "Feed-level metadata for analytics", "properties": { "experimentName": { "type": "string", "description": "Active A/B experiment name", "example": "ForYouRankingV2" }, "streamType": { "type": "string", "description": "Actual stream/ranking type served", "example": "ForYou" }, "designatedStreamType": { "type": "string", "description": "Intended stream type (may differ during A/B)", "example": "ForYou" } } } } }, "Discussion": { "type": "object", "description": "A single discussion entry in a feed \u2014 wraps a Post with its interaction data", "properties": { "id": { "type": "string", "description": "Discussion wrapper ID (same as post ID)", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "post": { "$ref": "#/components/schemas/DiscussionsPost" }, "commentsData": { "type": "object", "description": "Inline comments preview", "properties": { "reactionPaging": { "type": "object", "properties": { "totalCount": { "type": "integer", "description": "Total comment count on this post", "example": 14 } } }, "comments": { "type": "array", "items": { "$ref": "#/components/schemas/Comment" } } } }, "emotionsData": { "type": "object", "description": "Aggregated emotions (likes) on an entity", "properties": { "like": { "type": "object", "properties": { "paging": { "type": "object", "description": "Pagination cursor info", "properties": { "totalCount": { "type": "integer", "description": "Total number of items", "example": 42 }, "offsetEntityId": { "type": "string", "description": "Opaque cursor for next page", "example": "b2c3d4e5-f6a7-4890-bcde-f23456789012" }, "next": { "type": "string", "description": "URL to next page", "example": "/api/v1/reactions/3fa85f64-5717-4562-b3fc-2c963f66afa6/emotions?offset=10&take=10" } } }, "emotions": { "type": "array", "items": { "$ref": "#/components/schemas/Emotion" } } } } } }, "requesterContext": { "type": "object", "description": "Requester's relationship state with the post", "properties": { "isOwner": { "type": "boolean", "description": "Requester is the post owner", "example": false }, "isFlaggingAsSpam": { "type": "boolean", "description": "Requester flagged this as spam", "example": false }, "isSubscribed": { "type": "boolean", "description": "Requester is subscribed to notifications", "example": false }, "isLiking": { "type": "boolean", "description": "Requester has liked this post", "example": true }, "isSaved": { "type": "boolean", "description": "Requester has saved this post", "example": false }, "isPinned": { "type": "boolean", "description": "Post is pinned for the requester", "example": false }, "isRequesterBlocking": { "type": "boolean", "description": "Requester is blocking the post owner", "example": false }, "isInteractionRestricted": { "type": "boolean", "description": "Owner has blocked the requester", "example": false }, "isFollowing": { "type": "boolean", "description": "Requester is following this post", "example": true } } }, "summary": { "type": "object", "description": "Post-level engagement counters", "properties": { "totalCommentsAndReplies": { "type": "integer", "description": "Sum of all comments and replies", "example": 14 }, "sharedCount": { "type": "integer", "description": "Number of times this post has been shared", "example": 3 } } }, "reason": { "nullable": true, "description": "Why this post appears in the feed (ForYou only). May be null or an object: { type: 'followed-user'|'instrument-trending', sourceId, owner }", "example": { "type": "followed-user", "sourceId": "7890", "owner": "johndoe" } } } }, "DiscussionsPost": { "type": "object", "description": "Post data embedded inside a Discussion feed item", "properties": { "id": { "type": "string", "description": "Post ID", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "owner": { "$ref": "#/components/schemas/User" }, "obsoleteId": { "type": "string", "description": "Legacy numeric post ID", "example": "12345" }, "message": { "type": "object", "description": "Post/comment text content", "properties": { "text": { "type": "string", "description": "Text content", "example": "Excited about $TSLA earnings next week!" }, "languageCode": { "type": "string", "description": "BCP-47 language code", "example": "en" } } }, "created": { "type": "string", "format": "date-time", "description": "Creation timestamp", "example": "2025-01-15T10:30:00Z" }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last-edited timestamp", "example": "2025-01-16T08:00:00Z" }, "type": { "type": "string", "enum": [ "Default", "Share", "MarketEvent", "Trade", "Order", "Copy", "Poll", "Article" ], "description": "Post type", "example": "Default" }, "isDeleted": { "type": "boolean", "description": "True when soft-deleted", "example": false }, "isSpam": { "type": "boolean", "description": "True when classified as spam", "example": false }, "editStatus": { "type": "string", "enum": [ "None", "Edited", "Moderated" ], "description": "Edit lifecycle status", "example": "None" }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "market": { "$ref": "#/components/schemas/Market" } } } }, "mentions": { "type": "array", "items": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "isDirect": { "type": "boolean", "description": "Direct @-mention", "example": true } } } }, "metadata": { "type": "object", "description": "Post type\u2013specific metadata \u2014 only the relevant key is populated", "properties": { "share": { "type": "object", "description": "Share metadata \u2014 present when type is Share", "properties": { "sharedPost": { "$ref": "#/components/schemas/DiscussionsPost" }, "sharedOriginPost": { "$ref": "#/components/schemas/DiscussionsPost" } } }, "marketEvent": { "type": "object", "description": "Market event metadata \u2014 present when type is MarketEvent", "properties": { "earningReportId": { "type": "integer", "description": "Earnings report ID", "example": 1042 }, "market": { "$ref": "#/components/schemas/Market" }, "stocksIndustryId": { "type": "integer", "description": "Industry sector ID", "example": 15 }, "earningsDate": { "type": "string", "format": "date-time", "description": "Earnings announcement date", "example": "2025-01-15T10:30:00Z" }, "isBeforeMarketOpen": { "type": "boolean", "description": "Event occurs before market open", "example": true }, "earningsYear": { "type": "integer", "description": "Fiscal year of earnings", "example": 2025 }, "earningsQuarter": { "type": "integer", "description": "Fiscal quarter (1\u20134)", "example": 1 }, "verified": { "type": "boolean", "description": "Whether the event data is verified", "example": true }, "marketCap": { "type": "number", "format": "double", "description": "Market capitalisation in USD", "example": 800000000000 }, "estimatedEps": { "type": "number", "format": "double", "description": "Estimated earnings per share", "example": 1.42 }, "estimatedSales": { "type": "number", "format": "double", "description": "Estimated revenue in USD", "example": 25000000000 }, "tagName": { "type": "string", "enum": [ "Reports", "Dividends", "Split", "ReverseSplit" ], "description": "Event tag", "example": "Reports" }, "textKey": { "type": "integer", "description": "Localisation key for event label", "example": 3 } } }, "trade": { "type": "object", "description": "Trade metadata \u2014 present when type is Trade", "properties": { "type": { "type": "string", "enum": [ "Open", "Close" ], "description": "Trade lifecycle stage", "example": "Open" }, "positionId": { "type": "integer", "description": "Internal position ID", "example": 987654321 }, "market": { "$ref": "#/components/schemas/Market" }, "gain": { "type": "number", "format": "float", "description": "P&L gain/loss percentage", "example": 12.5 }, "rate": { "type": "number", "format": "float", "description": "Entry/exit rate", "example": 245.3 }, "direction": { "type": "string", "enum": [ "Long", "Short" ], "description": "Trade direction", "example": "Long" } } }, "order": { "type": "object", "description": "Order metadata \u2014 present when type is Order", "properties": { "type": { "type": "string", "enum": [ "Open", "Close" ], "description": "Order lifecycle stage", "example": "Open" }, "orderId": { "type": "integer", "description": "Internal order ID", "example": 123456789 }, "market": { "$ref": "#/components/schemas/Market" }, "rate": { "type": "number", "format": "float", "description": "Limit/entry rate", "example": 240 }, "direction": { "type": "string", "enum": [ "Long", "Short" ], "description": "Order direction", "example": "Long" } } }, "copy": { "type": "object", "description": "Copy metadata \u2014 present when type is Copy", "properties": { "type": { "type": "string", "enum": [ "Start", "Stop" ], "description": "Copy event type", "example": "Start" }, "user": { "$ref": "#/components/schemas/User" } } }, "poll": { "type": "object", "description": "Poll metadata \u2014 present when type is Poll", "properties": { "id": { "type": "integer", "description": "Poll ID", "example": 55 }, "title": { "type": "string", "description": "Poll question", "example": "Where do you see $TSLA by year-end?" }, "gcid": { "type": "integer", "description": "Poll creator GCID", "example": 7890 }, "options": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Option ID", "example": 1 }, "index": { "type": "integer", "description": "Display order (1-based, matches the index supplied at poll creation)", "example": 1, "minimum": 1 }, "text": { "type": "string", "description": "Option label", "example": "Bullish" }, "isUserVoted": { "type": "boolean", "description": "Requester voted for this option", "example": false }, "votesCount": { "type": "integer", "description": "Total votes for this option", "example": 128 } } } } } }, "article": { "type": "object", "description": "Article metadata \u2014 present when post type is Article", "properties": { "id": { "type": "integer", "description": "Article ID", "example": 9001 }, "title": { "type": "string", "description": "Article title", "example": "Why TSLA Could Hit $500 This Year" }, "url": { "type": "string", "description": "Canonical article URL", "example": "https://etoro.com/news/markets/articles/why-tsla-could-hit-500" }, "rating": { "type": "string", "enum": [ "Bearish", "Bullish" ], "nullable": true, "description": "Analyst rating", "example": "Bullish" }, "featuredImage": { "$ref": "#/components/schemas/Attachment" }, "body": { "type": "string", "description": "Full article HTML body", "example": "Tesla has shown strong fundamentals...
" }, "bodyPreview": { "type": "string", "description": "Plain-text preview (\u2248200 chars)", "example": "Tesla has shown strong fundamentals this quarter..." }, "aiSummary": { "type": "string", "description": "AI-generated summary", "example": "Analyst argues Tesla's pipeline supports a $500 target by year-end." }, "languageCode": { "type": "string", "description": "BCP-47 language code", "example": "en" }, "status": { "type": "string", "enum": [ "Draft", "Published", "Deleted" ], "description": "Publication status", "example": "Published" }, "editStatus": { "type": "string", "enum": [ "None", "Edited", "Moderated" ], "description": "Edit status", "example": "None" }, "ownerId": { "type": "integer", "description": "Author's internal user ID", "example": 7890 }, "created": { "type": "string", "format": "date-time", "description": "When the article was created", "example": "2025-01-15T10:30:00Z" }, "updated": { "type": "string", "format": "date-time", "nullable": true, "description": "Last edit timestamp", "example": "2025-01-16T08:00:00Z" }, "published": { "type": "string", "format": "date-time", "nullable": true, "description": "Publication timestamp", "example": "2025-01-16T09:00:00Z" }, "readingTimeMinutes": { "type": "number", "format": "float", "description": "Estimated reading time", "example": 3.5 }, "wordCount": { "type": "integer", "description": "Word count", "example": 750 } } } } } } }, "CommentsResponse": { "type": "object", "description": "Paginated list of comments or replies on a parent entity", "properties": { "reactionPaging": { "type": "object", "description": "Pagination info", "properties": { "totalCount": { "type": "integer", "description": "Total number of comments/replies", "example": 42 }, "offsetEntityId": { "type": "string", "description": "Opaque cursor for next page", "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }, "next": { "type": "string", "description": "URL to fetch the next page", "example": "/api/v1/reactions/3fa85f64-5717-4562-b3fc-2c963f66afa6/comments?take=20&offsetEntityId=7c9e6679-7425-40de-944b-e07fc1f90ae7" } } }, "comments": { "type": "array", "description": "List of comment/reply items", "items": { "$ref": "#/components/schemas/Comment" } } } }, "CommentUpdateRequest": { "type": "object", "description": "Request body for updating a comment or reply. Owner is derived from the auth token \u2014 do not supply it.", "properties": { "message": { "type": "string", "description": "Updated text content", "example": "Great point, I updated my view after reading more." }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "SharePostRequest": { "type": "object", "description": "Request body for sharing a post. Both `message` and `sharedOriginDiscussion` are required. Use `message = \"\"` for a reshare or a non-empty `message` for a quote share.", "required": [ "message", "sharedOriginDiscussion" ], "properties": { "message": { "type": "string", "description": "Required. Set to `\"\"` (empty string) for a reshare, or to the commentary text for a quote share. Cannot be null or omitted.", "example": "" }, "sharedOriginDiscussion": { "type": "string", "description": "Required. ID of the post being shared.", "example": "d9020c00-c364-11ee-8080-80005148990b" }, "sharedDiscussionId": { "type": "string", "description": "Optional. Only set this when `sharedOriginDiscussion` itself points to a share \u2014 it identifies the intermediate share, so the created Post's `metadata.share.sharedPost` is set to this post and `metadata.share.sharedOriginPost` to `sharedOriginDiscussion`, collapsing the chain to a 2-level reference in subsequent reads. Leave unset for first-level shares.", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "SharesResponse": { "type": "object", "description": "Paginated list of shares on a post", "properties": { "paging": { "type": "object", "description": "Pagination info", "properties": { "totalCount": { "type": "integer", "description": "Total number of shares", "example": 17 }, "offsetEntityId": { "type": "string", "description": "Opaque cursor for next page", "example": "c3d4e5f6-a7b8-4901-cdef-345678901234" }, "next": { "type": "string", "description": "URL to fetch the next page", "example": "/api/v1/feeds/post/d9020c00-c364-11ee-8080-80005148990b/shares?take=20&offsetEntityId=c3d4e5f6-a7b8-4901-cdef-345678901234" } } }, "postShares": { "type": "array", "description": "List of share entries", "items": { "type": "object", "description": "A single share record", "properties": { "shareReactionId": { "type": "string", "description": "ID of the share reaction", "example": "e5f6a7b8-c9d0-4123-efab-567890123456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the share was created", "example": "2025-01-15T10:30:00Z", "nullable": true }, "owner": { "$ref": "#/components/schemas/User" } } } } } }, "PollCreateRequest": { "type": "object", "description": "Request body for creating a poll post", "required": [ "message", "poll" ], "properties": { "message": { "type": "string", "description": "Text content of the post (max 1000 chars)", "example": "Where do you think $TSLA will be in 6 months?" }, "poll": { "type": "object", "description": "Poll configuration", "required": [ "title", "options" ], "properties": { "title": { "type": "string", "description": "Poll question / title", "example": "TSLA price target in 6 months?" }, "options": { "type": "array", "description": "Poll answer options (min 2, max 4)", "minItems": 2, "maxItems": 4, "items": { "type": "object", "required": [ "text", "index" ], "properties": { "text": { "type": "string", "description": "Option label", "example": "Above $300" }, "index": { "type": "integer", "description": "One-based position index of the option (starts at 1)", "example": 1, "minimum": 1 } } } } } }, "attachments": { "$ref": "#/components/schemas/Attachments" } } }, "PriceAlert": { "type": "object", "description": "A price alert set by the user on a financial instrument", "required": [ "alertId", "instrumentId", "symbol", "targetPrice", "currentPrice", "createdAt", "updatedAt" ], "properties": { "alertId": { "type": "string", "format": "uuid", "description": "Unique identifier of the price alert", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "instrumentId": { "type": "integer", "description": "Unique instrument identifier used across all trading operations", "example": 1001 }, "symbol": { "type": "string", "description": "Trading symbol displayed to users (e.g. AAPL, TSLA)", "example": "AAPL" }, "targetPrice": { "type": "number", "format": "decimal", "description": "Target price at which the alert will trigger", "example": 185.5 }, "currentPrice": { "type": "number", "format": "decimal", "description": "Market bid price at the time the alert was created or last updated", "example": 182.3 }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was created (ISO 8601 UTC)", "example": "2026-04-20T10:00:00Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last updated (ISO 8601 UTC)", "example": "2026-04-25T14:30:00Z" } } }, "PriceAlertCollectionResponse": { "type": "object", "description": "Collection of price alerts for the authenticated user", "properties": { "results": { "type": "array", "description": "List of price alerts matching the query criteria", "items": { "$ref": "#/components/schemas/PriceAlert" } } } }, "CreatePriceAlertRequest": { "type": "object", "description": "Request body for creating a new price alert", "required": [ "symbol", "targetPrice" ], "properties": { "symbol": { "type": "string", "description": "Trading symbol to identify the instrument (e.g. AAPL, TSLA)", "example": "AAPL" }, "targetPrice": { "type": "number", "format": "decimal", "description": "Target price at which the alert should trigger. Must be greater than 0.", "exclusiveMinimum": true, "example": 185.5, "minimum": 0 } } }, "UpdatePriceAlertRequest": { "type": "object", "description": "Request body for updating an existing price alert", "required": [ "targetPrice" ], "properties": { "targetPrice": { "type": "number", "format": "decimal", "description": "New target price for the alert. Must be greater than 0.", "exclusiveMinimum": true, "example": 190.0, "minimum": 0 } } }, "PriceAlertMutationResponse": { "type": "object", "description": "Response for price alert create and update operations", "properties": { "success": { "type": "boolean", "description": "Indicates the operation completed successfully", "example": true }, "data": { "$ref": "#/components/schemas/PriceAlert" } } }, "DeletePriceAlertResponse": { "type": "object", "description": "Response for price alert delete operation", "properties": { "success": { "type": "boolean", "description": "Indicates the operation completed successfully", "example": true }, "data": { "type": "object", "properties": { "alertId": { "type": "string", "format": "uuid", "description": "Unique identifier of the deleted price alert", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } } } } }, "PriceAlertErrorResponse": { "type": "object", "description": "Error response from the price alerts service", "required": [ "success", "error" ], "properties": { "success": { "type": "boolean", "description": "Indicates the request failed", "example": false }, "error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "Machine-readable error code for programmatic handling", "example": "VALIDATION_ERROR" }, "message": { "type": "string", "description": "Human-readable error message", "example": "Invalid request parameters" }, "details": { "type": "string", "description": "Additional context about the error", "example": "Field 'targetPrice' must be greater than 0" }, "field": { "type": "string", "description": "The specific field that caused the error (if applicable)", "example": "targetPrice" } } } } }, "GetBalancesResponse": { "type": "object", "description": "Aggregated balances for the authenticated user.", "properties": { "gcid": { "type": "integer", "format": "int64", "description": "The user's global customer ID." }, "totalBalance": { "type": "number", "format": "double", "description": "Sum of all account balances converted to the requested display currency." }, "displayCurrency": { "type": "string", "nullable": true, "description": "ISO 4217 currency code used for totalBalance and displayBalance values." }, "balances": { "type": "array", "items": { "$ref": "#/components/schemas/AccountBalanceData" }, "nullable": true, "description": "Individual account balances." } }, "additionalProperties": false }, "AccountBalanceData": { "type": "object", "description": "Balance data for a single account.", "properties": { "accountId": { "type": "string", "nullable": true, "description": "Unique identifier of the account." }, "accountType": { "$ref": "#/components/schemas/AccountType" }, "subType": { "type": "string", "nullable": true, "description": "Account sub-type, where applicable." }, "balance": { "type": "number", "format": "double", "description": "Account balance in the account's native currency." }, "currency": { "type": "string", "nullable": true, "description": "The account's native currency (ISO 4217)." }, "displayBalance": { "type": "number", "format": "double", "description": "Account balance converted to the requested display currency." }, "displayCurrency": { "type": "string", "nullable": true, "description": "The display currency (ISO 4217) used for displayBalance." }, "exchangeRate": { "type": "number", "format": "double", "description": "Exchange rate applied to convert balance to displayCurrency." }, "equityDetails": { "$ref": "#/components/schemas/EquityDetailsData" } }, "additionalProperties": false }, "EquityDetailsData": { "type": "object", "description": "Provider-specific balance details, returned only when the request includes expand=equityDetails. All fields are nullable; only fields relevant to the account's provider are populated. Trading accounts populate available/frozenCash/currentPNL/totalUsedMargin; Crypto accounts populate cryptoId, the balance variants, fiatConversionCurrency, and orderIndex.", "properties": { "available": { "type": "number", "format": "double", "nullable": true, "description": "Available balance or buying power (Trading, Options, MoneyFarm, Cash)." }, "frozenCash": { "type": "number", "format": "double", "nullable": true, "description": "Cash frozen by the platform pending settlement (Trading)." }, "currentPNL": { "type": "number", "format": "double", "nullable": true, "description": "Current unrealized profit and loss on open positions (Trading)." }, "totalUsedMargin": { "type": "number", "format": "double", "nullable": true, "description": "Total margin used by open positions (Trading)." }, "cryptoId": { "type": "integer", "format": "int32", "nullable": true, "description": "eToro internal crypto asset identifier (Crypto)." }, "balance": { "type": "number", "format": "double", "nullable": true, "description": "Balance in native crypto units (Crypto)." }, "totalBalance": { "type": "number", "format": "double", "nullable": true, "description": "Total balance in native crypto units, including pending (Crypto)." }, "spendableBalance": { "type": "number", "format": "double", "nullable": true, "description": "Spendable balance in native crypto units (Crypto)." }, "balanceInFiat": { "type": "number", "format": "double", "nullable": true, "description": "Balance converted to fiat (Crypto)." }, "totalBalanceInFiat": { "type": "number", "format": "double", "nullable": true, "description": "Total balance converted to fiat, including pending (Crypto)." }, "spendableBalanceInFiat": { "type": "number", "format": "double", "nullable": true, "description": "Spendable balance converted to fiat (Crypto)." }, "fiatConversionCurrency": { "type": "string", "nullable": true, "description": "ISO 4217 currency code used for the InFiat values (Crypto)." }, "orderIndex": { "type": "integer", "format": "int32", "nullable": true, "description": "Display order index for sorting (Crypto)." } }, "additionalProperties": false }, "GetHistoricalBalancesResponse": { "type": "object", "description": "Historical end-of-day balance snapshots for the authenticated user.", "properties": { "gcid": { "type": "integer", "format": "int64", "description": "The user's global customer ID." }, "displayCurrency": { "type": "string", "nullable": true, "description": "ISO 4217 currency code used for display values." }, "fromDate": { "type": "string", "format": "date", "description": "Start of the returned date range (inclusive, ISO 8601)." }, "toDate": { "type": "string", "format": "date", "description": "End of the returned date range (inclusive, ISO 8601)." }, "snapshots": { "type": "array", "items": { "$ref": "#/components/schemas/HistoricalDailySnapshotData" }, "nullable": true, "description": "End-of-day balance snapshots, one entry per day in the requested range." } }, "additionalProperties": false }, "HistoricalDailySnapshotData": { "type": "object", "description": "End-of-day balance snapshot for a specific date.", "properties": { "date": { "type": "string", "format": "date", "description": "The snapshot date (ISO 8601)." }, "totalCurrencyIso": { "type": "string", "nullable": true, "description": "ISO 4217 currency code for the total figures in native currency." }, "totalCash": { "type": "number", "format": "double", "description": "Total cash across all accounts in native currency." }, "totalInvestedAmount": { "type": "number", "format": "double", "description": "Total invested amount across all accounts in native currency." }, "totalPnl": { "type": "number", "format": "double", "description": "Total profit and loss across all accounts in native currency." }, "totalBalance": { "type": "number", "format": "double", "description": "Total balance across all accounts in native currency." }, "displayTotalCash": { "type": "number", "format": "double", "description": "Total cash converted to the requested display currency." }, "displayTotalInvestedAmount": { "type": "number", "format": "double", "description": "Total invested amount converted to the requested display currency." }, "displayTotalPnl": { "type": "number", "format": "double", "description": "Total profit and loss converted to the requested display currency." }, "displayTotalBalance": { "type": "number", "format": "double", "description": "Total balance converted to the requested display currency." }, "totalExchangeRate": { "type": "number", "format": "double", "description": "Exchange rate applied to convert totals to displayCurrency." }, "accountSnapshots": { "type": "array", "items": { "$ref": "#/components/schemas/HistoricalAccountData" }, "nullable": true, "description": "Individual account breakdowns within this snapshot." } }, "additionalProperties": false }, "HistoricalAccountData": { "type": "object", "description": "Individual account balance within a historical daily snapshot.", "properties": { "accountId": { "type": "string", "nullable": true, "description": "Unique identifier of the account." }, "accountType": { "$ref": "#/components/schemas/AccountType" }, "currency": { "type": "string", "nullable": true, "description": "The account's native currency (ISO 4217)." }, "cash": { "type": "number", "format": "double", "description": "Cash balance in the account's native currency." }, "investedAmount": { "type": "number", "format": "double", "description": "Invested amount in the account's native currency." }, "pnl": { "type": "number", "format": "double", "description": "Profit and loss in the account's native currency." }, "total": { "type": "number", "format": "double", "description": "Total balance in the account's native currency." }, "usdRate": { "type": "number", "format": "double", "description": "Exchange rate to USD." }, "displayCash": { "type": "number", "format": "double", "description": "Cash balance converted to the requested display currency." }, "displayInvestedAmount": { "type": "number", "format": "double", "description": "Invested amount converted to the requested display currency." }, "displayPnl": { "type": "number", "format": "double", "description": "Profit and loss converted to the requested display currency." }, "displayTotal": { "type": "number", "format": "double", "description": "Total balance converted to the requested display currency." }, "exchangeRate": { "type": "number", "format": "double", "description": "Exchange rate applied to convert to displayCurrency." } }, "additionalProperties": false }, "BalancesErrorResponse": { "type": "object", "description": "Error response returned for client-side errors (4xx).", "properties": { "code": { "type": "string", "nullable": true, "description": "Error code (e.g., VALIDATION_ERROR, USER_NOT_FOUND)." }, "message": { "type": "string", "nullable": true, "description": "Human-readable error message." }, "requestId": { "type": "string", "nullable": true, "description": "Request ID for tracing and support." } }, "additionalProperties": false }, "InAppNotificationsResult": { "type": "object", "description": "Response containing notifications and metadata", "properties": { "messages": { "type": "array", "description": "List of notification messages", "items": { "$ref": "#/components/schemas/InAppNotificationMessage" } }, "meta": { "$ref": "#/components/schemas/InAppNotificationsMetadata" } } }, "InAppNotificationMessage": { "type": "object", "description": "A single in-app notification message", "properties": { "messageId": { "type": "string", "format": "uuid", "description": "Unique identifier of the notification message", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "correlationId": { "type": "string", "format": "uuid", "description": "Correlation ID for request tracing" }, "actionLink": { "type": "string", "description": "URL for the notification action" }, "imageTitle": { "type": "string", "description": "Title for the notification image" }, "imageUrl": { "type": "string", "description": "URL of the notification image" }, "notificationType": { "type": "string", "description": "Type of notification" }, "version": { "type": "string", "description": "Version of the notification format" }, "aggregatable": { "type": "boolean", "description": "Whether this notification can be aggregated" }, "grouped": { "type": "boolean", "description": "Whether this notification is grouped" }, "aggregationId": { "type": "string", "description": "ID for aggregation grouping" }, "message": { "type": "string", "description": "Notification content text" }, "readStatus": { "type": "string", "enum": [ "New", "Seen", "Read" ], "description": "Current read status of the notification" }, "publishDate": { "type": "string", "format": "date-time", "description": "When the notification was published" }, "subCategory": { "type": "string", "description": "Sub-category of the notification" }, "category": { "type": "string", "description": "Category of the notification" }, "rtlLanguage": { "type": "boolean", "description": "Whether the notification content is in an RTL language" }, "section": { "type": "string", "description": "Section the notification belongs to" } } }, "InAppNotificationsMetadata": { "type": "object", "description": "Metadata about the notifications result", "properties": { "notSeen": { "type": "integer", "format": "int32", "description": "Count of unseen notifications", "example": 5 } } }, "CopiersCurrentResponse": { "type": "object", "description": "Current copiers snapshot and AUM tier for portfolio display.", "required": [ "copiers", "aumTier" ], "properties": { "copiers": { "type": "integer", "format": "int32", "minimum": 0, "description": "Current number of copiers." }, "aumTier": { "type": "integer", "format": "int32", "minimum": 0, "description": "Assets-under-management tier level." }, "aumTierDesc": { "type": "string", "nullable": true, "description": "Human-readable AUM tier label; null when not provided upstream." } } }, "StandardErrorResponse": { "type": "object", "description": "Standard public API error envelope.", "required": [ "success", "error", "timestamp", "requestId" ], "properties": { "success": { "type": "boolean", "example": false }, "error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "Machine-readable error code.", "example": "UserNotFound" }, "message": { "type": "string", "description": "Human-readable error message.", "example": "Username not found." }, "field": { "type": "string", "description": "Request field associated with the error, when applicable." } } }, "timestamp": { "type": "string", "format": "date-time", "description": "UTC timestamp when the error was generated." }, "requestId": { "type": "string", "description": "Correlation identifier for support and tracing." } } }, "GeCopiersResponse": { "type": "object", "description": "Response object containing a list of portfolio copiers.", "properties": { "copiers": { "type": "array", "nullable": true, "description": "List of users copying your portfolio, with demographic and financial info.", "items": { "type": "object", "properties": { "Gender": { "type": "string", "example": "M", "description": "Gender of the copier" }, "Club": { "type": "string", "example": "Gold", "description": "Membership club level" }, "Country": { "type": "string", "example": "Germany", "description": "Country of residence" }, "CopyStartedAtCategory": { "type": "string", "enum": [ "less than 1 day", "less than 1 week", "less than 1 month", "less than 1 year", "more than 1 year" ], "description": "How long ago the copy relationship started", "example": "more than 1 year" }, "AmountCategory": { "type": "string", "enum": [ "<100", "100-500", "500-1000", "1000-5000", ">5000" ], "description": "Amount being copied", "example": "100-500" }, "AgeCategory": { "type": "string", "enum": [ "Under 18", "18-29", "30-44", "45-59", "60+" ], "description": "Age range of the copier", "example": "30-44" }, "CopyRealizedEquity_pnl": { "type": "string", "description": "Total realized equity PnL of the copier", "example": "1589.2" }, "AvailableCopyBalance": { "type": "string", "description": "Available copy balance of the copier", "example": "55.2" } }, "additionalProperties": false } } }, "additionalProperties": false }, "InstrumentTypesResponse": { "type": "object", "properties": { "instrumentTypes": { "type": "array", "items": { "type": "object", "properties": { "instrumentTypeID": { "type": "integer" }, "instrumentTypeDescription": { "type": "string" } } } } } }, "InstrumentsResponse": { "type": "object", "properties": { "instrumentDisplayDatas": { "type": "array", "items": { "type": "object", "properties": { "instrumentID": { "type": "integer" }, "instrumentDisplayName": { "type": "string" }, "instrumentTypeID": { "type": "integer" }, "exchangeID": { "type": "integer" }, "symbolFull": { "type": "string" }, "stocksIndustryId": { "type": "integer" }, "priceSource": { "type": "string", "description": "The data provider or market source for the price, such as Nasdaq, LSE, or CME." }, "hasExpirationDate": { "type": "boolean" }, "isInternalInstrument": { "type": "boolean", "description": "If set to true, the instrument is restricted from public access." }, "images": { "type": "array", "items": { "type": "object", "properties": { "instrumentID": { "type": "integer" }, "width": { "type": "number" }, "height": { "type": "number" }, "uri": { "type": "string" }, "backgroundColor": { "type": "string" }, "textColor": { "type": "string" } } } } } } } } }, "ExchangesResponse": { "type": "object", "properties": { "exchangeInfo": { "type": "array", "items": { "type": "object", "properties": { "exchangeID": { "type": "integer" }, "exchangeDescription": { "type": "string" } } } } } }, "StocksIndustriesResponse": { "type": "object", "properties": { "stocksIndustries": { "type": "array", "items": { "type": "object", "properties": { "industryID": { "type": "integer" }, "industryName": { "type": "string" } } } } } }, "ClubDashboardDataResponse": { "type": "object", "description": "Club dashboard data for a user", "properties": { "clubs": { "type": "array", "description": "List of club tiers with equity thresholds", "items": { "$ref": "#/components/schemas/ClubInfo" } }, "contacts": { "description": "Account manager contact information for eligible users", "$ref": "#/components/schemas/ContactsResponse" }, "downgradeRisk": { "description": "Club tier downgrade risk assessment", "$ref": "#/components/schemas/DowngradeRiskResponse" }, "offers": { "description": "Club benefit offers categorized by tier availability", "$ref": "#/components/schemas/UserOffersData" }, "webinars": { "description": "Upcoming and past club webinars", "$ref": "#/components/schemas/WebinarsResponse" } } }, "ClubInfo": { "type": "object", "description": "A single club tier with equity thresholds", "properties": { "name": { "type": "string", "enum": [ "Internal", "Bronze", "Silver", "Gold", "Platinum", "PlatinumPlus", "Diamond" ], "description": "Display name of the club tier", "example": "Silver" }, "minRealizedEquity": { "type": "integer", "nullable": true, "description": "Minimum realized equity threshold for this tier", "example": 5000 }, "maxRealizedEquity": { "type": "integer", "nullable": true, "description": "Maximum realized equity threshold for this tier", "example": 10000 }, "rank": { "type": "integer", "description": "Display rank of this tier", "example": 2 } } }, "ContactsResponse": { "type": "object", "description": "Account manager contact details", "properties": { "manager": { "nullable": true, "description": "Assigned account manager profile", "$ref": "#/components/schemas/ContactInfo" } } }, "ContactInfo": { "type": "object", "description": "Account manager profile", "properties": { "firstName": { "type": "string", "description": "Account manager first name", "example": "John" }, "lastName": { "type": "string", "description": "Account manager last name", "example": "Smith" }, "email": { "type": "string", "format": "email", "description": "Account manager email address", "example": "john.smith@etoro.com" }, "calendarUrl": { "type": "string", "nullable": true, "description": "Calendar booking URL for scheduling meetings", "example": "https://calendly.com/etoro-club" }, "avatars": { "type": "array", "description": "Manager avatar images in different sizes", "items": { "$ref": "#/components/schemas/Avatar" } } } }, "WebinarsResponse": { "type": "object", "description": "Upcoming and past webinars", "properties": { "upcomingWebinars": { "type": "array", "description": "List of upcoming webinars the user can join", "items": { "$ref": "#/components/schemas/Webinar" } }, "previousWebinars": { "type": "array", "description": "List of past webinars with recordings", "items": { "$ref": "#/components/schemas/Webinar" } } } }, "Webinar": { "type": "object", "description": "A club webinar event", "properties": { "id": { "type": "integer", "format": "int64", "description": "Webinar identifier", "example": 83618564462 }, "topic": { "type": "string", "description": "Webinar topic", "example": "Club Webinars with Lale Akoner and Sam North" }, "startTime": { "type": "string", "format": "date-time", "description": "Scheduled start time in UTC", "example": "2026-05-20T14:00:00Z" }, "joinUrl": { "type": "string", "nullable": true, "description": "URL to join the webinar (upcoming webinars only)", "example": "https://us02web.zoom.us/j/83618564462" }, "recordUrl": { "type": "string", "nullable": true, "description": "URL to the recording (past webinars only)", "example": "https://us02web.zoom.us/rec/play/example" } } }, "DowngradeRiskResponse": { "type": "object", "description": "Club tier downgrade risk assessment", "properties": { "isAtRisk": { "type": "boolean", "description": "Whether the user is at risk of club tier downgrade", "example": false }, "daysUntilDowngrade": { "type": "integer", "nullable": true, "description": "Days remaining until potential downgrade. Present only when isAtRisk is true.", "example": 30 } } }, "UserOffersData": { "type": "object", "description": "Club offers categorized by availability", "properties": { "currentPlayerLevelAvailableOffers": { "type": "array", "description": "Offers available at the user's current club tier", "items": { "$ref": "#/components/schemas/ClubOffer" } }, "nextPlayerLevelAvailableOffers": { "type": "array", "description": "Offers that become available at the next club tier", "items": { "$ref": "#/components/schemas/ClubOffer" } }, "staticEligibleOffers": { "type": "array", "description": "Offers eligible across specific club tiers", "items": { "$ref": "#/components/schemas/StaticEligibleOffer" } } } }, "ClubOffer": { "type": "object", "description": "A club benefit offer", "properties": { "id": { "type": "string", "description": "Offer identifier", "example": "80" }, "displayName": { "type": "string", "description": "Offer display name", "example": "Tax Return Offer" }, "description": { "type": "string", "nullable": true, "description": "Detailed offer description", "example": "Discounted assistance with preparing annual tax returns from certified tax companies in your country." }, "status": { "type": "string", "enum": [ "Pending", "Available", "Reserved", "Claimed", "Expired", "Claim Cancelled", "Inventory Order Cancelled" ], "description": "Offer status", "example": "Claimed" }, "type": { "type": "string", "enum": [ "Entertainment", "Gifts", "News", "Signals", "Tools", "Exclusive events", "Tickets", "Zoom meetings", "Educational", "Services", "Association Membership", "Financial", "Travel", "Gift card", "Client meetup", "Emotional", "Bundle" ], "description": "Offer type", "example": "Financial" }, "subType": { "type": "string", "nullable": true, "enum": [ "High", "Low" ], "description": "Offer sub-type" }, "deliveryMethod": { "type": "string", "nullable": true, "enum": [ "Inventory Managed", "On-demand", "Static", "API" ], "description": "Delivery method", "example": "Static" }, "minimumClubLevel": { "type": "string", "enum": [ "Internal", "Bronze", "Silver", "Gold", "Platinum", "PlatinumPlus", "Diamond" ], "description": "Minimum club tier required for this offer", "example": "Silver" }, "offerUrl": { "type": "string", "nullable": true, "description": "URL with more information about the offer", "example": "https://www.etoro.com/club/offers/80" }, "offersInBundle": { "type": "array", "nullable": true, "description": "Offers bundled together with this offer", "items": { "$ref": "#/components/schemas/OfferInBundle" } }, "subOffers": { "type": "array", "nullable": true, "description": "Sub-offers within this offer", "items": { "$ref": "#/components/schemas/ClubOffer" } } } }, "StaticEligibleOffer": { "type": "object", "description": "An offer eligible across specific club tiers", "properties": { "id": { "type": "string", "description": "Offer identifier", "example": "80" }, "displayName": { "type": "string", "description": "Offer display name", "example": "Tax Return Offer" }, "description": { "type": "string", "nullable": true, "description": "Detailed offer description", "example": "Discounted assistance with preparing annual tax returns from certified tax companies in your country." }, "status": { "type": "string", "enum": [ "Pending", "Available", "Reserved", "Claimed", "Expired", "Claim Cancelled", "Inventory Order Cancelled" ], "description": "Offer status", "example": "Claimed" }, "type": { "type": "string", "enum": [ "Entertainment", "Gifts", "News", "Signals", "Tools", "Exclusive events", "Tickets", "Zoom meetings", "Educational", "Services", "Association Membership", "Financial", "Travel", "Gift card", "Client meetup", "Emotional", "Bundle" ], "description": "Offer type", "example": "Financial" }, "deliveryMethod": { "type": "string", "nullable": true, "enum": [ "Inventory Managed", "On-demand", "Static", "API" ], "description": "Delivery method", "example": "Static" }, "eligibleClubLevels": { "type": "array", "description": "Club tier names eligible for this offer", "items": { "type": "string", "enum": [ "Internal", "Bronze", "Silver", "Gold", "Platinum", "PlatinumPlus", "Diamond" ] }, "example": [ "Gold", "Silver", "Platinum", "PlatinumPlus", "Diamond" ] } } }, "OfferInBundle": { "type": "object", "description": "An offer included in a bundle", "properties": { "type": { "type": "string", "enum": [ "Entertainment", "Gifts", "News", "Signals", "Tools", "Exclusive events", "Tickets", "Zoom meetings", "Educational", "Services", "Association Membership", "Financial", "Travel", "Gift card", "Client meetup", "Emotional", "Bundle" ], "description": "Bundle offer type", "example": "Services" }, "offerLimit": { "type": "integer", "description": "Maximum number of offers in this bundle", "example": 3 } } }, "GainHistoryResponse": { "type": "object", "required": [ "username", "granularity", "gains" ], "properties": { "username": { "type": "string" }, "granularity": { "type": "string", "enum": [ "daily", "monthly", "yearly" ] }, "totalGain": { "type": "number", "nullable": true, "description": "Compound gain over the returned series as a decimal fraction. Null when gains is empty." }, "gains": { "type": "array", "items": { "$ref": "#/components/schemas/GainPoint" } } } }, "GainPoint": { "type": "object", "required": [ "date", "gain" ], "properties": { "date": { "type": "string", "format": "date" }, "gain": { "type": "number" } } }, "UnifiedOrderRequestForRealCreateOrderDocs": { "type": "object", "description": "Request payload for creating an order to open or close a position.", "required": [ "action", "transaction" ], "properties": { "action": { "type": "string", "description": "The order action type. Possible values: open, close.", "enum": [ "open", "close" ], "example": "open" }, "transaction": { "type": "string", "description": "The transaction direction. Possible values: buy, sell, sellShort, buyToCover.", "enum": [ "buy", "sell", "sellShort", "buyToCover" ], "example": "buy" }, "symbol": { "type": "string", "description": "The asset ticker symbol. Required for open orders.", "nullable": true, "example": "AAPL" }, "instrumentId": { "type": "integer", "format": "int32", "description": "The eToro instrument identifier. Required for open orders.", "nullable": true, "example": 101 }, "orderType": { "type": "string", "description": "The order execution type. Possible values: mkt (market), mit (market if touched).", "enum": [ "mkt", "mit" ], "example": "mkt" }, "triggerRate": { "type": "number", "format": "double", "nullable": true, "description": "The trigger rate for mit orders. Required for mit orders." }, "leverage": { "type": "integer", "format": "int32", "description": "The leverage multiplier to apply. Required for open orders.", "nullable": true, "example": 2 }, "amount": { "type": "number", "format": "double", "nullable": true, "description": "The monetary amount to invest in the order currency. Mutually exclusive with units and contracts.", "example": 1000.0 }, "orderCurrency": { "type": "string", "description": "The currency for the order amount. Typically usd.", "nullable": true, "example": "usd" }, "units": { "type": "number", "format": "double", "nullable": true, "description": "The number of units to trade. Mutually exclusive with amount and contracts." }, "contracts": { "type": "number", "format": "double", "nullable": true, "description": "The number of contracts to trade. Mutually exclusive with amount and units." }, "stopLossRate": { "type": "number", "format": "double", "nullable": true, "description": "The stop-loss rate at which the position will automatically close.", "example": 1.2 }, "takeProfitRate": { "type": "number", "format": "double", "nullable": true, "description": "The take-profit rate at which the position will automatically close.", "example": 1.5 }, "stopLossType": { "type": "string", "nullable": true, "description": "The stop-loss type. Possible values: fixed, trailing.", "enum": [ "fixed", "trailing" ], "example": "fixed" }, "additionalMargin": { "type": "number", "format": "double", "nullable": true, "description": "Additional margin to allocate to the position." }, "positionIds": { "type": "array", "items": { "type": "integer", "format": "int64" }, "nullable": true, "description": "List of position IDs to close. Required for close orders." } } } } }, "servers": [ { "url": "https://public-api.etoro.com", "description": "eToro Public API" } ], "tags": [ { "name": "Agent Portfolios" }, { "name": "Attachments" }, { "name": "Balances" }, { "name": "Clubs" }, { "name": "Watchlists" }, { "name": "Feeds" }, { "name": "Asset Explorer" }, { "name": "Market Data" }, { "name": "Identity" }, { "name": "Cash Accounts" }, { "name": "Notifications" }, { "name": "PI Data" }, { "name": "Posts" }, { "name": "Comments and Replies" }, { "name": "Likes" }, { "name": "Price Alerts" }, { "name": "Comments" }, { "name": "Trading Demo" }, { "name": "Trading Real" }, { "name": "Users Info" }, { "name": "Users Stats" }, { "name": "Deprecated" } ] }