# 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

![](/files/k5Vk2vGpJVfAq0LZhpiq)

### 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.'


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-bridgers-en.bridgers.xyz/bridgers-api-endpoints/query-transaction-details.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
