diff --git a/docs/.vitepress/theme/components/FeaturesMenu.vue b/docs/.vitepress/theme/components/FeaturesMenu.vue index d4802782..5336cfeb 100644 --- a/docs/.vitepress/theme/components/FeaturesMenu.vue +++ b/docs/.vitepress/theme/components/FeaturesMenu.vue @@ -29,50 +29,50 @@ const i18n: Record = { { title: 'Live Market Quotes', desc: 'Live prices & order book depth for global markets', - link: '/docs/cli/market-data/quote', + link: '/docs/quote/pull/quote', icon: icons.quote, }, { title: 'Price History', desc: 'OHLCV candlestick & intraday historical data', - link: '/docs/cli/market-data/kline', + link: '/docs/quote/pull/history-candlestick', icon: icons.kline, }, { title: 'Financial Statements', desc: 'Earnings, balance sheet & cash flow data', - link: '/docs/cli/fundamentals/financial-report', + link: '/docs/fundamental/fundamental/financial-report', icon: icons.report, }, { title: 'Analyst Estimates', desc: 'Consensus forecasts & institutional ratings', - link: '/docs/cli/fundamentals/consensus', + link: '/docs/fundamental/fundamental/consensus', icon: icons.consensus, }, - { title: 'Company News', desc: 'Breaking news & market updates', link: '/docs/cli/content/news', icon: icons.news }, + { title: 'Company News', desc: 'Breaking news & market updates', link: '/docs/content/news/news', icon: icons.news }, { title: 'SEC Filings', desc: 'Annual reports, earnings & regulatory documents', - link: '/docs/cli/content/filing', + link: '/docs/quote/pull/filings', icon: icons.filing, }, { title: 'Institutional', desc: 'Fund holdings & position changes', - link: '/docs/cli/research/investors', + link: '/docs/fundamental/fundamental/fund-holdings', icon: icons.investors, }, { title: 'Options & Warrants', desc: 'Derivatives pricing, chain & screening data', - link: '/docs/cli/derivatives/option', + link: '/docs/quote/pull/option-quote', icon: icons.option, }, { title: 'Order Execution', desc: 'Trade orders, portfolio & account management', - link: '/docs/cli/orders/order', + link: '/docs/trade/trade-overview', icon: icons.order, }, ], @@ -80,73 +80,73 @@ const i18n: Record = { { title: '实时行情报价', desc: '全球市场实时价格与盘口深度数据', - link: '/docs/cli/market-data/quote', + link: '/docs/quote/pull/quote', icon: icons.quote, }, - { title: '历史价格', desc: 'OHLCV K 线与日内历史行情数据', link: '/docs/cli/market-data/kline', icon: icons.kline }, + { title: '历史价格', desc: 'OHLCV K 线与日内历史行情数据', link: '/docs/quote/pull/history-candlestick', icon: icons.kline }, { title: '财务报表', desc: '盈利、资产负债表与现金流量数据', - link: '/docs/cli/fundamentals/financial-report', + link: '/docs/fundamental/fundamental/financial-report', icon: icons.report, }, { title: '分析师预测', desc: '机构评级与一致性盈利预期数据', - link: '/docs/cli/fundamentals/consensus', + link: '/docs/fundamental/fundamental/consensus', icon: icons.consensus, }, - { title: '公司新闻', desc: '实时财经资讯与市场动态', link: '/docs/cli/content/news', icon: icons.news }, - { title: '年报公告', desc: '年报、季报及监管申报文件', link: '/docs/cli/content/filing', icon: icons.filing }, + { title: '公司新闻', desc: '实时财经资讯与市场动态', link: '/docs/content/news/news', icon: icons.news }, + { title: '年报公告', desc: '年报、季报及监管申报文件', link: '/docs/quote/pull/filings', icon: icons.filing }, { title: '机构持仓', desc: '基金持仓明细与仓位变动数据', - link: '/docs/cli/research/investors', + link: '/docs/fundamental/fundamental/fund-holdings', icon: icons.investors, }, { title: '期权与权证', desc: '衍生品定价、期权链与筛选数据', - link: '/docs/cli/derivatives/option', + link: '/docs/quote/pull/option-quote', icon: icons.option, }, - { title: '委托交易', desc: '交易委托、组合管理与账户操作', link: '/docs/cli/orders/order', icon: icons.order }, + { title: '委托交易', desc: '交易委托、组合管理与账户操作', link: '/docs/trade/trade-overview', icon: icons.order }, ], 'zh-HK': [ { title: '實時行情報價', desc: '全球市場實時價格與盤口深度數據', - link: '/docs/cli/market-data/quote', + link: '/docs/quote/pull/quote', icon: icons.quote, }, - { title: '歷史價格', desc: 'OHLCV K 線與日內歷史行情數據', link: '/docs/cli/market-data/kline', icon: icons.kline }, + { title: '歷史價格', desc: 'OHLCV K 線與日內歷史行情數據', link: '/docs/quote/pull/history-candlestick', icon: icons.kline }, { title: '財務報表', desc: '盈利、資產負債表與現金流量數據', - link: '/docs/cli/fundamentals/financial-report', + link: '/docs/fundamental/fundamental/financial-report', icon: icons.report, }, { title: '分析師預測', desc: '機構評級與一致性盈利預期數據', - link: '/docs/cli/fundamentals/consensus', + link: '/docs/fundamental/fundamental/consensus', icon: icons.consensus, }, - { title: '公司新聞', desc: '實時財經資訊與市場動態', link: '/docs/cli/content/news', icon: icons.news }, - { title: '年報財報', desc: '年報、季報及監管申報文件', link: '/docs/cli/content/filing', icon: icons.filing }, + { title: '公司新聞', desc: '實時財經資訊與市場動態', link: '/docs/content/news/news', icon: icons.news }, + { title: '年報財報', desc: '年報、季報及監管申報文件', link: '/docs/quote/pull/filings', icon: icons.filing }, { title: '機構持倉', desc: '基金持倉明細與倉位變動數據', - link: '/docs/cli/research/investors', + link: '/docs/fundamental/fundamental/fund-holdings', icon: icons.investors, }, { title: '期權與認股證', desc: '衍生品定價、期權鏈與篩選數據', - link: '/docs/cli/derivatives/option', + link: '/docs/quote/pull/option-quote', icon: icons.option, }, - { title: '委託交易', desc: '交易委託、組合管理與賬戶操作', link: '/docs/cli/orders/order', icon: icons.order }, + { title: '委託交易', desc: '交易委託、組合管理與賬戶操作', link: '/docs/trade/trade-overview', icon: icons.order }, ], } diff --git a/docs/en/docs/cli/orders/order.md b/docs/en/docs/cli/orders/order.md index 599304f1..8e5f626a 100644 --- a/docs/en/docs/cli/orders/order.md +++ b/docs/en/docs/cli/orders/order.md @@ -56,6 +56,25 @@ longbridge order sell TSLA.US 5 --price 360.00 Places a limit sell order for 5 shares of TSLA at $360.00. The command prompts for confirmation before submitting. +### Short sell (no existing position) + +```bash +longbridge order sell META.US 1 --price 620.00 +``` + +Submitting a sell order for a symbol with no existing position opens a short. No special flags are required. To close the short, submit a buy order for the same symbol and quantity. + +**Market support:** + +US and HK markets must each be activated separately. For each market: + +1. Open the Longbridge mobile app and place your first short sell order for that market — the app will trigger a Securities Borrowing and Lending (SBL) agreement signing flow. +2. Complete the signing, then wait for the review to be approved. + +Once approved, the CLI, API, and MCP can short stocks in that market directly. The API returns error `602301` before the agreement is signed. + +A-share (SH/SZ) short selling is not supported — the CLI does not support Northbound (Stock Connect) trading. + ### View trade executions ```bash diff --git a/docs/en/docs/quote/options/option-quote.md b/docs/en/docs/quote/options/option-quote.md index a0ad2d69..ccd1b9ce 100644 --- a/docs/en/docs/quote/options/option-quote.md +++ b/docs/en/docs/quote/options/option-quote.md @@ -1,6 +1,6 @@ --- id: quote_option_quote -title: Quotes +title: Option Quotes slug: /quote/pull/option-quote sidebar_position: 3 --- diff --git a/docs/zh-CN/docs/cli/orders/order.md b/docs/zh-CN/docs/cli/orders/order.md index c9dd0062..a1b91d7f 100644 --- a/docs/zh-CN/docs/cli/orders/order.md +++ b/docs/zh-CN/docs/cli/orders/order.md @@ -56,6 +56,25 @@ longbridge order sell TSLA.US 5 --price 360.00 以 360.00 美元的价格对 TSLA 提交 5 股限价卖出委托。命令在提交前会提示确认。 +### 卖空(无持仓做空) + +```bash +longbridge order sell META.US 1 --price 620.00 +``` + +对没有持仓的标的提交卖出委托即可开空,无需任何额外参数。平仓时对相同标的和数量提交买入委托即可。 + +**市场支持情况:** + +美股和港股需要各自单独激活,每个市场的流程如下: + +1. 在 Longbridge 手机客户端发起该市场的首笔卖空委托,下单过程中会触发「证券借贷协议(SBL)」签署流程。 +2. 完成签署后等待审核通过。 + +审核通过后,CLI、API 和 MCP 即可直接在该市场卖空。未签署协议时 API 返回错误 `602301`。 + +A 股(SH/SZ)暂不支持卖空,CLI 不支持北向通(沪深港通)交易。 + ### 查看成交记录 ```bash diff --git a/docs/zh-CN/docs/quote/options/option-quote.md b/docs/zh-CN/docs/quote/options/option-quote.md index 22c5918f..3ce4d980 100644 --- a/docs/zh-CN/docs/quote/options/option-quote.md +++ b/docs/zh-CN/docs/quote/options/option-quote.md @@ -1,6 +1,6 @@ --- id: quote_option_quote -title: 实时报价 +title: 期权实时报价 slug: /quote/pull/option-quote sidebar_position: 3 --- diff --git a/docs/zh-HK/docs/cli/orders/order.md b/docs/zh-HK/docs/cli/orders/order.md index 373a25ca..1df04f85 100644 --- a/docs/zh-HK/docs/cli/orders/order.md +++ b/docs/zh-HK/docs/cli/orders/order.md @@ -56,6 +56,25 @@ longbridge order sell TSLA.US 5 --price 360.00 以 360.00 美元的價格對 TSLA 提交 5 股限價賣出委託。命令在提交前會提示確認。 +### 賣空(無持倉做空) + +```bash +longbridge order sell META.US 1 --price 620.00 +``` + +對沒有持倉的標的提交賣出委託即可開空,無需任何額外參數。平倉時對相同標的和數量提交買入委託即可。 + +**市場支援情況:** + +美股和港股需要各自單獨啟用,每個市場的流程如下: + +1. 在 Longbridge 手機客戶端發起該市場的首筆賣空委託,下單過程中會觸發「證券借貸協議(SBL)」簽署流程。 +2. 完成簽署後等待審核通過。 + +審核通過後,CLI、API 和 MCP 即可直接在該市場賣空。未簽署協議時 API 返回錯誤 `602301`。 + +A 股(SH/SZ)暫不支援賣空,CLI 不支援北向通(滬深港通)交易。 + ### 查看成交記錄 ```bash diff --git a/docs/zh-HK/docs/quote/options/option-quote.md b/docs/zh-HK/docs/quote/options/option-quote.md index 41d4c366..a65de612 100644 --- a/docs/zh-HK/docs/quote/options/option-quote.md +++ b/docs/zh-HK/docs/quote/options/option-quote.md @@ -1,6 +1,6 @@ --- id: quote_option_quote -title: 實時報價 +title: 期權實時報價 slug: /quote/pull/option-quote sidebar_position: 3 --- diff --git a/skills/longbridge/references/cli/overview.md b/skills/longbridge/references/cli/overview.md index 37961b2e..79241e95 100644 --- a/skills/longbridge/references/cli/overview.md +++ b/skills/longbridge/references/cli/overview.md @@ -121,6 +121,28 @@ longbridge filing detail TSLA.US 610186794100660481 --file-index 0 - **`quote`**: always returns `pre_market_quote` / `post_market_quote` / `overnight_quote` when available (US only). Table format appends an "Extended Hours" section; JSON includes them as nested objects. - **`intraday` / `kline` / `kline history`**: default to intraday session only; pass `--session all` to include pre/post-market data. `kline`/`kline history` add a **Session** column when `--session all` is used. +## Short Selling + +Submitting a sell order for a symbol with no existing position opens a short position. No special flags are required — `order sell` handles both regular sells and short sells. + +```bash +longbridge order sell META.US 1 --price 620.00 # short sell (no position held) +longbridge order sell TSLA.US 10 --price 300.00 # regular sell (closes long position) +``` + +**Market support:** + +US and HK markets must each be activated separately. For each market: + +1. Open the Longbridge mobile app and place your first short sell order for that market — the app will trigger a Securities Borrowing and Lending (SBL) agreement signing flow. +2. Complete the signing, then wait for the review to be approved. + +Once approved, the CLI, API, and MCP can short stocks in that market directly. The API returns error `602301` before the agreement is signed. + +A-share (SH/SZ) short selling is not supported — the CLI does not support Northbound (Stock Connect) trading. + +To close a short position, submit a buy order for the same symbol and quantity. + ## Rate Limits - Max **10 API calls/second**