刪除母帳戶的API Key
刪除母帳戶下的api key。使用待刪除的api key調用接口。需使用母帳戶的API key。
提示
在調用接口時,使用的API key至少需要擁有以下其中一種權限
- 母API key: "Account Transfer(資產帳戶劃轉)", "Subaccount Transfer(母子帳戶劃轉)", "Withdrawal(提幣)"
危險
當心! 用於調用本接口的API KEY將會立馬失效。
HTTP 請求
POST /v5/user/delete-api
請求參數
無
返回參數
無
請求示例
- HTTP
- Python
- Node.js
POST /v5/user/delete-api HTTP/1.1
Host: api.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1676431576621
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Type: application/json
{
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.delete_master_api_key())
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.deleteMasterApiKey()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {},
"retExtInfo": {},
"time": 1676431577675
}