一鍵還款
您可以通過該接口手動還清統一帳戶中的借款
權限: USDC合約
HTTP 請求
POST /v5/account/quick-repayment
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
coin | false | string | 有負債的幣種
|
響應參數
參數 | 類型 | 說明 |
---|---|---|
list | array | Object |
> coin | string | 用於償還借款的兌出幣種
|
> repaymentQty | string | 兌出幣種數量 |
請求示例
- HTTP
- Python
- Node.js
POST /v5/account/quick-repayment HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1701848610019
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 22
{
"coin": "USDT"
}
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.repayLiability({
coin: 'USDT',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "SUCCESS",
"result": {
"list": [
{
"coin": "BTC",
"repaymentQty": "0.10549670"
},
{
"coin": "ETH",
"repaymentQty": "2.27768114"
}
]
},
"retExtInfo": {},
"time": 1701848610941
}