1. 查询账户信息
GET /v1/api/account/info/byUserId?userIds={userIds}
根据用户ID查询归属的账户信息
Name |
Required |
Type |
Description |
x-api-tenantId |
yes |
string |
租户编号 |
x-api-token |
yes |
string |
认证token |
Request Parameters
Name |
Required |
Type |
Description |
userIds |
yes |
string |
用户ID |
Response
Name |
Type |
Description |
result |
boolean |
成功标识,返回true,表示请求成功,false表示请求失败 |
mcode |
string |
错误码,成功时返回m00000,失败时返回对应的错误码,见文档默认错误码说明 |
data |
object |
账户数据 |
errorMessage |
List |
错误提示信息,部分错误码时有值 |
1、data数据类型
Name |
Type |
Description |
login |
string |
账户ID |
currency |
string |
入金货币 |
enable |
int |
登录状态 |
readOnly |
int |
交易状态 |
sendReports |
int |
sned reports |
group |
string |
总记录数 |
leadSource |
int |
leadSource |
leverage |
string |
杠杆 |
regdate |
string |
注册时间 |
maxLeverage |
int |
最大杠杆,ctrader才有 |
frenchRisk |
bool |
French risk,ctrader才有 |
accountType |
string |
账户类型 |
totalMarginCalculationType |
string |
总保证金计算类型 |
swapFree |
bool |
|
oweId |
string |
账户归属 |
Example
请求示例
GET /v1/api/account//info/byUserId?userIds=4,5
返回示例:成功
{
"data": [
{
"accountType": "HEDGED",
"currency": "EUR",
"enable": 1,
"frenchRisk": false,
"group": "Default",
"leadSource": "",
"leverage": 20,
"login": "3004272",
"maxLeverage": 0,
"readOnly": 0,
"regdate": "2016-10-05 15:52:47",
"sendReports": 0,
"swapFree": false,
"totalMarginCalculationType": "MAX"
},
{
"accountType": "HEDGED",
"currency": "USD",
"enable": 1,
"frenchRisk": false,
"group": "HFT",
"leadSource": "",
"leverage": 300,
"login": "3004273",
"maxLeverage": 0,
"readOnly": 0,
"regdate": "2016-10-06 16:02:17",
"sendReports": 0,
"swapFree": false,
"totalMarginCalculationType": "MAX"
}
],
"mcode": "m0000000",
"result": true
}
返回示例:失败
{
"mcode":"m0000001",
"errorMessage":"",
"result":false
}
2. Error 错误处理
错误码表(Error Code)
mcode |
Message |
BW_INVALID_PARAM |
参数错误 |
-1 |
服务异常,请稍后再试 |