# 获取代理的直客交易与资金统计

**HTTP request** 获取直客交易与资金统计 (代理账户)

- **GET** ```/api/v3/rebate/affiliate/getChannelUserTradeAndAsset```

权重(IP): 20


<div class='api-content-wrap'>
<div>

<strong>请求参数</strong>

| 参数名         | 参数类型    | 是否必须  | 描述           |
|:------------|:--------|:------|:-------------|
| uid         | Long    | 否     | 被邀请用户的UID    |
| startTime   | Long    | 否     | 开始时间戳(UTC毫秒) |
| endTime     | Long    | 否     | 结束时间戳(UTC毫秒) |
| page        | Integer | 否     | 页码(从1开始，默认1) |
| pageSize    | Integer | 否     | 每页数量(默认100)  |

- 结束时间必须晚于开始时间。
- 单次查询的时间跨度最长为连续90天。
- 开始时间需落在最近365天内，若未指定则系统默认查询最近90天。
</div> 
<div class='api-align'>
  <div class='code-wrap'>
<strong>请求示例</strong>

```powershell
curl "https://api-spot.weex.com/api/v3/rebate/affiliate/getChannelUserTradeAndAsset" \
   -H "ACCESS-KEY:*******" \
   -H "ACCESS-SIGN:*******" \
   -H "ACCESS-PASSPHRASE:*****" \
   -H "ACCESS-TIMESTAMP:1659076670000" \
   -H "Content-Type: application/json"
```

  </div>
  </div> 

</div>

<div class='api-content-wrap'>
  <div>
<strong>返回参数</strong>

| 字段名                  | 类型      | 字段说明     |
|:---------------------|:--------|:---------|
| uid                  | String  | 被邀请用户UID |
| depositAmount        | String  | 入金量      |
| withdrawalAmount     | String  | 出金量      |
| spotTradingAmount    | String  | 现货交易量    |
| futuresTradingAmount | String  | 合约交易量    |
| commission           | String  | 佣金       |
| records              | Array   | 统计记录列表  |
| pages                | Integer | 总页数     |
| pageSize             | Integer | 每页数量    |
| total                | Long    | 总记录数    |

  </div>
  <div class='api-align'>

  <div class='code-wrap'>
<strong>返回示例</strong>

```json
{
  "pages": 1,
  "pageSize": 100,
  "total": 98,
  "records": [
    {
      "uid": "3066862172",
      "depositAmount": "0",
      "withdrawalAmount": "0",
      "spotTradingAmount": "0",
      "futuresTradingAmount": "0",
      "commission": "0"
    }
  ]
}
```
  </div>
    </div> 
</div>
