# Profit Analysis Detail

`GET` `/v1/portfolio/profit-analysis/detail`

Get detailed P&L for a specific security including transaction flow and cost breakdown.

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | Security symbol, e.g. `AAPL.US` |
| `start` | string | No | Start date, `YYYY-MM-DD` |
| `end` | string | No | End date, `YYYY-MM-DD` |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/portfolio/profit-analysis/detail?symbol=<symbol>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `profit` | string | No | Total profit/loss |
| `underlying_details` | object | No | Underlying asset P&L breakdown |
| `└ holding_value` | string | No | Current holding value |
| `└ profit` | string | No | Total profit/loss |
| `└ cumulative_credited_amount` | string | No | Cumulative credited amount |
| `└ credited_details` | array | No | Credit transaction details |
| `└ cumulative_debited_amount` | string | No | Cumulative debited amount |
| `└ debited_details` | array | No | Debit transaction details |
| `└ cumulative_fee_amount` | string | No | Cumulative fee amount |
| `└ fee_details` | array | No | Fee transaction details |
| `└ short_holding_value` | string | No | Short position value |
| `└ long_holding_value` | string | No | Long position value |
| `└ holding_value_at_beginning` | string | No | Holding value at period start |
| `└ holding_value_at_ending` | string | No | Holding value at period end |
| `derivative_pnl_details` | object | No | Derivatives P&L breakdown |
| `└ holding_value` | string | No | Current holding value |
| `└ profit` | string | No | Total profit/loss |
| `└ cumulative_credited_amount` | string | No | Cumulative credited amount |
| `└ credited_details` | array | No | Credit transaction details |
| `└ cumulative_debited_amount` | string | No | Cumulative debited amount |
| `└ debited_details` | array | No | Debit transaction details |
| `└ cumulative_fee_amount` | string | No | Cumulative fee amount |
| `└ fee_details` | array | No | Fee transaction details |
| `└ short_holding_value` | string | No | Short position value |
| `└ long_holding_value` | string | No | Long position value |
| `└ holding_value_at_beginning` | string | No | Holding value at period start |
| `└ holding_value_at_ending` | string | No | Holding value at period end |
| `name` | string | No | Security name. |
| `updated_at` | string | No | Last update timestamp |
| `default_tag` | integer | No | Default display tag |
| `currency` | string | No | Currency |
| `start` | string | No | Period start |
| `end` | string | No | Period end |
| `start_date` | string | No | Start date |
| `end_date` | string | No | End date |
| `updated_date` | string | No | Last update date |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "name": "Apple",
    "currency": "USD",
    "profit": "100.00",
    "start": "1763769600",
    "end": "1778724973",
    "start_date": "2025-11-22",
    "end_date": "2026-05-14",
    "default_tag": 0,
    "updated_at": "1778724973",
    "updated_date": "2026-05-14",
    "underlying_details": {
      "profit": "100.00",
      "holding_value": "1790.16",
      "holding_value_at_beginning": null,
      "holding_value_at_ending": "1790.16",
      "long_holding_value": "1790.16",
      "short_holding_value": "0.00",
      "cumulative_credited_amount": "0.00",
      "cumulative_debited_amount": "0.00",
      "cumulative_fee_amount": "0.00",
      "credited_details": [],
      "debited_details": [],
      "fee_details": []
    },
    "derivative_pnl_details": {
      "profit": "0.00",
      "holding_value": "0.00",
      "holding_value_at_beginning": null,
      "holding_value_at_ending": "0.00",
      "long_holding_value": "0.00",
      "short_holding_value": "0.00",
      "cumulative_credited_amount": "0.00",
      "cumulative_debited_amount": "0.00",
      "cumulative_fee_amount": "0.00",
      "credited_details": [],
      "debited_details": [],
      "fee_details": []
    }
  }
}
```
