Skip to main content
GET
/
api
/
trade-details
/
{month}
Get Trade Details
curl --request GET \
  --url https://api.example.com/api/trade-details/{month}

Endpoint

GET /api/trade-details/{month}

Path Parameters

month
string
required
Month in YYYY-MM format (e.g., “2024-08”)

Response

Returns detailed trade information with buy/sell prices, volumes, and profit/loss calculations.

Example

curl -X GET https://your-domain.com/api/trade-details/2024-08

Response Example

{
  "success": true,
  "trades": [
    {
      "symbol": "AAPL",
      "buy_date": "2024-08-01",
      "sell_date": "2024-08-15",
      "buy_price": 195.50,
      "sell_price": 198.75,
      "volume": 100,
      "profit_per_share": 3.25,
      "total_profit_loss": 325.00,
      "return_percentage": 1.66,
      "trade_result": "Win"
    }
  ],
  "data_source": "postgresql"
}