Endpoint
Query Parameters
Start date in YYYY-MM-DD format (optional if using all=true)
End date in YYYY-MM-DD format (optional if using all=true)
Set to “true” for all-time data (ignores start/end dates)
Comma-separated list of stock symbols to filter by (optional)
Response
Returns summary, weekly breakdown, monthly breakdown, and open positions.
Example
curl -X GET "https://your-domain.com/api/timeframe-data?start=2024-01-01&end=2024-08-31"
Response Example
{
"success": true,
"data": {
"summary": {
"trading_profit_loss": 2450.75,
"total_dividends": 380.50,
"total_trades": 45,
"winning_trades": 28,
"win_rate_percentage": 62.22
},
"weekly_summary": [
{
"week_start": "2024-08-26",
"period": "2024-08-26",
"trading_profit_loss": 150.25,
"total_dividends": 25.00,
"total_trades": 3,
"winning_trades": 2,
"win_rate_percentage": 66.67
}
],
"monthly_summary": [
{
"month_start": "2024-08-01",
"period": "2024-08",
"trading_profit_loss": 850.75,
"total_dividends": 125.50,
"total_trades": 15,
"winning_trades": 9,
"win_rate_percentage": 60.0
}
],
"open_positions": [
{
"symbol": "NVDA",
"shares": 150
}
]
},
"data_source": "postgresql"
}