1. 开通返佣账户
POST /v1/api/account/openCommissionAccount
Request Headers
| Name | Required | Type | Description |
|---|---|---|---|
| x-api-tenantId | yes | string | 租户编号 |
| x-api-token | yes | string | 认证token |
Request Body Parameters
| Name | Required | Type | Description |
|---|---|---|---|
| serverId | yes | string | server编码 |
| login | no | Long | 账户login |
| enable | yes | integer | 登录状态,0不能登录,1可以登录 |
| readOnly | yes | interger | 交易状态,0可以交易,1不能交易 |
| group | yes | string | MT组 |
| leverage | yes | integer | 杠杆 |
| customerId | no | string | 客户ID |
| no | string | 邮箱 | |
| phone | no | object | 电话,详见电话数据类型 |
| name | yes | string | 姓名 |
| password | no | string | 登录密码 |
| investorPassword | no | string | 交易密码 |
电话数据类型
| Name | Type | Description |
|---|---|---|
| phone | string | 电话 |
| countryCode | string | 国家码 |
Response
| Name | Type | Description |
|---|---|---|
| result | boolean | 成功标识,返回true,表示请求成功,false表示请求失败 |
| mcode | string | 错误码,成功时返回m00000,失败时返回对应的错误码,见文档默认错误码说明 |
| message | List | 错误提示信息,部分错误码时有值 |
| data | object | 账户信息,详见账户信息 |
账户信息
| Name | Type | Description |
|---|---|---|
| serverId | string | 服务器编码 |
| login | integer | 账号 |
| password | string | 密码 |
| investorPassword | string | 投资密码 |
Example
请求示例
POST /v1/api/account/openCommissionAccount
RequestBody
{
"serverId": "428",
"group":"OliTestCFH15",
"userGroup":"9",
"leverage":"1",
"userId":4,
"leadSource":"asd",
"sendReports":"1",
"readOnly":"1",
"enable":"1",
"name":"stevenadd",
"phone":{"phone":"123123123", "countryCode":"+86"},
"email":"[email protected]"
}
返回示例:成功
{
"data": {
"investorPassword": "3o9c4m",
"login": "20004",
"password": "9s2d1v",
"serverId": "428"
},
"mcode": "m0000000",
"result": true
}
返回示例:失败
{
"mcode": "MT4_3",
"message": "",
"result": false
}
2. Error 错误处理
错误码表(Error Code)
| mcode | Message |
|---|---|
| BW_INVALID_PARAM | 参数错误 |
| BW_INVALID_SERVERID | 无效serverId |
| -1 | 服务异常,请稍后再试 |