Profit/Loss appears as “Profit/Loss” in the app and represents your unrealized PnL.
The Calculation Process
Calculating profit/loss involves fetching your account data and summing all unrealized PnL values from positions and closed position profits.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
positionsis an array of your open positionspositions[i].unrealizedPnL.pnLis the unrealized profit/loss for each positionmirrorsis an array of your copy trading portfoliosmirrors[i].positionsis an array of positions within each mirror portfoliomirrors[i].positions[j].unrealizedPnL.pnLis the unrealized profit/loss for each mirror positionmirrors[i].closedPositionsNetProfitis the net profit from closed positions in each mirror portfolio
Examples
Example Calculation
If your account has:positions: Two positions withunrealizedPnL.pnLvalues of 50 and -20mirrors: One mirror portfolio with:- Two positions with
unrealizedPnL.pnLvalues of 30 and 15 closedPositionsNetProfit: 100
- Two positions with
Best Practices
- Monitor Regularly: Check your profit/loss frequently to track the performance of your open positions.
- Understand Components: Remember that profit/loss includes both unrealized PnL from open positions and realized profits from closed mirror positions.
- Consider Market Volatility: Unrealized PnL can fluctuate with market conditions, so monitor it alongside your total invested amount.
- Use the Correct Environment: Make sure to use the demo endpoint when testing and the real endpoint for live trading.