{
"swagger": "2.0",
"info": {
"title": "User",
"version": "1.0",
"description": "The User API provides data on a user including trading statistics"
},
"host": "api.etoro.com",
"basePath": "/API/User/V1",
"schemes": [
"https"
],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "subscription-key",
"in": "query"
}
},
"security": [
{
"apiKeyHeader": []
},
{
"apiKeyQuery": []
}
],
"paths": {
"/{Username}/Gain": {
"get": {
"description": "This API retrieves the monthly and yearly gains of a user",
"operationId": "5786115c6361c80d884cfcf2",
"summary": "Monthly Gain",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we would like to get the gain information",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n
The API returns arrays of monthly and yearly gains for the full lifetime of a customer. The following members are returned in for each interval \n
\n
Timestamp
The timestamp of the beginning of the interval. For monthly gains it will be the first of the month, and for yearly gains it will be the first of January
\n
Gain
The gain percetnage of this interval. The numbers are in percetage points
\n
",
"examples": {
"application/json": "{\n \"monthly\": [\n {\n \"timestamp\": \"2016-06-01T00:00:00Z\",\n \"gain\": 0.2\n },\n {\n \"timestamp\": \"2016-07-01T00:00:00Z\",\n \"gain\": 0.21\n }\n ],\n \"yearly\": [\n {\n \"timestamp\": \"2016-01-01T00:00:00Z\",\n \"gain\": 0.58\n }\n ]\n}"
}
}
}
}
},
"/{Username}/Info": {
"get": {
"description": "This API returns general information on a user",
"operationId": "578616396361c80d884cfcf3",
"summary": "Info",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we would like to get the information",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n
The API returns information about a user in the system. If the user has opted-out of sharing his information, we will return an empty object \n
\n
Username
The name of the user
\n
First Name
The first name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Last Name
The last name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Languge
The user selected language in the platform
\n
Country ID
The internal country where the customer resides. The full list of countries is in the metadata Countries API
\n
About
A short description on the user
\n
Media
An array of user avatars. Each avatar contains the following:
Transformation - The transformation done on the original uploaded image
Width - the width in pixels of the images which are resized
Height - the height in pixels of the images which are resized
URI - of the image
\n
\n",
"examples": {
"application/json": "{\n \"userName\": \"LeTraderNo1\",\n \"firstName\": \"Le\",\n \"lastName\": \"Trader\",\n \"language\": \"en-GB\",\n \"countryId\": 250,\n \"about\": \"Important disclosure – I’m an Employee of eToro Group; I’m trading independently in my own account, for my own educational and commercial purposes.\\nI have no unique knowledge or advantage on any other traders in the platform. eToro Group Limited does not and will not have any responsibility to any loses or trading decisions made by imitating or following me\",\n \"media\": [\n {\n \"transformation\": \"Original\",\n \"width\": 0.0,\n \"height\": 0.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/original/2608398.jpg\"\n },\n {\n \"transformation\": \"Resized\",\n \"width\": 150.0,\n \"height\": 150.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/150X150/2608398.jpg\"\n }\n ]\n}"
}
}
}
}
},
"/{Username}/RiskScore/History": {
"get": {
"description": "This API retrieves the historical risk score of a customer",
"operationId": "57861b3d6361c80d884cfcf4",
"summary": "RiskScore/History",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we would like to get the risk score information",
"required": true,
"type": "string"
},
{
"name": "MinDate",
"in": "query",
"description": "The minimum date to return information",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n
The API returns an array of periodic risk items. Each item contains the following \n
\n
Timestamp
The timestamp at the beginning of the interval
\n
Risk Score
The average risk score for the interval
\n
Min Risk Score
The minimum risk score in this period according to the aggregation (monthly or daily)
\n
Max Risk Score
The maximum risk score in this period according to the aggregation (monthly or daily)
\n
\n ",
"examples": {
"application/json": "[\n {\n \"timestamp\": \"2016-05-01T00:00:00Z\",\n \"riskScore\": 1,\n \"minRiskScore\": 1,\n \"maxRiskScore\": 1\n },\n {\n \"timestamp\": \"2016-06-01T00:00:00Z\",\n \"riskScore\": 1,\n \"minRiskScore\": 1,\n \"maxRiskScore\": 2\n },\n {\n \"timestamp\": \"2016-07-01T00:00:00Z\",\n \"riskScore\": 1,\n \"minRiskScore\": 1,\n \"maxRiskScore\": 1\n }\n]"
}
}
}
}
},
"/{Username}/RiskScore/Live/": {
"get": {
"description": "The Risk Score Live API call returns data on the live customer risk score",
"operationId": "578624c06361c80d884cfcf5",
"summary": "RiskScore/Live",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we would like to get the risk score information",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n \nThe API will return the current risk score and an array of risk items, which are based on the current open trades. In case a customer does not have any open trade, the array will be empty \n
\n
Instrument ID
Internal Instrument ID. For a full list of IDs see the Instruments API
\n
Risk Contribution Percent
The contribution percentage of the current holding of this instrument in the current risk score
\n
Investment Percent
The relative amount of funds which are invested in this instrument. For example if currently you are investing $1,000 in all instruments and your investment in this instrument is $400 the investment percentage will be 40%
\n
Exposure Percent
The relative amount of net exposure of this instrument in the total exposure. The exposure is based on the actual net amount of units which are held. For example if you are investing $1,000 in an instrument with a single trade which is leveraged 1:100, then your total exposure will be $100,000. If you are holding two trades of $500 each with the same leverage, however one is on the buy side and the other is on the sell side - they cancel each other and the net exposure for this instrument will be 0
\n
\n ",
"examples": {
"application/json": "{\n \"riskScore\": 1,\n \"contributers\":[\n {\n \"instrumentId\": 1027,\n \"riskContributionPct\": 123.45,\n \"investmentPct\": 19.6,\n \"exposurePct\": 12.61\n },\n {\n \"instrumentId\": 27,\n \"riskContributionPct\": -49.38,\n \"investmentPct\": 4.76,\n \"exposurePct\": 25.71\n }\n]\n}"
}
}
}
}
},
"/{Username}/Copiers/History": {
"get": {
"description": "The API returns the daily number of copiers of a user",
"operationId": "578650446361c80d884cfcf8",
"summary": "Copiers/History",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which I would like to get the copier history",
"required": true,
"type": "string"
},
{
"name": "MinDate",
"in": "query",
"description": "The minimum date for the response. The date should be formatted as YYYY/MM/DD",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n The API returns a time-series array of the daily number of copiers. The following is returned for each item\n
\n
Timestamp
datetime
The timestamp of the copiers sample
\n
Copiers
integer
The number of daily copiers at 00:00 GMT
\n
",
"examples": {
"application/json": "[\n {\n \"timestamp\": \"2016-07-03T00:00:00Z\",\n \"copiers\": 1195\n },\n {\n \"timestamp\": \"2016-07-04T00:00:00Z\",\n \"copiers\": 1195\n },\n {\n \"timestamp\": \"2016-07-05T00:00:00Z\",\n \"copiers\": 1194\n }\n]"
}
}
}
}
},
"/{Username}/Copiers/Live": {
"get": {
"description": "This API returns the number of live copiers by country",
"operationId": "578719456361c80d884cfcf9",
"summary": "Copiers/Live",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we are trying to get the copiers",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n The API returns an array of country copiers item The following is returned for each item\n
\n
Country ID
integer
The internal country id. For a complete list of country IDs, please refer to the metadata Countries API
\n
integer
The number of copiers in that country
\n
\n ",
"examples": {
"application/json": "[\n {\n \"countryId\": 243,\n \"copiers\": 1\n },\n {\n \"countryId\": 5,\n \"copiers\": 2\n }\n]"
}
}
}
}
},
"/{Username}/Trade/History/Aggregates": {
"get": {
"description": "The trading history aggregates retrieves aggregate data on the trading of a customer",
"operationId": "57875f256361c80c08ed8cac",
"summary": "Trade/History/Aggregates",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we want to get the aggregate data on",
"required": true,
"type": "string"
},
{
"name": "Period",
"in": "query",
"description": "The name of the period which we would like to get aggregate data on. The possible values are according to the period name in the metadata StatsPeriods API",
"type": "string",
"default": "SixMonthsAgo",
"enum": [
"CurrMonth",
"CurrQuarter",
"CurrYear",
"LastYear",
"LastTwoYears",
"OneMonthAgo",
"TwoMonthsAgo",
"ThreeMonthsAgo",
"SixMonthsAgo"
]
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The full explanation on the returned values can be seen here",
"examples": {
"application/json": "{\n \"aggregates\": {\n \"userName\": \"LeTraderNo1\",\n \"gain\": 0.59,\n \"dailyGain\": 0.01,\n \"thisWeekGain\": 0.01,\n \"riskScore\": 1,\n \"maxDailyRiskScore\": 2,\n \"maxMonthlyRiskScore\": 2,\n \"aumTier\": 0,\n \"virtualCopiers\": 0,\n \"copiers\": 0,\n \"baseLineCopiers\": 0,\n \"dailyDD\": -0.2,\n \"weeklyDD\": -0.59,\n \"peakToValley\": -0.76,\n \"peakToValleyStart\": \"2016-01-01T00:00:00Z\",\n \"peakToValleyEnd\": \"2016-01-01T00:00:00Z\",\n \"profitableWeeksPct\": 65.52,\n \"profitableMonthsPct\": 71.43,\n \"velocity\": 0.0013,\n \"exposure\": 100.0,\n \"avgPosSize\": 2.48,\n \"activeWeeks\": 29,\n \"activeWeeksPct\": 100.0,\n \"daysSinceFirstActivity\": 195,\n \"daysSinceLastActivity\": 0,\n \"weeksSinceRegistration\": 179,\n \"totalTrades\": 17,\n \"winRatio\": 47.06,\n \"avgProfitPct\": 6.52,\n \"avgLossPct\": -4.98,\n \"avgHoldingMinutes\": 360319.36\n },\n \"assetBreakDown\": [\n {\n \"isCopyTrading\": false,\n \"instrumentId\": 3017,\n \"totalTrades\": 4,\n \"pctOfTrades\": 23.53,\n \"pctOfInvestment\": 5.19,\n \"winRatio\": 100.0,\n \"avgProfitPct\": 0.0,\n \"avgLossPct\": 0.0,\n \"avgHoldingMinutes\": 59869.63\n },\n {\n \"isCopyTrading\": false,\n \"instrumentId\": 1027,\n \"totalTrades\": 2,\n \"pctOfTrades\": 11.76,\n \"pctOfInvestment\": 1.3,\n \"winRatio\": 100.0,\n \"avgProfitPct\": 0.0,\n \"avgLossPct\": 0.0,\n \"avgHoldingMinutes\": 718703.01\n },\n ]\n}"
}
}
}
}
},
"/{Username}/CopySimulation": {
"get": {
"description": "The copy simulation retrieves periodic copy simulation data including daily equity and optional daily asset allocation",
"operationId": "579df17a6361c813c45b985a",
"summary": "CopySimulation",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username to simulate",
"required": true,
"type": "string"
},
{
"name": "Period",
"in": "query",
"description": "The name of the period which we would like to get simulation data on. The possible values are according to the period name in the metadata StatsPeriods API",
"required": true,
"type": "string",
"default": "SixMonthsAgo",
"enum": [
"CurrMonth",
"CurrQuarter",
"CurrYear",
"LastYear",
"LastTwoYears",
"OneMonthAgo",
"TwoMonthsAgo",
"ThreeMonthsAgo",
"SixMonthsAgo"
]
},
{
"name": "AssetAllocation",
"in": "query",
"description": "Return information on daily asset allocation",
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "",
"examples": {
"application/json": "{\n \"dailyValue\": [\n {\n \"timestamp\": \"2016-07-01T00:00:00Z\",\n \"credit\": 10000.0,\n \"investment\": 0.0,\n \"pnl\": 0.0,\n \"equity\": 10000.0,\n \"totalDividends\": 0.0\n },\n {\n \"timestamp\": \"2016-07-02T00:00:00Z\",\n \"credit\": 9708.0,\n \"investment\": 292.0,\n \"pnl\": -29.16,\n \"equity\": 9970.85,\n \"totalDividends\": 0.0\n }\n ],\n \"dailyAllocation\": [\n {\n \"timestamp\": \"2016-07-02T00:00:00Z\",\n \"allocation\": [\n {\n \"instrumentId\": 1,\n \"units\": 8330.0,\n \"investment\": 292.0,\n \"profit\": -29.16\n }\n ]\n }\n ]\n}\n"
}
}
}
}
},
"/{Username}/DailyGain": {
"get": {
"description": "The Daily Gain API provides daily gains of users either as a time series or an aggregation",
"operationId": "585b71f17dfd940d60749c84",
"summary": "Daily Gain",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we would like to get the gain information",
"required": true,
"type": "string"
},
{
"name": "Type",
"in": "query",
"description": "Type of data returned",
"required": true,
"type": "string",
"default": "Daily",
"enum": [
"Period",
"Daily"
]
},
{
"name": "MinDate",
"in": "query",
"description": "The minimum date of the query. The date should be formatted as YYYY-MM-DD",
"required": true,
"type": "string"
},
{
"name": "MaxDate",
"in": "query",
"description": "The maximum date of the query. The date should be formatted as YYYY-MM-DD",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": null
}
}
}
},
"/Multiple/Info": {
"get": {
"description": "This API returns general information on a list of users",
"operationId": "586e3f607dfd941458d46f3b",
"summary": "Multiple Info",
"parameters": [
{
"name": "UserNames",
"in": "query",
"description": "A comma delimited list of usernames",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n
The API returns an array of information about users in the system. Each user has the following data \n
\n
Username
The name of the user
\n
First Name
The first name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Last Name
The last name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Languge
The user selected language in the platform
\n
Country ID
The internal country where the customer resides. The full list of countries is in the metadata Countries API
\n
About
A short description on the user
\n
Media
An array of user avatars. Each avatar contains the following:
Transformation - The transformation done on the original uploaded image
Width - the width in pixels of the images which are resized
Height - the height in pixels of the images which are resized
URI - of the image
\n
\n",
"examples": {
"application/json": "[\n{\n \"userName\": \"LeTraderNo1\",\n \"firstName\": \"Le\",\n \"lastName\": \"Trader\",\n \"language\": \"en-GB\",\n \"countryId\": 250,\n \"about\": \"Important disclosure – I’m an Employee of eToro Group; I’m trading independently in my own account, for my own educational and commercial purposes.\\nI have no unique knowledge or advantage on any other traders in the platform. eToro Group Limited does not and will not have any responsibility to any loses or trading decisions made by imitating or following me\",\n \"media\": [\n {\n \"transformation\": \"Original\",\n \"width\": 0.0,\n \"height\": 0.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/original/2608398.jpg\"\n },\n {\n \"transformation\": \"Resized\",\n \"width\": 150.0,\n \"height\": 150.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/150X150/2608398.jpg\"\n }\n ]\n}\n]"
}
}
}
}
},
"/{Username}/Discovery": {
"get": {
"description": "The API returns discovery values for a specific user",
"operationId": "589b23547dfd9410d0688708",
"summary": "Discovery",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "",
"required": true,
"type": "string"
},
{
"name": "Period",
"in": "query",
"description": "Requested Period",
"type": "string",
"default": "SixMonthsAgo",
"enum": [
"CurrMonth",
"CurrQuarter",
"CurrYear",
"LastYear",
"LastTwoYears",
"OneMonthAgo",
"TwoMonthsAgo",
"ThreeMonthsAgo",
"SixMonthsAgo",
"OneYearAgo"
]
}
],
"responses": {
"200": {
"description": "Discovery Data"
}
}
}
},
"/Multiple/Discovery": {
"get": {
"description": "This API returns discovery values for multiple users",
"operationId": "58a08fddb909710250d469bf",
"summary": "Multiple Discovery",
"parameters": [
{
"name": "Usernames",
"in": "query",
"description": "A comma delimited list of usernames which I would like to get discovery data",
"required": true,
"type": "string"
},
{
"name": "Period",
"in": "query",
"description": "Requested Period",
"required": true,
"type": "string",
"default": "SixMonthsAgo",
"enum": [
"CurrMonth",
"CurrQuarter",
"CurrYear",
"LastYear",
"LastTwoYears",
"OneMonthAgo",
"TwoMonthsAgo",
"ThreeMonthsAgo",
"SixMonthsAgo",
"OneYearAgo"
]
},
{
"name": "Fields",
"in": "query",
"description": "A comma delimited list of fields which should be returned",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A list of customer discovery items.",
"examples": {
"application/json": "[\n{\nuserName: \"LeTraderNo1\",\nweeksSinceRegistration: 209,\ncountryId: 0,\naffiliateId: 3,\nisPopularInvestor: false,\nisFund: false,\ngain: 0.47,\ndailyGain: 0.05,\nthisWeekGain: 0.12,\nriskScore: 2,\nmaxDailyRiskScore: 2,\nmaxMonthlyRiskScore: 1,\ncopiers: 0,\ncopiedTrades: 0,\ncopyTradesPct: 0,\ncopyInvestmentPct: 0,\nbaseLineCopiers: 0,\ncopiersGain: 0,\naumTier: 0,\nvirtualCopiers: 0,\ntrades: 2,\ntopTradedInstrumentId: 0,\ntopTradedAssetId: 0,\nwinRatio: 0,\ndailyDD: -0.17,\nweeklyDD: -0.17,\npeakToValley: -0.17,\nprofitableWeeksPct: 66.67,\nprofitableMonthsPct: 100,\navgPosSize: 0.91,\nhighLeveragePct: 0,\nmediumLeveragePct: 0,\nlowLeveragePct: 100,\nfirstActivity: 33,\nlastActivity: 0,\nactiveWeeksPct: 33.33\n},\n{\nuserName: \"StrategicTrader\",\nweeksSinceRegistration: 126,\ncountryId: 124,\naffiliateId: 11,\nisPopularInvestor: true,\nisFund: false,\ngain: -11.21,\ndailyGain: -4.17,\nthisWeekGain: -4.05,\nriskScore: 5,\nmaxDailyRiskScore: 5,\nmaxMonthlyRiskScore: 5,\ncopiers: 149,\ncopiedTrades: 0,\ncopyTradesPct: 0,\ncopyInvestmentPct: 0,\nbaseLineCopiers: 159,\ncopiersGain: -6.29,\naumTier: 2,\nvirtualCopiers: 1094,\ntrades: 14,\ntopTradedInstrumentId: 1001,\ntopTradedAssetId: 5,\nwinRatio: 7.14,\ndailyDD: -3.25,\nweeklyDD: -5.46,\npeakToValley: -11.41,\nprofitableWeeksPct: 33.33,\nprofitableMonthsPct: 0,\navgPosSize: 1.31,\nhighLeveragePct: 0,\nmediumLeveragePct: 35.71,\nlowLeveragePct: 64.29,\nfirstActivity: 0,\nlastActivity: 0,\nactiveWeeksPct: 100\n}\n]\n[0]+-View sourceoptions"
}
}
}
}
},
"/{Username}/VisualPortfolio": {
"get": {
"operationId": "58a09118b909710250d469c0",
"summary": "VisualPortfolio",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The requested username",
"required": true,
"type": "string"
},
{
"name": "Top",
"in": "query",
"description": "The number of results to return",
"required": true,
"type": "number"
}
],
"responses": {
"200": {
"description": null
}
}
}
},
"/{Username}/PortfolioSummary": {
"get": {
"description": "The portfolio summary aggregates the live portfolio of a user by manually traded assets and all the social trades he has open",
"operationId": "596f4b7a92c525132cc94783",
"summary": "PortfolioSummary",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The requested username",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "",
"examples": {
"application/json": "{\n \"creditPctRealized\": 39.3879,\n \"creditPctUnrealized\": 39.4182,\n \"positions\": [\n {\n \"instrumentId\": 1004,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 6.1565,\n \"valuePctUnrealized\": 3.4943\n },\n {\n \"instrumentId\": 1005,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 0.4344,\n \"valuePctUnrealized\": 1.9836\n },\n {\n \"instrumentId\": 1035,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -9.3764,\n \"valuePctUnrealized\": 0.5966\n },\n {\n \"instrumentId\": 1126,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 4.5492,\n \"valuePctUnrealized\": 2.0649\n },\n {\n \"instrumentId\": 1135,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -2.826,\n \"valuePctUnrealized\": 0.6397\n },\n {\n \"instrumentId\": 1137,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": 5.1273,\n \"valuePctUnrealized\": 0.6921\n },\n {\n \"instrumentId\": 1413,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -5.7944,\n \"valuePctUnrealized\": 0.6202\n },\n {\n \"instrumentId\": 1567,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": -0.2613,\n \"valuePctUnrealized\": 1.9698\n },\n {\n \"instrumentId\": 1752,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 6.4848,\n \"valuePctUnrealized\": 1.4021\n },\n {\n \"instrumentId\": 3017,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 3.4285,\n \"valuePctUnrealized\": 1.3618\n },\n {\n \"instrumentId\": 100000,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": -15.3547,\n \"valuePctUnrealized\": 2.7862\n },\n {\n \"instrumentId\": 100001,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 2.6382,\n \"valuePctUnrealized\": 3.3785\n }\n ],\n \"socialTrades\": [\n {\n \"parentUsername\": \"financista\",\n \"investmentPctRealized\": 1.5659,\n \"profitPct\": -13.9628,\n \"valuePctUnrealized\": 1.3372\n },\n {\n \"parentUsername\": \"Livinproof\",\n \"investmentPctRealized\": 1.2311,\n \"profitPct\": -3.2258,\n \"valuePctUnrealized\": 1.0937\n },\n {\n \"parentUsername\": \"Upskill\",\n \"investmentPctRealized\": 37.1674,\n \"profitPct\": -0.0904,\n \"valuePctUnrealized\": 37.1622\n }\n ]\n}"
}
}
}
}
},
"/{Username}/Social/Followers": {
"get": {
"description": "The API returns the number of followers of a user",
"operationId": "59cb4129b909710d847e41f5",
"summary": "Social/Followers",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which we want to query",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Number of followers",
"examples": {
"application/json": "{\n \"followers\": 954\n}"
}
}
}
}
},
"/Multiple/VisualPortfolio": {
"get": {
"description": "This API returns the visual portfolio on a list of users",
"operationId": "5a5caf81ccef3f16fc8f27cb",
"summary": "Multiple Visual Portfolio",
"parameters": [
{
"name": "UserNames",
"in": "query",
"description": "A comma delimited list of usernames",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n
The API returns an array of information about users in the system. Each user has the following data \n
\n
Username
The name of the user
\n
First Name
The first name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Last Name
The last name of the user. If the user has set himself to share this information, otherwise it will be empty
\n
Languge
The user selected language in the platform
\n
Country ID
The internal country where the customer resides. The full list of countries is in the metadata Countries API
\n
About
A short description on the user
\n
Media
An array of user avatars. Each avatar contains the following:
Transformation - The transformation done on the original uploaded image
Width - the width in pixels of the images which are resized
Height - the height in pixels of the images which are resized
URI - of the image
\n
\n",
"examples": {
"application/json": "[\n{\n \"userName\": \"LeTraderNo1\",\n \"firstName\": \"Le\",\n \"lastName\": \"Trader\",\n \"language\": \"en-GB\",\n \"countryId\": 250,\n \"about\": \"Important disclosure – I’m an Employee of eToro Group; I’m trading independently in my own account, for my own educational and commercial purposes.\\nI have no unique knowledge or advantage on any other traders in the platform. eToro Group Limited does not and will not have any responsibility to any loses or trading decisions made by imitating or following me\",\n \"media\": [\n {\n \"transformation\": \"Original\",\n \"width\": 0.0,\n \"height\": 0.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/original/2608398.jpg\"\n },\n {\n \"transformation\": \"Resized\",\n \"width\": 150.0,\n \"height\": 150.0,\n \"uri\": \"https://etoro-cdn.etorostatic.com/avatars/150X150/2608398.jpg\"\n }\n ]\n}\n]"
}
}
}
}
},
"/{Username}/Portfolio/Live": {
"get": {
"description": "The live portfolio returns the full portfolio of a user",
"operationId": "6090e4c6b06adedbcbfd4b03",
"summary": "Portfolio/Live",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The requested username",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "",
"examples": {
"application/json": "{\n \"creditPctRealized\": 39.3879,\n \"creditPctUnrealized\": 39.4182,\n \"positions\": [\n {\n \"instrumentId\": 1004,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 6.1565,\n \"valuePctUnrealized\": 3.4943\n },\n {\n \"instrumentId\": 1005,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 0.4344,\n \"valuePctUnrealized\": 1.9836\n },\n {\n \"instrumentId\": 1035,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -9.3764,\n \"valuePctUnrealized\": 0.5966\n },\n {\n \"instrumentId\": 1126,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 4.5492,\n \"valuePctUnrealized\": 2.0649\n },\n {\n \"instrumentId\": 1135,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -2.826,\n \"valuePctUnrealized\": 0.6397\n },\n {\n \"instrumentId\": 1137,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": 5.1273,\n \"valuePctUnrealized\": 0.6921\n },\n {\n \"instrumentId\": 1413,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -5.7944,\n \"valuePctUnrealized\": 0.6202\n },\n {\n \"instrumentId\": 1567,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": -0.2613,\n \"valuePctUnrealized\": 1.9698\n },\n {\n \"instrumentId\": 1752,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 6.4848,\n \"valuePctUnrealized\": 1.4021\n },\n {\n \"instrumentId\": 3017,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 3.4285,\n \"valuePctUnrealized\": 1.3618\n },\n {\n \"instrumentId\": 100000,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": -15.3547,\n \"valuePctUnrealized\": 2.7862\n },\n {\n \"instrumentId\": 100001,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 2.6382,\n \"valuePctUnrealized\": 3.3785\n }\n ],\n \"socialTrades\": [\n {\n \"parentUsername\": \"financista\",\n \"investmentPctRealized\": 1.5659,\n \"profitPct\": -13.9628,\n \"valuePctUnrealized\": 1.3372\n },\n {\n \"parentUsername\": \"Livinproof\",\n \"investmentPctRealized\": 1.2311,\n \"profitPct\": -3.2258,\n \"valuePctUnrealized\": 1.0937\n },\n {\n \"parentUsername\": \"Upskill\",\n \"investmentPctRealized\": 37.1674,\n \"profitPct\": -0.0904,\n \"valuePctUnrealized\": 37.1622\n }\n ]\n}"
}
}
}
}
},
"/{Username}/Portfolio/History": {
"get": {
"description": "The history portfolio returns the historic trades of a user",
"operationId": "62776253a567f5b65239f73e",
"summary": "Portfolio/History",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The requested username",
"required": true,
"type": "string"
},
{
"name": "MinDate",
"in": "query",
"description": "Minimum date of historic trades",
"required": true,
"type": "string"
},
{
"name": "Page",
"in": "query",
"description": "The current page",
"required": true,
"type": "integer"
},
{
"name": "PageSize",
"in": "query",
"description": "The page size ",
"required": true,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "",
"examples": {
"application/json": "{\n \"creditPctRealized\": 39.3879,\n \"creditPctUnrealized\": 39.4182,\n \"positions\": [\n {\n \"instrumentId\": 1004,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 6.1565,\n \"valuePctUnrealized\": 3.4943\n },\n {\n \"instrumentId\": 1005,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 0.4344,\n \"valuePctUnrealized\": 1.9836\n },\n {\n \"instrumentId\": 1035,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -9.3764,\n \"valuePctUnrealized\": 0.5966\n },\n {\n \"instrumentId\": 1126,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": 4.5492,\n \"valuePctUnrealized\": 2.0649\n },\n {\n \"instrumentId\": 1135,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -2.826,\n \"valuePctUnrealized\": 0.6397\n },\n {\n \"instrumentId\": 1137,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": 5.1273,\n \"valuePctUnrealized\": 0.6921\n },\n {\n \"instrumentId\": 1413,\n \"isBuy\": true,\n \"investmentPctRealized\": 0.6578,\n \"profitPct\": -5.7944,\n \"valuePctUnrealized\": 0.6202\n },\n {\n \"instrumentId\": 1567,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.9734,\n \"profitPct\": -0.2613,\n \"valuePctUnrealized\": 1.9698\n },\n {\n \"instrumentId\": 1752,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 6.4848,\n \"valuePctUnrealized\": 1.4021\n },\n {\n \"instrumentId\": 3017,\n \"isBuy\": true,\n \"investmentPctRealized\": 1.3156,\n \"profitPct\": 3.4285,\n \"valuePctUnrealized\": 1.3618\n },\n {\n \"instrumentId\": 100000,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": -15.3547,\n \"valuePctUnrealized\": 2.7862\n },\n {\n \"instrumentId\": 100001,\n \"isBuy\": true,\n \"investmentPctRealized\": 3.2891,\n \"profitPct\": 2.6382,\n \"valuePctUnrealized\": 3.3785\n }\n ],\n \"socialTrades\": [\n {\n \"parentUsername\": \"financista\",\n \"investmentPctRealized\": 1.5659,\n \"profitPct\": -13.9628,\n \"valuePctUnrealized\": 1.3372\n },\n {\n \"parentUsername\": \"Livinproof\",\n \"investmentPctRealized\": 1.2311,\n \"profitPct\": -3.2258,\n \"valuePctUnrealized\": 1.0937\n },\n {\n \"parentUsername\": \"Upskill\",\n \"investmentPctRealized\": 37.1674,\n \"profitPct\": -0.0904,\n \"valuePctUnrealized\": 37.1622\n }\n ]\n}"
}
}
}
}
},
"/{Username}/TradeStats": {
"get": {
"description": "The copy simulation retrieves periodic copy simulation data including daily equity and optional daily asset allocation",
"operationId": "633efc9e4608c1db6bdede49",
"summary": "TradeStats",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username to simulate",
"required": true,
"type": "string"
},
{
"name": "Period",
"in": "query",
"description": "The name of the period which we would like to get simulation data on. The possible values are according to the period name in the metadata StatsPeriods API",
"required": true,
"type": "string",
"default": "SixMonthsAgo",
"enum": [
"CurrMonth",
"CurrQuarter",
"CurrYear",
"LastYear",
"LastTwoYears",
"OneMonthAgo",
"TwoMonthsAgo",
"ThreeMonthsAgo",
"SixMonthsAgo"
]
},
{
"name": "CopyAsAsset",
"in": "query",
"description": "Should copy trading be considered as a single trade",
"required": true,
"type": "boolean"
},
{
"name": "IncludeOpenTrades",
"in": "query",
"description": "Should open trades be included in the calculation",
"required": true,
"type": "boolean"
},
{
"name": "SortbyInvestment",
"in": "query",
"description": "Should the results be sorted by invested amount or number of trades",
"required": true,
"type": "boolean"
},
{
"name": "Results",
"in": "query",
"description": "Number of results",
"required": true,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "",
"examples": {
"application/json": "{\n \"dailyValue\": [\n {\n \"timestamp\": \"2016-07-01T00:00:00Z\",\n \"credit\": 10000.0,\n \"investment\": 0.0,\n \"pnl\": 0.0,\n \"equity\": 10000.0,\n \"totalDividends\": 0.0\n },\n {\n \"timestamp\": \"2016-07-02T00:00:00Z\",\n \"credit\": 9708.0,\n \"investment\": 292.0,\n \"pnl\": -29.16,\n \"equity\": 9970.85,\n \"totalDividends\": 0.0\n }\n ],\n \"dailyAllocation\": [\n {\n \"timestamp\": \"2016-07-02T00:00:00Z\",\n \"allocation\": [\n {\n \"instrumentId\": 1,\n \"units\": 8330.0,\n \"investment\": 292.0,\n \"profit\": -29.16\n }\n ]\n }\n ]\n}\n"
}
}
}
}
},
"/{Username}/HistoricAssetAllocation": {
"get": {
"description": "The API returns the historic asset allocation of a customer",
"operationId": "6391986ab2ec4f202bc03806",
"summary": "HistoricAssetAllocation",
"parameters": [
{
"name": "Username",
"in": "path",
"description": "The username which I would like to get the copier history",
"required": true,
"type": "string"
},
{
"name": "MinDate",
"in": "query",
"description": "The minimum date for the response. The date should be formatted as YYYY/MM/DD",
"required": true,
"type": "string"
},
{
"name": "MaxDate",
"in": "query",
"description": "The maximum date for the response",
"required": true,
"type": "string"
},
{
"name": "Groups",
"in": "query",
"description": "Grouping of assets/copy trades",
"required": true,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "\n The API returns a time-series array of the daily number of copiers. The following is returned for each item\n