借款
覆蓋範圍: 全倉槓桿 (經典帳戶)
HTTP 請求
POST /v5/spot-cross-margin-trade/loan
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
coin | true | string | 幣種名稱 |
qty | true | string | 借貸金額 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
transactId | string | 借款交易ID |
請求示例
- HTTP
- Python
POST /v5/spot-cross-margin-trade/loan HTTP/1.1
Host: api-testnet.bybit.com
Content-Type: application/json
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1677751838628
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Length: 38
{
"coin": "ETH",
"qty": "10"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.spot_margin_trade_normal_borrow(
coin="ETH",
qty="10",
))
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"transactId": "21005"
},
"retExtInfo": {},
"time": 1677751839688
}