# Query transaction details

### Endpoint usage

<mark style="color:green;">`POST`</mark> `https://api.bridgers.xyz/api/exchangeRecord/getTransDataById`

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

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| orderId<mark style="color:red;">\*</mark> | String | Order Id    |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "resCode":100,
    "resMsg":"success",
    "data":{
        "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":"0x19...",  // 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:35", // Order create time  
        "source":"Bridgers1",  // Source channel 
        "toAddress":"0x19...",   // Receiving address 
        "toHash":"0xf4575d8e99474319bbc8f5a849ac8821ace868bc3d4ca93723f2c5ead200a5bb",    // Transaction Hash 
        "receiveHashExplore":"https://www.oklink.com/oec/tx/0xf4575d8e99474319bbc8f5a849ac8821ace868bc3d4ca93723f2c5ead200a5bb", //  Transaction hash explorer URL 
        "equipmentNo":"0x19b991...", // 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  
    }
}

```

{% endtab %}
{% endtabs %}

### Code example

{% tabs %}
{% tab title="JavaScript" %}

```
// example
const params = {
 orderId: '', //order number
}
 const res = await axios.post('https://api.bridgers.xyz/api/exchangeRecord/getTransDataById',params)
 console.log(res)
```

{% endtab %}
{% endtabs %}

### Postman example

![](https://1371637894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBjj3xwD1ODc9uBxuQrlr%2Fuploads%2FfV4Ntqba0tz12WsBmtkB%2F6.jpg?alt=media\&token=61b3b82f-0eb7-4b65-b308-0d5981282605)

### Status field Parsed for display

wait\_deposit\_send: 'Waiting for deposit',&#x20;

wait\_deposit\_send\_fail: 'User deposit failed',&#x20;

wait\_exchange\_push: 'Exchanging...',&#x20;

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 ….',&#x20;

receive\_complete: 'Swap completed',

wait\_refund\_send: 'Refunding',

wait\_refund\_confirm: 'Confirming refund ...',&#x20;

refund\_complete: 'refund complete',

timeout: 'Timeout',

ERROR: 'Exchanging...',

wait\_for\_information:'please contact customer service.'
