# 定投統計

`GET` `/v1/dailycoins/statistic`

:::warning 僅支援 Longbridge 香港 / 新加坡賬戶
此方法僅支援 Longbridge 香港 / 新加坡賬戶，可操作任意標的，包括美股。
:::

獲取定投統計匯總信息，包括總投入金額和盈虧情況。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | 按標的代碼篩選統計。 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/dailycoins/statistic' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `active_count` | string | No | 活躍計劃數量 |
| `finished_count` | string | No | 已完成計劃數量 |
| `suspended_count` | string | No | 已暫停計劃數量 |
| `rest_days` | string | No | 距下次扣款天數 |
| `total_amount` | string | No | 總投入金額 |
| `total_profit` | string | No | 總盈虧 |
| `nearest_plans` | object[] | No | 最近即將執行的定投計劃（結構與 DcaPlan 一致） |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "active_count": "2",
    "finished_count": "1",
    "suspended_count": "0",
    "rest_days": "3",
    "total_amount": "5400",
    "total_profit": "120.50",
    "nearest_plans": [
      {
        "plan_id": "1239402174908207104",
        "symbol": "AAPL.US",
        "stock_name": "Apple Inc.",
        "market": "US",
        "status": "Active",
        "per_invest_amount": "100",
        "invest_frequency": "Monthly",
        "invest_day_of_month": "15",
        "next_trd_date": "1778853600",
        "cum_amount": "0",
        "cum_profit": "0"
      }
    ]
  }
}
```
