跳至主要内容

切換全倉/逐倉保證金(交易對)

選擇全倉保證金或者是逐倉保證金,請參閱這裡了解關於全倉/逐倉保證金模式。

HTTP 請求

POST /v5/position/switch-isolated

請求參數

參數是否必需類型說明
categorytruestring產品類型
symboltruestring合約名稱
tradeModetrueinteger0: 全倉. 1: 逐倉
buyLeveragetruestring買側槓桿倍數. 必須與sellLeverage的值保持相同
sellLeveragetruestring賣側槓桿倍數. 必須與buyLeverage的值保持相同

響應參數

請求示例

POST /v5/position/switch-isolated HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN-TYPE: 2
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1675248447965
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 121

{
"category": "linear",
"symbol": "ETHUSDT",
"tradeMode": 1,
"buyLeverage": "10",
"sellLeverage": "10"
}

響應示例

{
"retCode": 0,
"retMsg": "OK",
"result": {},
"retExtInfo": {},
"time": 1675248433635
}