# User Trade Query

## Over-the-counter transaction record

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/otcTradeRecord`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant AppKey |
| time<mark style="color:red;">\*</mark>    | String |                 |
| data<mark style="color:red;">\*</mark>    | String |                 |
| sign<mark style="color:red;">\*</mark>    | String |                 |

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

```javascript
{
  "code": "",
  "msg": "",
  "data": "",
  "sign": ""
}

data:

  "minvolume": -85877589.87032616,
        "sell": 76456802.81250894,
        "beginTime": -84109769.0972242,
        "endTime": -91471204.57082653,
        "ctime": -83252352.01812582,
        "personalFeeDiscount": -52561186.38481931,
        "dealVolume": 29689231.7318981,
        "muid": -87491426.22952344,
        "mtime": -44834754.37780844,
        "autoReply": "veniam ut cu",
        "openType": "in labore",
        "numberCode": "esse sint dolor",
        "companyId": 57447087.82520917,
        "isBlockTrade": -53501910.55336584
      },
      "adsOwner": 9923810.697270945,
      "adsId": -7557138.298130855,
      "sellerComment": "Lorem tempor",
      "buyerCommentGrade": 95611794.75377128,
      "volume": "ad tempor nulla ut dolor",
      "bidCid": 81124164.91613445,
      "sequence": "ipsum dolore",
      "realName": "ad deserunt velit dolor",
      "feeAmount": "esse ut",
      "paySymbol": "cupidatat elit Excepteur",
      "createTime": 91195397.5040384,
      "status_text": "sit in culpa",
      "status": -45347712.68056339
    },
    {
      "totalPrice": "ad occaecat",
      "payTime": -97697744.91491856,
      "type": "minim sit fugiat ut dolore",
      "buyerId": -67400315.03292991,
      "buyerComment": "mollit aliqua",
      "payCoin": "proident",
      "sellerCommnetGrade": 29624576.293991074,
      "coinSymbol": "in",
      "sellerId": -81112890.94397196,
      "price": "deserunt cillum",
      "id": -77713242.61590835,
      "isBlockTrade": -53173517.20048298,
      "side": "non ad",
      "sidCid": 64917217.75421363,
      "nickName": "amet aute Excepteur commodo adipisicing",
      "advert": {
        "id": -82025960.19075097,
        "userId": 71893889.17026561,
        "status": 42502852.00024676,
        "side": "laboris cillum id Ut",
        "coin": "velit aute",
        "country": "dolore irure aliquip",
        "paycoin": "ex mollit aliquip dolor",
        "payment": "anim minim aliquip",
        "bankname": "ullamco",
        "priceRate": 79040943.9136841,
        "priceRateType": -70491397.7763741,
        "price": 58131019.11235669,
        "volume": -87245350.25403991,
        "feeRate": -52708904.255970076,
        "minTrade": -44253110.02508186,
        "maxTrade": -16720855.329489842,
        "beginDate": 9723332.17430523,
        "endDate": 16176193.82829751,
        "limitTime": -13816470.420947582,
        "terms": "nostrud id Ut eu in",
        "description": "occaecat",
        "authType": "minim adipisicing eu cupidatat",
        "minvolume": -91929088.03002208,
        "sell": -46475215.25835092,
        "beginTime": 24165976.991789952,
        "endTime": -63123299.885861695,
        "ctime": -11170229.167308807,
        "personalFeeDiscount": -40508687.216340624,
        "dealVolume": 66928105.85846299,
        "muid": 64368529.07996601,
        "mtime": 61880934.20807341,
        "autoReply": "sed ut",
        "openType": "reprehenderit occaecat sit in ut",
        "numberCode": "id reprehenderit nisi",
        "companyId": 9020599.115089566,
        "isBlockTrade": -68014672.57747972
      },
      "adsOwner": 370299.06812007725,
      "adsId": -35386946.45741396,
      "sellerComment": "aliquip consequat id irure",
      "buyerCommentGrade": 4069096.2173048854,
      "volume": "nisi amet ex elit",
      "bidCid": 9147210.283984378,
      "sequence": "ullamco mollit ad",
      "realName": "consectetur nostr",
      "feeAmount": "enim eu minim ipsu",
      "paySymbol": "dolore incididunt sit pariatur m",
      "createTime": 19711855.429372743,
      "status_text": "laboris consequat eu culpa",
      "status": -84096110.66384327
    }
  ]
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

