# 预估最大购买数量

`GET` `/v1/trade/estimate/buy_limit`

该接口用于港美股，窝轮，期权的预估最大购买数量。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 股票代码，使用 `ticker.region` 格式，例如：`AAPL.US` |
| `order_type` | string | Yes | 订单类型。可选值：`LO`、`ELO`、`MO`、`AO`、`ALO`、`ODD`、`LIT`、`MIT`、`TSLPAMT`、`TSLPPCT`、`SLO`。 |
| `price` | string | No | 预估下单价格，例如：`388.5` |
| `side` | string | Yes | 买卖方向。**可选值：**, `Buy` - 买入，`Sell` - 卖出 卖出只支持美股卖空查询 |
| `currency` | string | No | 结算货币 |
| `order_id` | string | No | 订单 ID，获取改单预估最大购买数量时必填 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/trade/estimate/buy_limit?symbol=<symbol>&order_type=<order_type>&side=<side>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `cash_max_qty` | string | Yes | 现金可买数量，默认为空字符串 |
| `margin_max_qty` | string | Yes | 融资可买数量，默认为空字符串 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "cash_max_qty": "100",
    "margin_max_qty": "100"
  }
}
```
