# Cash Flow

`GET` `/v1/asset/cashflow`

The API is used to obtain capital inflow/outflow direction, capital type, capital amount, occurrence time,
associated stock code and capital flow description information.

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `start_time` | string | Yes | start time timestamp, in `seconds`, E.g:`1650037563` |
| `end_time` | string | Yes | end time timestamp, in `seconds`, E.g:`1650747581` |
| `business_type` | string | No | Balance type. <b>Option:</b>, `1` - cash, `2` - stock, `3` - fund |
| `symbol` | string | No | Target code, E.g:`AAPL.US` |
| `page` | string | No | start page. <b>Default value:</b> `1`, <b>Data validation rules:</b>, <b>Ranges:</b> `>=1` |
| `size` | string | No | page size. <b>Default value:</b> `50`, <b>Data validation rules:</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 | Cash flow info |
| `└ transaction_flow_name` | string | Yes | Cash flow name |
| `└ direction` | string | Yes | outflow direction. <b>Option:</b>, `1` - outflow, `2` - inflow |
| `└ business_type` | string | Yes | Funding Category. <b>Option:</b>, `1` - cash, `2` - stock, `3` - fund |
| `└ balance` | string | Yes | Cash amount |
| `└ currency` | string | Yes | Cash Currency |
| `└ business_time` | string | Yes | business time |
| `└ symbol` | string | No | associated Stock code information |
| `└ description` | string | No | Cash flow description |

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