凍結/解凍子帳戶
凍結或解凍子帳戶。需使用母帳戶的API key。
提示
在調用接口時,使用的API key至少需要擁有以下其中一種權限
- 母API key: "Account Transfer(資產帳戶劃轉)", "Subaccount Transfer(母子帳戶劃轉)", "Withdrawal(提幣)"
HTTP 請求
POST /v5/user/frozen-sub-member
請求參數
參數 | 是否必須 | 類型 | 說明 |
---|---|---|---|
subuid | true | integer | 子帳戶userId |
frozen | true | integer | 0 :解凍, 1 :凍結 |
返回參數
無
請求示例
- HTTP
- Python
- Node.js
POST /v5/user/frozen-sub-member HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1676430842094
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"subuid": 53888001,
"frozen": 1
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.freeze_sub_uid(
subuid=53888001,
frozen=1,
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.setSubUIDFrozenState(53888001, 1)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {},
"retExtInfo": {},
"time": 1676430697553
}