# 资金流水

`GET` `/v1/asset/cashflow`

该接口用于获取资金流入/流出方向、资金类别、资金金额、发生时间、关联股票代码和资金流水说明信息。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `start_time` | string | Yes | 开始时间，时间戳，以 `秒` 为单位，例如：`1650037563` |
| `end_time` | string | Yes | 结束时间，时间戳，以 `秒` 为单位，例如：`1650747581` |
| `business_type` | string | No | 资金类型。<b>可选值:</b>, `1` - 现金，`2` - 股票，`3` - 基金 |
| `symbol` | string | No | 标的代码，例如：`AAPL.US` |
| `page` | string | No | 起始页。<b>默认值:</b> `1`, <b>数据校验规则:</b>, <b>取值范围:</b> `>=1` |
| `size` | string | No | 每页大小。<b>默认值:</b> `50`, <b>数据校验规则:</b> `1~10000` |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/asset/cashflow?start_time=<start_time>&end_time=<end_time>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `list` | object[] | No | 流水信息 |
| `└ transaction_flow_name` | string | Yes | 流水名称 |
| `└ direction` | string | Yes | 流出方向。<b>可选值:</b>, `1` - 流出，`2` - 流入 |
| `└ business_type` | string | Yes | 资金类别。<b>可选值:</b>, `1` - 现金，`2` - 股票，`3` - 基金 |
| `└ balance` | string | Yes | 资金金额 |
| `└ currency` | string | Yes | 资金币种 |
| `└ business_time` | string | Yes | 业务时间 |
| `└ symbol` | string | No | 关联股票代码信息 |
| `└ description` | string | No | 资金流水说明 |

### Response JSON Example

```json
{
  "code": 0,
  "data": {
    "list": [
      {
        "transaction_flow_name": "BuyContract-Stocks",
        "direction": 1,
        "balance": "-248.60",
        "currency": "USD",
        "business_time": "1621507957",
        "symbol": "AAPL.US",
        "description": "AAPL"
      },
      {
        "transaction_flow_name": "BuyContract-Stocks",
        "direction": 1,
        "balance": "-125.16",
        "currency": "USD",
        "business_time": "1621504824",
        "symbol": "AAPL.US",
        "description": "AAPL"
      }
    ]
  }
}
```
