借款
權限: "現貨交易"
信息
- 借款發放到資金帳戶
- 質押金將從資金帳戶扣減, 因此確保資金帳戶有足額質押幣種
HTTP 請求
POST /v5/crypto-loan/borrow
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
loanCurrency | true | string | 借貸幣種 |
loanAmount | false | string | 借貸金額 |
loanTerm | false | string | 借貸期限 null 或者不傳字段7 , 14 , 30 , 90 , 180 天 |
collateralCurrency | true | string | 質押幣種 |
collateralAmount | false | string | 質押金額 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
orderId | string | 借貸訂單ID |
請求示例
- HTTP
- Python
- Node.js
POST /v5/crypto-loan/borrow HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXXX
X-BAPI-API-KEY: XXXXXXX
X-BAPI-TIMESTAMP: 1728629356551
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 140
{
"loanCurrency": "USDT",
"loanAmount": "550",
"collateralCurrency": "BTC",
"loanTerm": null,
"collateralAmount": null
}
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.borrowCryptoLoan({
loanCurrency: 'USDT',
loanAmount: '550',
collateralCurrency: 'BTC',
loanTerm: null,
collateralAmount: null,
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "request.success",
"result": {
"orderId": "1794267532472646144"
},
"retExtInfo": {},
"time": 1728629357820
}