跳至主要内容

申請報價

信息

僅可使用主帳號 UID 的 API 密鑰進行請求

HTTP 請求

POST /v5/fiat/quote-apply

請求參數

參數是否必需類型說明
fromCointruestring轉換的原幣種(賣出的幣種)
fromCoinTypetruestring原幣種類型,可選值:fiatcrypto
toCointruestring轉換的目標幣種(買入的幣種)
toCoinTypetruestring目標幣種類型,可選值:fiatcrypto
requestAmounttruestring請求的原幣種數量(賣出的數量)

響應參數

參數類型說明
quoteTxIdstring報價交易 ID,系統生成,用於確認報價
exchangeRatestring匯率
fromCoinstring轉換的原幣種(賣出的幣種)
fromCoinTypestring原幣種類型,可選值:fiatcrypto
toCoinstring轉換的目標幣種(買入的幣種)
toCoinTypestring目標幣種類型,可選值:fiatcrypto
fromAmountstring原幣種數量(賣出的數量)
toAmountstring目標幣種數量(根據匯率買入的數量)
expiredTimestring該報價的過期時間(毫秒)

請求示例

POST /v5/fiat/quote-apply HTTP/1.1  
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1720071077014
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Type: application/json
Content-Length: 172

{
"fromCoin": "ETH",
"fromCoinType": "fiat",
"toCoin": "BTC",
"toCoinType": "crypto",
"requestAmount": "0.1"
}

響應示例

{
"retCode": 0,
"retMsg": "success",
"result": {
"quoteTaxId": "QuoteTaxId123456",
"exchangeRate": "1.0",
"fromCoin": "ETH",
"fromCoinType": "fiat",
"toCoin": "BTC",
"toCoinType": "crypto",
"fromAmount": "0.1",
"toAmount": "0.1",
"expireTime": "1764561045346"
}
}