可卖空
适用市场
| 市场 | 品种 |
|---|---|
| 香港市场 | 股票、期权、窝轮、牛熊证、界内证、ETFs |
| 美国市场 | 股票、期权、ETFs |
max_qty_to_sell_short
接口说明
卖空指定标的的最大可卖空数量。
注意:不同订单类型、不同的价格,对应的可卖空数量可能会不同。
max_qty_to_sell_short(symbol, order_type=OrdType.LMT, price=0, order_trade_session_type=TSType.ETH)
每 30 秒最多请求 40 次可卖空。
美股夜盘暂不支持卖空。
参数
| 参数名 | 类型 | 说明 | 默认值 | 范围 |
|---|---|---|---|---|
| symbol | Contract | 标的 | -- | -- |
| order_type | OrdType | 订单类型 | OrdType.LMT | -- |
| price | float | 价格 | 0 | -- |
| order_trade_session_type | TSType | 交易时段(仅对美股市场生效) | TSType.ETH | -- |
返回
返回类型: float
示例说明
获取以市价单卖空苹果的可卖空数量。
max_qty_to_sell_short(symbol=Contract("US.AAPL"), order_type=OrdType.MKT, order_trade_session_type=TSType.RTH)
示例返回值
1000