查詢帳戶支持的錢包類型
查詢母帳戶或者子帳戶下支持的錢包類型
提示
- 使用母帳戶api key: 您可以查詢到母帳戶以及指定的子帳戶的錢包類型, 子帳戶的uid最多單次可查詢200個.
- 使用子帳戶api key: 僅能查詢自身的錢包類型
最佳實踐
"FUND" - 這個資金錢包, 如果您從未存入或者轉入過資金, 該接口返回的數組裡將不會呈現該枚舉值, 但實際上您的帳戶總是擁有該錢包.
["SPOT","OPTION","FUND","CONTRACT"]
: 經典帳戶並且資金錢包曾經操作過["SPOT","OPTION","CONTRACT"]
: 經典帳戶並且資金錢包不曾操作過["SPOT","UNIFIED","FUND","CONTRACT"]
: UMA帳戶並且資金錢包曾經操作過. (等強制或主動升級到UTA後, 就沒有UMA帳戶的概念了)["SPOT","UNIFIED","CONTRACT"]
: UMA帳戶並且資金錢包不曾操作過. (等強制或主動升級到UTA後, 就沒有UMA帳戶的概念了)["UNIFIED""FUND","CONTRACT"]
: UTA帳戶並且資金錢包曾經操作過["UNIFIED","CONTRACT"]
: UTA帳戶並且資金錢包不曾操作過
HTTP 請求
GET /v5/user/get-member-type
請求參數
參數 | 是否必須 | 類型 | 說明 |
---|---|---|---|
memberIds | false | string |
|
返回參數
參數 | 類型 | 說明 |
---|---|---|
accounts | array | Object |
> uid | string | 母/子 uid |
> accountType | array | SPOT , CONTRACT , FUND , OPTION , UNIFIED . 請查閱上面的最佳實踐來理解返回的值 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/user/get-member-type HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1686884973961
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
// https://api.bybit.com/v5/user/get-member-type
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getUIDWalletType({
memberIds: 'subUID1,subUID2',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {
"accounts": [
{
"uid": "24617703",
"accountType": [
"SPOT",
"OPTION",
"FUND",
"CONTRACT"
]
}
]
},
"retExtInfo": {},
"time": 1686895670002
}