# 預估最大購買數量

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