# 创建定投

`POST` `/v1/dailycoins/create`

:::warning 仅支持 Longbridge 香港 / 新加坡账户
此方法仅支持 Longbridge 香港 / 新加坡账户，可操作任意标的，包括美股。
:::

为指定证券创建新的定投。

## Parameters

### Request Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 标的代码，如 `AAPL.US`。 |
| `per_invest_amount` | string | Yes | 每次定投金额。 |
| `invest_frequency` | string | Yes | 频率：`Daily`、`Weekly`、`Fortnightly`、`Monthly`。 |
| `allow_margin_finance` | integer | Yes | 是否允许融资：`1` 是，`0` 否。 |
| `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/create' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{"symbol":"<symbol>","per_invest_amount":"<per_invest_amount>","invest_frequency":"<invest_frequency>","allow_margin_finance":0,"invest_day_of_week":"<invest_day_of_week>","invest_day_of_month":"<invest_day_of_month>"}'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | 新创建计划的 ID |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "id": "1225781523156889601"
  }
}
```
