curl --request GET \
--url https://public-api.etoro.com/api/v1/trading/info/demo/portfolio \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>'import requests
url = "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio"
headers = {
"x-request-id": "<x-request-id>",
"x-api-key": "<api-key>",
"x-user-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-request-id': '<x-request-id>',
'x-api-key': '<api-key>',
'x-user-key': '<api-key>'
}
};
fetch('https://public-api.etoro.com/api/v1/trading/info/demo/portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-request-id: <x-request-id>",
"x-user-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-user-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.etoro.com/api/v1/trading/info/demo/portfolio")
.header("x-request-id", "<x-request-id>")
.header("x-api-key", "<api-key>")
.header("x-user-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.etoro.com/api/v1/trading/info/demo/portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-request-id"] = '<x-request-id>'
request["x-api-key"] = '<api-key>'
request["x-user-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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": 0.00001,
"rate": 0.1453,
"amount": 100,
"leverage": 1,
"units": 688.231246,
"isTslEnabled": false,
"executionType": 0,
"isDiscounted": false
}
],
"stockOrders": [],
"entryOrders": [],
"exitOrders": [],
"ordersForOpen": [],
"ordersForClose": [],
"ordersForCloseMultiple": [],
"bonusCredit": 0
}
}Get demo portfolio breakdown
Rate limit: 60 requests per 60 seconds. This is a shared quota — the same budget is consumed by a group of related endpoints, so calling any of them reduces what is left for the others (you cannot call each at the full rate independently). Endpoints sharing this quota:
GET /api/v1/trading/info/demo/pnlGET /api/v2/trading/info/demo/instrument-breakdown
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.
curl --request GET \
--url https://public-api.etoro.com/api/v1/trading/info/demo/portfolio \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>'import requests
url = "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio"
headers = {
"x-request-id": "<x-request-id>",
"x-api-key": "<api-key>",
"x-user-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-request-id': '<x-request-id>',
'x-api-key': '<api-key>',
'x-user-key': '<api-key>'
}
};
fetch('https://public-api.etoro.com/api/v1/trading/info/demo/portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-request-id: <x-request-id>",
"x-user-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.etoro.com/api/v1/trading/info/demo/portfolio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-user-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.etoro.com/api/v1/trading/info/demo/portfolio")
.header("x-request-id", "<x-request-id>")
.header("x-api-key", "<api-key>")
.header("x-user-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.etoro.com/api/v1/trading/info/demo/portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-request-id"] = '<x-request-id>'
request["x-api-key"] = '<api-key>'
request["x-user-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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": 0.00001,
"rate": 0.1453,
"amount": 100,
"leverage": 1,
"units": 688.231246,
"isTslEnabled": false,
"executionType": 0,
"isDiscounted": false
}
],
"stockOrders": [],
"entryOrders": [],
"exitOrders": [],
"ordersForOpen": [],
"ordersForClose": [],
"ordersForCloseMultiple": [],
"bonusCredit": 0
}
}Authorizations
API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.
Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.
Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
Headers
A unique request identifier.
"f0e2aa6e-77c9-4421-be7f-6f752793c8cf"
Response
Successfully retrieved portfolio information
Comprehensive portfolio information including positions, orders, and account status
Container for all portfolio-related information
Show child attributes
Show child attributes