Query transaction records

Query user history transaction records

Endpoint usage

POST https://api.bridgers.xyz/api/exchangeRecord/getTransData

The fields with * are required, and the fields without * are optional

Request Body

{
    "resCode":100,
    "resMsg":"success",
    "data":{
        "list":[
            {
                "id":283,
                "orderId":"kydjhyt5_rec8_tfdi_s67b_td5kpu8qezy0",  // Order Id 
                "fromTokenAddress":"0xa71edc38d189767582c38a3145b5873052c3e47a",  // Contract address for the token to sell 
                "toTokenAddress":"0x382bb369d343125bfb2117af9c149795c6c65c50",    // Contract address for the token to receive  
                "fromTokenAmount":"5",  // Amount of token to sell 
                "toTokenAmount":"3.99", // Estimated amount to receive  
                "fromAddress":"0x20...", //  User address                 
                "slippage":"",  // slippage
                "fromChain":"HECO",  // Network of the token to sell 
                "toChain":"OKEXCHAIN",  // Network of the token to received  
                "hash":"0x505c3b4ebecb3f95e2d51d140c732be7ac6b57119ff2a08908f171f6f00daa1a",   // Deposit hash
                "depositHashExplore":"https://hecoinfo.com/tx/0x505c3b4ebecb3f95e2d51d140c732be7ac6b57119ff2a08908f171f6f00daa1a",  // Deposit hash explorer URL 
                "dexName":"",
                "status":"receive_complete",  // Order status  
                "createTime":"2022-01-25 14:24:32", // Order create time                
                 "source":"Bridgers1",  // Source channel 
                "toAddress":"0x20...",  // Receiving address 
                "toHash":"0xf4575d8e99474319bbc8f5a849ac8821ace868bc3d4ca93723f2c5ead200a5bb",  // Transaction Hash
                "receiveHashExplore":"https://www.oklink.com/oec/tx/0xf4575d8e99474319bbc8f5a849ac8821ace868bc3d4ca93723f2c5ead200a5bb",  // Transaction hash explorer URL 
                "equipmentNo":"0x19b9....",  // Equipment number 
                "refundCoinAmt":"",  //  Refund amount 
                "refundHash":"",  //  Refund Hash 
                "refundHashExplore":"",  // Refund hash explorer URL 
                "refundReason": "1", //(1-Insufficient liquidity, 2-Exceeding threshold error, 3-Maintenance of the original currency, 4-Blacklisted, 5-Maintenance of the target currency, 6-The amount of redemption is not within the range, 7-Deposit timeout, 8-Interact with risky address)
                "fromCoinCode":"USDT(HECO)",  // Token to sell 
                "toCoinCode":"USDT(OKExChain)"   // Token to receive  
            }
        ],
        "total":1,  // Total page number  
        "pageNo":"1"  //  Current page number
    }
}

Code example

//  transData example
  const params = {
    pageNo: 1,
    pageSize: 5,
    fromAddress: '',  //your wallet address
    equipmentNo:'', // your equipment number
    sourceType: 'H5',
    sourceFlag:'widget'
  }
  const res = await axios.post('https://api.bridgers.xyz/api/exchangeRecord/getTransData',params)
  console.log(res)

Postman example

Status field Parsed for display

wait_deposit_send: 'Waiting for deposit',

wait_deposit_send_fail: 'User deposit failed',

wait_exchange_push: 'Exchanging...',

wait_exchange_return: 'Exchanging...',

wait_exchange_return_success: 'Exchanging...',

wait_receive_send: 'Exchange complete, ready to issue crypto',

wait_enough_send:'Issuing crypto …'

wait_receive_confirm: 'Confirming issue …',

receive_complete: 'Swap completed',

wait_refund_send: 'Refunding',

wait_refund_confirm: 'Confirming refund ...',

refund_complete: 'refund complete',

timeout: 'Timeout',

ERROR: 'Exchanging...',

wait_for_information:'please contact customer service.'

Last updated