# 盈虧流水

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

查詢賬戶資金流水歷史，包含入金、出金、股息和結算等。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 證券代碼 |
| `page` | integer | No | 頁碼（預設 1） |
| `size` | integer | No | 每頁數量（預設 20） |
| `derivative` | boolean | No | 是否包含衍生品倉位 |

## Request Example

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

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flows_list` | object[] | Yes | 資金流水列表（分頁）， |
| `└ executed_date` | string | Yes | 執行日期（如 `2024-01-15`） |
| `└ executed_timestamp` | string | No | 執行時間戳 |
| `└ code` | string | No | 證券代碼 |
| `└ direction` | string | No | 方向：`In`（買入）或 `Out`（賣出） |
| `└ executed_quantity` | string | No | 成交數量 |
| `└ executed_price` | string | No | 成交價格 |
| `└ executed_cost` | string | No | 成交成本 |
| `└ describe` | string | No | 描述說明 |
| `has_more` | boolean | No | 是否有更多頁 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "has_more": false,
    "flows_list": [
      {
        "code": "AAPL",
        "symbol": "AAPL.US",
        "direction": "In",
        "executed_date": "2025-11-22",
        "executed_timestamp": "1763769600",
        "executed_quantity": "10",
        "executed_price": "180.50",
        "executed_cost": "1805.00",
        "describe": "Buy AAPL.US"
      }
    ]
  }
}
```
