Skip to main content
GET
/
api
/
v2
/
portfolios
/
{username}
/
assets
/
history
Get asset allocation history
curl --request GET \
  --url https://public-api.etoro.com/api/v2/portfolios/{username}/assets/history \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>'
{
  "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
        }
      ]
    }
  ]
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"f4fcd100-888b-4064-abd1-0489221a7245"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

Path Parameters

username
string
required

Query Parameters

period
enum<string>

Predefined rolling window. Mutually exclusive with minDate/maxDate.

Available options:
CurrMonth,
OneMonthAgo,
TwoMonthsAgo,
CurrQuarter,
ThreeMonthsAgo,
SixMonthsAgo,
CurrYear,
OneYearAgo,
LastYear,
LastTwoYears
minDate
string<date>

Start date inclusive (YYYY-MM-DD). Mutually exclusive with period. Required together with maxDate when period is omitted.

maxDate
string<date>

End date inclusive (YYYY-MM-DD). Mutually exclusive with period. Required together with minDate when period is omitted.

count
integer

Downsample time axis to at most N buckets. Omit or pass 0 for no downsampling.

Required range: x >= 0

Response

Successful response

userName
string
required

Echoes the requested username.

results
object[]
required