(openId, userId, mobileNumber, email) One of the four must be provided.

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>openId</td><td>String</td><td>NO</td><td></td><td>openId, userId must pass one, while passing, take openId</td></tr><tr><td>userId</td><td>String</td><td>NO</td><td></td><td>openId, userId must pass one, while passing, take openId</td></tr><tr><td>mobileNumber</td><td>String</td><td>NO</td><td>09011223</td><td>Cell phone number</td></tr><tr><td>email</td><td>String</td><td>NO</td><td>xxxxx@.com</td><td>User email(openId,userId,mobileNumber,email)Four choices are required</td></tr><tr><td>page</td><td>String</td><td>NO</td><td>1</td><td>The page number, defaulting to 1 for the first page.</td></tr><tr><td>pageNumber</td><td>String</td><td>NO</td><td>1000</td><td>Default 1000 entries.</td></tr></tbody></table>

## Coin trading records

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/trade/getAll`

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                       |
| ----------------------------------------- | ------ | --------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant unique identifier: appId |
| time<mark style="color:red;">\*</mark>    | String |                                   |
| sign<mark style="color:red;">\*</mark>    | String |                                   |
| data<mark style="color:red;">\*</mark>    | String |                                   |

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

```javascript
{
    "code": "", //Return code	
    "msg": "", //Success or failure message	
    "data": "",
    "sign": ""
}

data:
{
    "count": 1,//Total number of records.
    "resultList": [
      {
        "volume": "100",//Trade quantity.
        "side": "BUY",//The direction of the active order.
        "buyFeeCoin": "btc",//The currency in which the buyer pays the transaction fee.
        "price": "0.1",//The price at which the transaction was executed.
        "buyFee": "0.001",//The transaction fee incurred for the buy order.
        "ctime": 112334212321,//The timestamp indicating the creation time of the transaction.
        "sellFeeCoin": "usdt",//The currency in which the transaction fee is paid for the sell order.
        "id": 12321,
        "sellFee": "0.001",//The transaction fee for the sell order.
        "bid_id": 33000003300001,//The ID of the buy order.
        "ask_id": 33000013300001,//The ID of the sell order.
        "bid_user_id": -230000,//The ID of the buyer user.
        "ask_user_id": 230000//The ID of the seller user.
      },
      {
        "volume": "100",
        "side": "BUY",
        "buyFeeCoin": "btc",
        "price": "0.1",
        "buyFee": "0.001",
        "ctime": 112334212321,
        "sellFeeCoin": "usdt",
        "id": 12321,
        "sellFee": "0.001",
        "bid_id": 33000003300001,
        "ask_id": 33000013300001,
        "bid_user_id": -230000,
        "ask_user_id": 230000
      },
      {
        "volume": "100",
        "side": "BUY",
        "buyFeeCoin": "btc",
        "price": "0.1",
        "buyFee": "0.001",
        "ctime": 112334212321,
        "sellFeeCoin": "usdt",
        "id": 12321,
        "sellFee": "0.001",
        "bid_id": 33000003300001,
        "ask_id": 33000013300001,
        "bid_user_id": -230000,
        "ask_user_id": 230000
      },
      {
        "volume": "100",
        "side": "BUY",
        "buyFeeCoin": "btc",
        "price": "0.1",
        "buyFee": "0.001",
        "ctime": 112334212321,
        "sellFeeCoin": "usdt",
        "id": 12321,
        "sellFee": "0.001",
        "bid_id": 33000003300001,
        "ask_id": 33000013300001,
        "bid_user_id": -230000,
        "ask_user_id": 230000
      }
    ]
}

