> For the complete documentation index, see [llms.txt](https://platformv2docs.chainup.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platformv2docs.chainup.com/he-yue-jiao-yi.md).

# 合约交易

## 合约手续费查询

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

需要将参数表格中的数据包装成json字符串 利用rsa 进行参数加密和签名 作为body中的data和sign

#### Headers

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

#### Request Body

| Name                                      | Type   | Description                  |
| ----------------------------------------- | ------ | ---------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | 商家唯一编号                       |
| sign<mark style="color:red;">\*</mark>    | String | 用rsa\_third\_pri对query中的数据签名 |
| data<mark style="color:red;">\*</mark>    | String | rsa\_saas\_pub加密query中数据     |
| time<mark style="color:red;">\*</mark>    | String | 请求时间                         |

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

```javascript
{
    "code": "", //返回code	
    "msg": "", //成功或失败提示信息	
    "data": "",
    "sign": ""
}

data 中解密后的结构体

{
  "count": "20",
  "list": [
    {
      "itemDate": 10008902123,//日期，时间戳格式，精确到秒
      "uid": "20300021",//用户id
      "coin": "btc",//币种
      "tradeAmount": "2000",//交易额
      "feeAmount": "1"//手续费
    }
  ]
}
```

{% endtab %}
{% endtabs %}

以下为参与rsa加密的参数:

<table><thead><tr><th width="136">名称</th><th width="124">类型</th><th>是否必需</th><th width="214">例子</th><th>描述</th></tr></thead><tbody><tr><td>startDate</td><td>String</td><td>YES</td><td>200001</td><td>开始日期，精确到天，时间戳精确到秒</td></tr><tr><td>endDate</td><td>String</td><td>YES</td><td>xxxxx@.com</td><td>结束日期，精确到天，时间戳精确到秒</td></tr><tr><td>page</td><td>String</td><td>NO</td><td>1</td><td>页码 默认1</td></tr><tr><td>pageSize</td><td>String</td><td>NO</td><td>10</td><td>每页条数,默认100</td></tr></tbody></table>

## 合约经纪人角色查询

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

需要将参数表格中的数据包装成json字符串 利用rsa 进行参数加密和签名 作为body中的data和sign

#### Headers

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

#### Request Body

| Name                                      | Type   | Description                  |
| ----------------------------------------- | ------ | ---------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | 商家唯一编号                       |
| sign<mark style="color:red;">\*</mark>    | String | 用rsa\_third\_pri对query中的数据签名 |
| data<mark style="color:red;">\*</mark>    | String | rsa\_saas\_pub加密query中数据     |
| time<mark style="color:red;">\*</mark>    | String | 请求时间                         |

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

```javascript
{
    "code": "", //返回code	
    "msg": "", //成功或失败提示信息	
    "data": "",
    "sign": ""
}

data 中解密后的结构体

{
  "count": "sed in ipsum",
  "list": [
    {
      "itemDate": 10008902123,//日期，时间戳格式，精确到秒
      "uid": "20300021",//用户id
      "coin": "btc",//币种
      "tradeAmount": "2000",//交易额
      "feeAmount": "1"//手续费
    }
  ]
}
```

{% endtab %}
{% endtabs %}

以下为参与rsa加密的参数:

<table><thead><tr><th width="136">名称</th><th width="124">类型</th><th>是否必需</th><th width="214">例子</th><th>描述</th></tr></thead><tbody><tr><td>startDate</td><td>String</td><td>YES</td><td>200001</td><td>开始日期，精确到天，时间戳精确到秒</td></tr><tr><td>endDate</td><td>String</td><td>YES</td><td>xxxxx@.com</td><td>结束日期，精确到天，时间戳精确到秒</td></tr><tr><td>page</td><td>String</td><td>NO</td><td>1</td><td>页码 默认1</td></tr><tr><td>pageSize</td><td>String</td><td>NO</td><td>10</td><td>每页条数,默认100</td></tr></tbody></table>
