# 資金流水

`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"
      }
    ]
  }
}
```
