curl --request GET \
--url https://public-api.etoro.com/api/v1/balances/history \
--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/balances/history"
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/balances/history', 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/balances/history",
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/balances/history"
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/balances/history")
.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/balances/history")
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{
"gcid": 123,
"displayCurrency": "<string>",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"snapshots": [
{
"date": "2023-12-25",
"totalCurrencyIso": "<string>",
"totalCash": 123,
"totalInvestedAmount": 123,
"totalPnl": 123,
"totalBalance": 123,
"displayTotalCash": 123,
"displayTotalInvestedAmount": 123,
"displayTotalPnl": 123,
"displayTotalBalance": 123,
"totalExchangeRate": 123,
"accountSnapshots": [
{
"accountId": "<string>",
"accountType": "Trading",
"currency": "<string>",
"cash": 123,
"investedAmount": 123,
"pnl": 123,
"total": 123,
"usdRate": 123,
"displayCash": 123,
"displayInvestedAmount": 123,
"displayPnl": 123,
"displayTotal": 123,
"exchangeRate": 123
}
]
}
]
}{
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}{
"errorCode": "Unauthorized",
"errorMessage": "Unauthorized"
}{
"errorCode": "TooManyRequests",
"errorMessage": "Too many requests"
}{
"errorCode": "UnhandledException",
"errorMessage": "Global Error"
}{
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}Get historical balance snapshots
Rate limit: 60 requests per 60 seconds. This is the default shared quota — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.
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.
curl --request GET \
--url https://public-api.etoro.com/api/v1/balances/history \
--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/balances/history"
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/balances/history', 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/balances/history",
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/balances/history"
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/balances/history")
.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/balances/history")
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{
"gcid": 123,
"displayCurrency": "<string>",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"snapshots": [
{
"date": "2023-12-25",
"totalCurrencyIso": "<string>",
"totalCash": 123,
"totalInvestedAmount": 123,
"totalPnl": 123,
"totalBalance": 123,
"displayTotalCash": 123,
"displayTotalInvestedAmount": 123,
"displayTotalPnl": 123,
"displayTotalBalance": 123,
"totalExchangeRate": 123,
"accountSnapshots": [
{
"accountId": "<string>",
"accountType": "Trading",
"currency": "<string>",
"cash": 123,
"investedAmount": 123,
"pnl": 123,
"total": 123,
"usdRate": 123,
"displayCash": 123,
"displayInvestedAmount": 123,
"displayPnl": 123,
"displayTotal": 123,
"exchangeRate": 123
}
]
}
]
}{
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}{
"errorCode": "Unauthorized",
"errorMessage": "Unauthorized"
}{
"errorCode": "TooManyRequests",
"errorMessage": "Too many requests"
}{
"errorCode": "UnhandledException",
"errorMessage": "Global Error"
}{
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}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
Query Parameters
Optional comma-separated list of account types to include. Valid values: Trading, Cash, Options, Crypto, MoneyFarm, Spaceship, Plaee (case-insensitive). Plaee accounts have no end-of-day history yet: filtering by Plaee returns snapshots whose accountSnapshots are empty. Unrecognised values are silently ignored rather than rejected: if none of the supplied values are recognised the filter is dropped and all account types are returned, so verify the accountType values in the response rather than assuming the filter applied.
Whether to also include the user's qualifying sub-accounts in the aggregated history. Their end-of-day snapshots are merged by date with the primary account's and the daily totals are recalculated across all accounts. Only effective when Trading is in scope. Defaults to false.
Response
Historical balance snapshots retrieved successfully.
Historical end-of-day balance snapshots for the authenticated user.