> ## Documentation Index
> Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询合约资金流水 (KEYED)

`适用于查询合约资金流水记录`

#### 请求URL

`GET https://cloud-api.wooxpro.com/contract/private/transaction-history`

#### 请求限制

参见 [速率限制详细](/cn/rate-limit)

#### 请求参数

> 请求

```shell theme={null}
curl -H 'X-API-KEY:{{AccessKey}}'
https://cloud-api.wooxpro.com/contract/private/transaction-history?symbol=BTCUSDT&start_time=1662368173000&end_time=1662368179000
```

| 参数          | 类型     | 是否必填 | 描述                                                                                                                    |
| :---------- | :----- | :--- | :-------------------------------------------------------------------------------------------------------------------- |
| symbol      | String | 选填   | 交易对                                                                                                                   |
| flow\_type  | Int    | 选填   | 类型 <br />- `0` = 全部(默认) <br />- `1` = 划转 <br />- `2` = 已实现盈亏 <br />- `3` = 资金费用 <br />- `4` = 手续费 <br />- `5` = 强平清算费 |
| account     | String | 选填   | 交易用户<br />-`futures`=合约主账号<br />-`copy_trading`=跟单子账号                                                                 |
| start\_time | Long   | 选填   | 开始时间(时间戳，精确到毫秒)                                                                                                       |
| end\_time   | Long   | 选填   | 结束时间(时间戳，精确到毫秒)                                                                                                       |
| page\_size  | Int    | 选填   | 每页返回的记录数，默认100，最大1000                                                                                                 |

##### 注意

* 如果`start_time` 和 `end_time` 均未发送, 只会返回最近7天的数据。
* 如果`type`没有发送，返回所有类型账户损益资金流水。

#### 响应详情

> 响应

```json theme={null}
{
  "code": 1000,
  "message": "Ok",
  "data": [
    {
      "symbol": "",
      "type": "Transfer",
      "amount": "-0.37500000",
      "asset": "USDT",
      "account": "futures",
      "time": "1570608000000",
      "tran_id": "9689322392"
    },
    {
      "symbol": "BTCUSDT",
      "type": "Commission Fee",
      "amount": "-0.01000000",
      "asset": "USDT",
      "account": "futures",
      "time": "1570636800000",
      "tran_id": "9689322392"
    }
  ],
  "trace": "80ba1f07-1b6f-46ad-81dd-78ac7e9bbccd"
}
```

| 字段         | 类型     | 描述                                                                                                                          |
| :--------- | :----- | :-------------------------------------------------------------------------------------------------------------------------- |
| symbol     | String | 交易对                                                                                                                         |
| flow\_type | Int    | 类型 <br />- `0` = 全部(默认) <br />- `1` = 划转 <br />- `2` = 已实现盈亏 <br />- `3` = 资金费用 <br />- `4` = 手续费 <br />- `5` = 强平清算费       |
| type       | STRING | 类型 <br />- `Transfer` <br />- `Realized PNL` <br />- `Funding Fee` <br />- `Commission Fee` <br />- `Liquidation Clearance` |
| account    | String | 交易用户<br />-`futures`=合约主账号<br />-`copy_trading`=跟单子账号                                                                       |
| amount     | String | 金额，支持正负号                                                                                                                    |
| asset      | String | 资金流水币种                                                                                                                      |
| time       | String | 交易时间戳(ms)                                                                                                                   |
| tran\_id   | String | 交易ID                                                                                                                        |
