从客户的现有 MT 账户创建主账户或投资账户。该帐户在 B2COPY 上注册,其登录号与 MT 上的登录号相同。
先决条件
客户必须已在平台上注册并拥有客户 ID。对于独立解决方案,请参阅无缝授权和注册客户并创建其支付帐户。
端点
POST [host]/api/v2/b2copy/accounts/create请求正文
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| clientId | 整数 | 是的 | 为其创建帐户的客户。 |
| investmentPlatformId | 整数 | 是的 | 投资平台实例(单个 MT 服务器为 1 个)。 |
| accountNumber | 字符串 | 是的 | MT 上存在的 MT 登录名将在 B2COPY 上注册。 |
| productCurrencyId | 整数 | 是的 | 产品货币标识符 — 请联系支持人员寻求帮助。 |
| isMaster | 整数 | 是的 | 1 → 创建主账户; 0 → 创建投资账户。 |
| accountName | 字符串 | 否 | 分配给帐户的名称。 |
| accountDescription | 字符串 | 否 | 账户交易策略的描述。 |
curl --location --request POST 'https://host.name/api/v2/b2copy/accounts/create' \
--header 'Authorization: Bearer <access_token>' \
--data-raw '{
"clientId": 4406,
"investmentPlatformId": 1,
"accountNumber": "2121882154",
"productCurrencyId": 10,
"isMaster": 0,
"accountName": "MAM investor",
"accountDescription": "The trading strategy applied on the account"
}'回应
创建的帐户对象,包括其 id、类型、可见性标志和时间戳。
{
"is_master": false,
"show_in_client_ui": true,
"status": true,
"id": 12574,
"account_description": "The trading strategy applied on the account",
"account_name": "MAM investor",
"type": 8,
"show_in_leaderboard": false,
"active_since": "2024-04-01T15:06:41.000000Z",
"created_at": "2024-04-01T15:06:41.000000Z"
}