跳至主要内容

獲取報價

三方託管帳戶, 比如copper, fireblock等帳戶是無法做兌換的

信息
  • API密鑰權限: Convert
  • API速率限制: 5 req /s
  • 在統一交易賬戶下,您真實的成交數量可能小於可用餘額,若您同時提交多個幣種的兌換請求,則可能會部分成交,請您以實際到賬數量爲準。

HTTP 請求

POST /v5/asset/covert/get-quote

請求參數

參數是否必需類型說明
accountTypetruestring錢包類型,eb_convert_uta,僅支持統一錢包
fromCoinListtruearray<string>源幣種列表,例如["BTC", "XRP", "ETH"],每筆交易最多支持20種幣種
toCointruestring目標幣種,每次請求支持MNT、USDT或USDC之一

響應參數

參數類型說明
quoteIdstring報價交易ID,由系統生成,用於確認報價和查詢交易結果
resultobject
> quoteCreateTimestring報價創建時間戳
> quoteExpireTimestring報價過期時間戳,有效期30秒
> exchangeCoinsarray<object>報價詳情
>> fromCoinstring源幣種
>> supportConvertinteger1: 支持, 2: 不支持
>> availableBalancestring可提现餘額
>> baseValuestringUSDT等值金額
>> toCoinstring目標幣種
>> toAmountstring預計接收金額
>> exchangeRatestring匯率
>> feeInfoobject兌換手續費信息
>>> feeCoinstring手續費幣種
>>> amountstring手續費金額
>>> feeRatestring手續費率
>> taxFeeInfoobject稅費信息
>>> totalAmountstring稅費總額
>>> feeCoinstring稅費幣種
>>> taxFeeItemsarray稅費項目
> totalFeeInfoobject總兌換手續費詳情
>> feeCoinstring手續費幣種
>> amountstring總手續費金額
>> feeRatestring手續費率
> totalTaxFeeInfoobject總稅費信息
>> totalAmountstring總稅費金額
>> feeCoinstring稅費幣種
>> taxFeeItemsarray稅費項目

請求示例

POST /v5/asset/covert/get-quote HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1766126592271
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Type: application/json
Content-Length: 97

{
"accountType": "eb_convert_uta",
"fromCoinList": ["XRP", "SOL"],
"toCoin": "USDC"
}

響應示例

{
"retCode": 0,
"retMsg": "ok",
"result": {
"quoteId": "1010075157602510902217555968",
"result": {
"quoteCreateTime": "1766126593232",
"quoteExpireTime": "1766126623231",
"exchangeCoins": [
{
"fromCoin": "SOL",
"supportConvert": 1,
"availableBalance": "0.000003",
"baseValue": "0.00036837",
"toCoin": "USDC",
"toAmount": "0.00035721396701649",
"exchangeRate": "119.07132233883026",
"feeInfo": {
"feeCoin": "USDC",
"amount": "0.00000729008095952",
"feeRate": "0.02"
},
"taxFeeInfo": {
"totalAmount": "0",
"feeCoin": "",
"taxFeeItems": []
}
},
{
"fromCoin": "XRP",
"supportConvert": 1,
"availableBalance": "0.0002",
"baseValue": "0.00024536",
"toCoin": "USDC",
"toAmount": "0.000359866676661744",
"exchangeRate": "1.79933338330872",
"feeInfo": {
"feeCoin": "USDC",
"amount": "0.000007344217891056",
"feeRate": "0.02"
},
"taxFeeInfo": {
"totalAmount": "0",
"feeCoin": "",
"taxFeeItems": []
}
}
],
"totalFeeInfo": {
"feeCoin": "USDC",
"amount": "0.000014634298850576",
"feeRate": "0.02"
},
"totalTaxFeeInfo": {
"totalAmount": "0",
"feeCoin": "",
"taxFeeItems": []
}
}
},
"retExtInfo": {},
"time": 1766126593232
}