Get Sub UID List (Limited)
Get at most 10k sub UID of master account. Use master user's api key only.
tip
The API key must have one of the below permissions in order to call this endpoint..
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
HTTP Request
GET /v5/user/query-sub-members
Request Parameters
None
Response Parameters
Parameter | Type | Comments |
---|---|---|
subMembers | array | Object |
> uid | string | Sub user Id |
> username | string | Username |
> memberType | integer | 1 : normal sub account, 6 : custodial sub account |
> status | integer | The status of the user account
|
> accountMode | integer | The account mode of the user account
|
> remark | string | The remark |
Request Example
- HTTP
- Python
- Node.js
GET /v5/user/query-sub-members HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1676430318405
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_sub_uid())
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getSubUIDList()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "",
"result": {
"subMembers": [
{
"uid": "53888001",
"username": "xxx001",
"memberType": 1,
"status": 1,
"remark": "test",
"accountMode": 3
},
{
"uid": "53888002",
"username": "xxx002",
"memberType": 6,
"status": 1,
"remark": "",
"accountMode": 1
}
]
},
"retExtInfo": {},
"time": 1676430319452
}