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.Documentation Index
Fetch the complete documentation index at: https://api-portal.etoro.com/llms.txt
Use this file to discover all available pages before exploring further.
Equity only refers to your USD balance.
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-keyx-user-keyx-request-id
3. Calculation Formula
- Available Cash =
credit - (Σ(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
Example Calculation
If your account has:- Available Cash: 450
- Total Invested: 1560
- Unrealized PnL: 175
Best Practices
- Monitor Total Account Value: Equity gives you a complete picture of your account’s total value, including both liquid and invested capital.
- Track Performance: Compare your equity over time to understand your overall trading performance.
- Risk Management: Use equity to calculate position sizes and manage risk appropriately.
- Use the Correct Environment: Make sure to use the demo endpoint when testing and the real endpoint for live trading.