提現
若目標地址是Bybit平台內部地址, 您可以實現內部平台轉帳
提示
- 確保您已經將提現地址加入到這裡
- 僅支持母帳號的API key
公式
feeType=0:
- 若百分比手續費 != 0: 手續費 = 輸入金額 / (1 - 百分比手續費) * 百分比手續費 + 固定手續費
- 若百分比手續費 = 0: 手續費 = 固定手續費
feeType=1:
- 若百分比手續費 != 0: 手續費 = 固定手續費 + (輸入金額 - 固定手續費) * 百分比手續費
- 若百分比手續費 = 0: 手續費 = 固定手續費
HTTP 請求
POST /v5/asset/withdraw/create
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
coin | true | string | 幣種 |
chain | false | string |
|
address | true | string | 錢包地址或者Bybit UID |
tag | false | string | 標籤
|
amount | true | string | 提現金額 |
timestamp | true | integer | 當前時間戳 (毫秒). 用於防止請求重放 |
forceChain | false | integer | 是否強制走鏈
|
accountType | false | string | 設置出金帳戶.
|
feeType | false | integer | 手續費選項
|
requestId | false | string | 自定義ID, 全局唯一, 用於冪等校驗 |
beneficiary | false | Object | 提現目標方基本信息, 僅kyc=KOR(韓國個人用戶)必須傳遞此字段 |
> vaspEntityId | true | string | 接收方交易所id. 請調用該接口來查詢對應的id |
> beneficiaryName | false | string | 接收方交易所用戶kyc姓名, 比如John Wilson 或者 Wilson John |
響應參數
參數 | 類型 | 說明 |
---|---|---|
id | string | 提現Id |
請求示例
- HTTP
- Python
- Node.js
POST /v5/asset/withdraw/create HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672196570254
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXX
Content-Type: application/json
{
"coin": "USDT",
"chain": "ETH",
"address": "0x99ced129603abc771c0dabe935c326ff6c86645d",
"amount": "24",
"timestamp": 1672196561407,
"forceChain": 0,
"accountType": "FUND"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.withdraw(
coin="USDT",
chain="ETH",
address="0x99ced129603abc771c0dabe935c326ff6c86645d",
amount="24",
timestamp=1672196561407,
forceChain=0,
accountType="FUND",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.submitWithdrawal({
coin: 'USDT',
chain: 'ETH',
address: '0x99ced129603abc771c0dabe935c326ff6c86645d',
amount: '24',
timestamp: 1672196561407,
forceChain: 0,
accountType: 'FUND',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"id": "10195"
},
"retExtInfo": {},
"time": 1672196571239
}