---
title: 'Get Month Data'
api: 'GET /api/month/{month}'
description: 'Retrieves detailed trading data for a specific month'
---
## Endpoint
```
GET /api/month/{month}
```
## Path Parameters
Month in YYYY-MM format (e.g., "2024-08")
## Authentication
Requires OAuth 2.0 authentication via session cookies.
## Response
Returns detailed trading data including summary, trades, and dividends.
Request success status
Monthly summary statistics
Month in YYYY-MM format
Total number of completed trades
Number of profitable trades
Win rate percentage
Total profit/loss from trades
Total dividend income
Combined trading P&L and dividends
List of completed trades
List of dividend payments
## Example
```bash cURL
curl -X GET https://your-domain.com/api/month/2024-08 \
-H "Cookie: session=your_session_cookie"
```
```javascript JavaScript
const month = '2024-08';
const response = await fetch(`/api/month/${month}`);
const data = await response.json();
if (data.success) {
console.log(`P/L: $${data.summary.trading_profit_loss}`);
console.log(`Trades: ${data.trades.length}`);
}
```
## Response Example
```json
{
"success": true,
"summary": {
"month": "2024-08",
"total_trades": 15,
"winning_trades": 9,
"win_rate": 60.0,
"trading_profit_loss": 850.75,
"total_dividends": 125.50,
"total_return_with_dividends": 976.25
},
"trades": [
{
"symbol": "AAPL",
"buy_date": "2024-08-01",
"sell_date": "2024-08-15",
"buy_price": 195.50,
"sell_price": 198.75,
"volume": 100,
"total_profit_loss": 325.00,
"return_percentage": 1.66,
"trade_result": "Win"
}
],
"dividends": [
{
"transaction_date": "2024-08-15",
"symbol": "MSFT",
"action": "Cash Dividend",
"amount": 75.50
}
],
"data_source": "postgresql"
}
```