# 更新定投

`POST` `/v1/dailycoins/update`

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

暫停或恢復已有的定投。

## Parameters

### Request Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_id` | string | Yes | 要更新的定投計劃 ID。 |
| `per_invest_amount` | string | No | 新的每次定投金額。 |
| `invest_frequency` | string | No | 頻率：`Daily`、`Weekly`、`Fortnightly`、`Monthly`。 |
| `invest_day_of_week` | string | No | 每週/每兩週計劃的執行星期：`mon`–`fri`。 |
| `invest_day_of_month` | string | No | 每月計劃的執行日：`1`–`28`。 |

## Request Example

```bash
curl --request POST \
  --url 'https://openapi.longbridge.com/v1/dailycoins/update' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{"plan_id":"<plan_id>","per_invest_amount":"<per_invest_amount>","invest_frequency":"<invest_frequency>","invest_day_of_week":"<invest_day_of_week>","invest_day_of_month":"<invest_day_of_month>"}'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_id` | string | Yes | 被更新計劃的 ID |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "plan_id": "1286530167409217536"
  }
}
```
