Skip to main content
Equity represents the total value of your account, including your available cash, invested capital, and unrealized profit/loss. It is calculated by summing your available cash, total invested amount, and unrealized PnL.
Equity only refers to your USD balance.
To retrieve the data needed for this calculation, use the P&L endpoint for either demo or real accounts.

The Calculation Process

Calculating equity involves fetching your account data and combining three key components: available cash, total invested, and unrealized PnL.

1. Endpoints

Use the P&L endpoint to retrieve your account information. Demo Account: GET https://public-api.etoro.com/api/v1/trading/info/demo/pnl Real Account: GET https://public-api.etoro.com/api/v1/trading/info/real/pnl

2. Header Requirements

Remember to include your authentication headers with every request.
  • x-api-key
  • x-user-key
  • x-request-id

3. Calculation Formula

Equity = Available Cash + Total Invested + Unrealized PnL
Where:
  • Available Cash = credits - (Σ(ordersForOpen[i].amount where mirrorID = 0) + Σ(orders[i].amount))
  • Total Invested = Σ(positions[i].amount) + Σ(mirrors[i].positions[j].amount) + Σ(mirrors[i].availableAmount - mirrors[i].closedPositionsNetProfit) + Σ(ordersForOpen[i].amount where mirrorID = 0) + Σ(orders[i].amount) + Σ(ordersForOpen[i].totalExternalCosts where mirrorID = 0)
  • Unrealized PnL = Σ(positions[i].unrealizedPnL.pnL) + Σ(mirrors[i].positions[j].unrealizedPnL.pnL) + Σ(mirrors[i].closedPositionsNetProfit)
For detailed information on calculating each component, see:

Examples

curl -X GET "https://public-api.etoro.com/api/v1/trading/info/demo/pnl" \
  -H "x-api-key: <YOUR_PUBLIC_KEY>" \
  -H "x-user-key: <YOUR_USER_KEY>" \
  -H "x-request-id: <UUID>"

Example Calculation

If your account has:
  • Available Cash: 450
  • Total Invested: 1560
  • Unrealized PnL: 175
Then your equity would be:
450 + 1560 + 175 = 2185

Best Practices

  1. Monitor Total Account Value: Equity gives you a complete picture of your account’s total value, including both liquid and invested capital.
  2. Track Performance: Compare your equity over time to understand your overall trading performance.
  3. Risk Management: Use equity to calculate position sizes and manage risk appropriately.
  4. Use the Correct Environment: Make sure to use the demo endpoint when testing and the real endpoint for live trading.