API Analytics
📊 Dashboard
GET /api/analytics/dashboard
Authorization: Bearer {token}
Réponse
{
"summary": {
"totalTrades": 145,
"winRate": 62.4,
"profitFactor": 1.85,
"totalPnL": 2450.00,
"averageR": 0.65,
"maxDrawdown": 12.3
},
"recentPerformance": {
"daily": [...],
"weekly": [...],
"monthly": [...]
}
}
📈 Performance par Période
GET /api/analytics/performance
Authorization: Bearer {token}
Paramètres
| Paramètre | Type | Description |
|---|---|---|
| period | string | daily, weekly, monthly |
| dateFrom | ISO date | Date de début |
| dateTo | ISO date | Date de fin |
🏷️ Performance par Catégorie
GET /api/analytics/by-category
Authorization: Bearer {token}
Paramètres
| Paramètre | Type | Description |
|---|---|---|
| category | string | instrument, setup, tag, time |
Réponse Exemple (par instrument)
{
"categories": [
{
"name": "EUR/USD",
"trades": 67,
"winRate": 61.2,
"totalPnL": 1250.00
},
{
"name": "GBP/USD",
"trades": 43,
"winRate": 55.8,
"totalPnL": 680.00
}
]
}
📉 Equity Curve
GET /api/analytics/equity-curve
Authorization: Bearer {token}
Réponse
{
"dataPoints": [
{ "date": "2025-01-01", "equity": 10000 },
{ "date": "2025-01-02", "equity": 10150 },
...
]
}
🎯 Distribution des R
GET /api/analytics/r-distribution
Authorization: Bearer {token}