跳至主要内容

查詢兌換歷史

那些被確認的報價單, 不管最終狀態如何, 該接口都會返回

信息

僅返回通過open api進行兌換的歷史紀錄

HTTP 請求

GET /v5/asset/exchange/query-convert-history

請求參數

參數是否必需類型說明
accountTypefalsestring錢包類型
  • 支持傳遞多個, 用逗號分開 比如, eb_convert_funding,eb_convert_uta
  • 當不傳時, 默認返回所有錢包
  • indexfalseinteger頁碼
  • 從1開始
  • 不傳時, 默認返回第一頁
  • limitfalseinteger每頁數量
  • 默認20條
  • 最多支持100條, 大於100, 按照100返回
  • 響應參數

    參數類型說明
    listarray<object>報價單列表
    > accountTypestring錢包類型
    > exchangeTxIdstring報價單ID, 和quoteTxId保持一致
    > userIdstring用戶ID
    > fromCoinstring兌出幣種
    > fromCoinTypestring兌出幣種類型. crypto
    > toCoinstring兌入幣種
    > toCoinTypestring兌入幣種類型. crypto
    > fromAmountstring兌出幣種數量
    > toAmountstring兌入幣種數量
    > exchangeStatusstring兌換狀態
  • init
  • processing
  • success
  • failure
  • > extInfoobject
    >> paramTypestring如果您在申請報價接口中中有發送該字段, 則這裡會釋出該字段
    >> paramValuestring如果您在申請報價接口中中有發送該字段, 則這裡會釋出該字段
    > convertRatestring兌換率
    > createdAtstring報價單創建時間

    請求示例

    GET /v5/asset/exchange/query-convert-history?accountType=eb_convert_uta,eb_convert_funding HTTP/1.1
    Host: api-testnet.bybit.com
    X-BAPI-SIGN: XXXXXX
    X-BAPI-API-KEY: XXXXXX
    X-BAPI-TIMESTAMP: 1720074159814
    X-BAPI-RECV-WINDOW: 5000

    響應示例

    {
    "retCode": 0,
    "retMsg": "ok",
    "result": {
    "list": [
    {
    "accountType": "eb_convert_funding",
    "exchangeTxId": "10100108106409343501030232064",
    "userId": "XXXXX",
    "fromCoin": "ETH",
    "fromCoinType": "crypto",
    "fromAmount": "0.1",
    "toCoin": "BTC",
    "toCoinType": "crypto",
    "toAmount": "0.00534882723991",
    "exchangeStatus": "success",
    "extInfo": {
    "paramType": "opFrom",
    "paramValue": "broker-id-001"
    },
    "convertRate": "0.0534882723991",
    "createdAt": "1720071899995"
    },
    {
    "accountType": "eb_convert_uta",
    "exchangeTxId": "23070eb_convert_uta408933875189391360",
    "userId": "XXXXX",
    "fromCoin": "BTC",
    "fromCoinType": "crypto",
    "fromAmount": "0.1",
    "toCoin": "ETH",
    "toCoinType": "crypto",
    "toAmount": "1.773938248611074",
    "exchangeStatus": "success",
    "extInfo": {},
    "convertRate": "17.73938248611074",
    "createdAt": "1719974243256"
    }
    ]
    },
    "retExtInfo": {},
    "time": 1720074457715
    }