```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>symbol</td><td>String</td><td>YES</td><td>btcusdt</td><td>symbol</td></tr><tr><td>startDate</td><td>String</td><td>YES</td><td>2099-01-01 00:00:00</td><td>Start time, in seconds with the format "yyyy-MM-dd HH:mm:ss".</td></tr><tr><td>endDate</td><td>String</td><td>YES</td><td>2099-01-01 00:00:00</td><td>End time, in seconds with the format "yyyy-MM-dd HH:mm:ss".</td></tr><tr><td>pageSize</td><td>String</td><td>NO</td><td>20</td><td>Default 1000 entries.</td></tr><tr><td>page</td><td>String</td><td>NO</td><td>1</td><td>The page number, defaulting to 1 for the first page.</td></tr><tr><td>sort</td><td>String</td><td>NO</td><td></td><td>1 indicates descending order.</td></tr></tbody></table>

## Coin-to-Coin Order Record

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/record/orderList`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| app\_id<mark style="color:red;">\*</mark> | String |             |
| time                                      | String |             |
| sign                                      | String |             |
| data                                      | String |             |

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

```javascript
{
    "code": "", //Return code	
    "msg": "", //Success or failure message	
    "data": "",
    "sign": ""
}

code:
{
    "count": 1233,
    "list": [
      {
        "volume": 1123,//Order Quantity
        "symbol": "consectetur veni",//Trading Pair
        "dealVolume": 123412,//Filled Quantity
        "orderId": 123123,//Order ID
        "totalPrice": 0.201,//Limit order amount
        "price": 12341,//Limit order price
        "ctime": "ctime",//Order placement time
        "type": "limit",//limit = limit order, market = market order
        "orderSide": "buy",//SELL,BUY
        "dealMoney": 1,//filled amount
        "status": "0"//init = Initialized order, new = New order, filled = Fully filled order, part filled = Partially filled order, canceled = Canceled order, pending cancel = Pending cancel order, expired = Expired order
      },
      {
        "volume": 1123,//Order Quantity
        "symbol": "consectetur veni",//Trading Pair
        "dealVolume": 123412,//Filled Quantity
        "orderId": 123123,//Order ID
        "totalPrice": 0.201,//Limit order amount
        "price": 12341,//Limit order price
        "ctime": "ctime",//Order placement time
        "type": "limit",//limit = limit order, market = market order
        "orderSide": "buy",//SELL,BUY
        "dealMoney": 1,//filled amount
        "status": "0"//init = Initialized order, new = New order, filled = Fully filled order, part filled = Partially filled order, canceled = Canceled order, pending cancel = Pending cancel order, expired = Expired order
      {
        "volume": 1123,//Order Quantity
        "symbol": "consectetur veni",//Trading Pair
        "dealVolume": 123412,//Filled Quantity
        "orderId": 123123,//Order ID
        "totalPrice": 0.201,//Limit order amount
        "price": 12341,//Limit order price
        "ctime": "ctime",//Order placement time
        "type": "limit",//limit = limit order, market = market order
        "orderSide": "buy",//SELL,BUY
        "dealMoney": 1,//filled amount
        "status": "0"//init = Initialized order, new = New order, filled = Fully filled order, part filled = Partially filled order, canceled = Canceled order, pending cancel = Pending cancel order, expired = Expired order
      }
    ]
}
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>symbol</td><td>String</td><td>YES</td><td>btcusdt</td><td>symbol</td></tr><tr><td>uid</td><td>String</td><td>YES</td><td>23000</td><td>User id</td></tr><tr><td>startDate</td><td>String</td><td>YES</td><td>2099-01-01 00:00:00</td><td>Start time, in seconds with the format "yyyy-MM-dd HH:mm:ss".</td></tr><tr><td>endDate</td><td>String</td><td>YES</td><td>2099-01-01 00:00:00</td><td>End time, in seconds with the format "yyyy-MM-dd HH:mm:ss".</td></tr><tr><td>pageSize</td><td>String</td><td>NO</td><td>20</td><td>Default 1000 entries.</td></tr><tr><td>pageNumber</td><td>String</td><td>NO</td><td>1</td><td>The page number, defaulting to 1 for the first page.</td></tr></tbody></table>


---

# 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://platformv2docs.chainup.com/english-3/user-trade-query.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.
