綁定/解綁UID
對於場外借貸產品, 您可以自行綁定新的UID到風險單元內或者解綁某個UID
信息
- 風險單元的主UID不能解綁
- 綁定的UID必須升級到了UTA Pro
HTTP 請求
POST /v5/ins-loan/association-uid
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
uid | true | string | UID a) 調用接口的key必須來自風險單元內的任意uid; b) 目標帳戶不能有機構借貸 a) 調用接口的key必須來自風險單元內的任意uid; b) 準備解綁的uid不能和調用接口的uid一樣 |
operate | true | string | 0 : 綁定, 1 : 解綁 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
uid | string | UID |
operate | string | 0 : 綁定, 1 : 解綁 |
請求示例
- HTTP
- Python
- Node.js
POST /v5/ins-loan/association-uid HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1699257853101
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXX
Content-Type: application/json
Content-Length: 43
{
"uid": "592324",
"operate": "0"
}
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.bindOrUnbindUID({
uid: 'yourUID',
operate: '0', // 0 for bind, 1 for unbind
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "OK",
"result": {
"uid": "592324",
"operate": "0"
},
"retExtInfo": {},
"time": 1699257746135
}