# Get Order List

1. Request Url:

```
https://{host}/api/v2/queryAllTrade
```

2\. Request parameter instance

| parameter   | whether | explain                                                                                  |
| ----------- | ------- | ---------------------------------------------------------------------------------------- |
| equipmentNo | Yes     | Equipment unique number                                                                  |
| sourceType  | Yes     | ANDROID,IOS,H5                                                                           |
| pageNo      | No      | It is used to identify which platfEg: 1, default 1: number of records displayed per page |
| pageSize    | No      | Eg: 10, default 10                                                                       |

3\. Example of request parameters

```
{
    "equipmentNo":"SFjeigreEIFegjieFei",
    "sourceType":"H5",
    "pageNo":"1",
    "pageSize":"10"
}
```

4.Example of returned results

```
{
    "data": {
        "pageContent": [
            {
                "beginDate": "2022-03-10 18:44:21",
                "chainFee": "0.001",
                "changeType": "advanced",
                "depositFeeRate": "0.002",
                "detailState": "timeout",
                "feeCoinAmt": "0.004",
                "feeCoinCode": "ETH",
                "fromCoinAmt": "2",
                "fromCoinCode": "ETH",
                "instantRate": "6.923076923076",
                "isNft": "",
                "nftUrl": "",
                "orderId": "f94e631b-d99b-4dd5-98f7-09bf99d16d94",
                "payTokenUrl": "",
                "percentChange": "",
                "router": {},
                "toCoinAmt": "13.713109",
                "toCoinCode": "BNB(BSC)",
                "tradeFlag": "",
                "tradeState": "timeout"
            },
            {
                "beginDate": "2022-03-10 18:30:36",
                "chainFee": "0.001",
                "changeType": "advanced",
                "depositFeeRate": "0.002",
                "detailState": "timeout",
                "feeCoinAmt": "0.002",
                "feeCoinCode": "ETH",
                "fromCoinAmt": "1",
                "fromCoinCode": "ETH",
                "instantRate": "6.923076923076",
                "isNft": "",
                "nftUrl": "",
                "orderId": "864ca993-8fb8-4715-aab6-cd2e87b625cb",
                "payTokenUrl": "",
                "percentChange": "",
                "router": {},
                "toCoinAmt": "6.865979",
                "toCoinCode": "BNB(BSC)",
                "tradeFlag": "",
                "tradeState": "timeout"
            }
        ],
        "pageNo": 1,
        "pageSize": 10,
        "totalCount": 2,
        "totalPage": 1
    },
    "resCode": "800",
    "resMsg": "成功",
    "resMsgEn": ""
}
```

5.Return Parameter Description

<table><thead><tr><th width="122">字段名称</th><th width="194">字段</th><th width="147">数据类型</th><th>备注</th></tr></thead><tbody><tr><td>pageNo </td><td>pageNo </td><td>String </td><td>eg：1</td></tr><tr><td>pageSize</td><td>pageSize</td><td>String </td><td>eg：10</td></tr><tr><td>totalPage</td><td>totalPage</td><td>String </td><td>eg：10</td></tr><tr><td>totalCount  </td><td>totalCount</td><td>String </td><td>eg：100</td></tr><tr><td>pageContent </td><td>pageContent </td><td>String </td><td>eg：[{name1:value1},{name1:value1},{name1:value1}]</td></tr><tr><td>fromCoinCode</td><td>fromCoinCode</td><td>String</td><td>eg：ETH</td></tr><tr><td>toCoinCode</td><td>toCoinCode</td><td>String </td><td>eg：BTC</td></tr><tr><td>fromCoinAmt </td><td>fromCoinAmt </td><td>String </td><td>eg：0.0</td></tr><tr><td>toCoinAmt</td><td>toCoinAmt</td><td> String </td><td>eg：0.14</td></tr><tr><td>beginDate </td><td>beginDate </td><td>String </td><td>eg：2017-09-08</td></tr><tr><td>feeCoinCode</td><td>feeCoinCode</td><td>String </td><td>eg：ETH</td></tr><tr><td>feeCoinAmt</td><td>feeCoinAmt</td><td>String</td><td>eg：0.0003</td></tr><tr><td>orderId </td><td>orderId </td><td>String </td><td>eg：d47e8b9b-c17f-432b-9285-a46c0a3ceb9a</td></tr><tr><td>tradeState</td><td>tradeState</td><td>String</td><td>"Wait_deposits: currency to be saved, exchange: in exchange complete: complete (successful exchange) timeout: timeout, wait_refund: failed exchange, currency to be returned, refund_complete: returned currency"</td></tr></tbody></table>

### **Code Example** <a href="#id-3-code-example" id="id-3-code-example"></a>

#### Nodejs code example

```javascript
//getToken example 
import axios from 'axios'
const params = {
    equipmentNo:"zfgryh918f93a19fdg6918a68cf5",
    sourceType:"H5",
    userNo:"",
    sessionUuid:"",
    orderId:"",
    sourceFlag:"widget",
    pageNo:1,
    pageSize:5,
    fromAddress:"0x19b9918f...f85ad08ba0"
}
const res = await axios.post('https://{host}/api/v2/queryAllTrade', params )
console.log(res)
```

**Postman example**

<figure><img src="https://2491477457-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LUhiTwwiqGj9wzsGZ49%2Fuploads%2FA4BFCXvf0ZmS3rXCfcF5%2F%E5%9B%BE%E7%89%87.png?alt=media&#x26;token=37a90836-6372-4388-a54c-30f60b0dcf8e" alt=""><figcaption></figcaption></figure>

**Response Data**

```
{
    "data": {
        "pageContent": [
            {
                "beginDate": "2022-03-10 18:44:21",
                "chainFee": "0.001",
                "changeType": "advanced",
                "depositFeeRate": "0.002",
                "detailState": "timeout",
                "feeCoinAmt": "0.004",
                "feeCoinCode": "ETH",
                "fromCoinAmt": "2",
                "fromCoinCode": "ETH",
                "instantRate": "6.923076923076",
                "isNft": "",
                "nftUrl": "",
                "orderId": "f94e631b-d99b-4dd5-98f7-09bf99d16d94",
                "payTokenUrl": "",
                "percentChange": "",
                "router": {},
                "toCoinAmt": "13.713109",
                "toCoinCode": "BNB(BSC)",
                "tradeFlag": "",
                "tradeState": "timeout"
            },
            {
                "beginDate": "2022-03-10 18:30:36",
                "chainFee": "0.001",
                "changeType": "advanced",
                "depositFeeRate": "0.002",
                "detailState": "timeout",
                "feeCoinAmt": "0.002",
                "feeCoinCode": "ETH",
                "fromCoinAmt": "1",
                "fromCoinCode": "ETH",
                "instantRate": "6.923076923076",
                "isNft": "",
                "nftUrl": "",
                "orderId": "864ca993-8fb8-4715-aab6-cd2e87b625cb",
                "payTokenUrl": "",
                "percentChange": "",
                "router": {},
                "toCoinAmt": "6.865979",
                "toCoinCode": "BNB(BSC)",
                "tradeFlag": "",
                "tradeState": "timeout"
            }
        ],
        "pageNo": 1,
        "pageSize": 10,
        "totalCount": 2,
        "totalPage": 1
    },
    "resCode": "800",
    "resMsg": "成功",
    "resMsgEn": ""
}
```


---

# 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.en.omnibridge.pro/cross-chain-swap-api/all-orders.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.
