Longbridge MCP 服務
Longbridge 提供託管的 MCP(Model Context Protocol)服務,讓你在 ChatGPT、AI 編程助手或其他對話工具中直接使用 Longbridge 的行情與帳戶能力,無需手動管理 API 金鑰。
MCP 服務地址
- 全球:
https://mcp.longbridge.com - 中國大陸:
https://mcp.longbridge.cn(訪問更快)
美國賬戶請使用全球地址 —— .cn 沒有通往美國數據中心的鏈路,僅服務 AP 賬戶(新加坡 / 香港)。詳見接入點與數據中心。
可用能力
Longbridge MCP 暴露 160+ 工具,覆蓋六大能力域,客戶端連接後會自動發現——無需手動配置。
| 能力 | 覆蓋範圍 |
|---|---|
| 即時行情 | 報價、K 線、深度、經紀隊列、逐筆、分時資金流 |
| 基本面與研究 | 公司資料、派息、估值、高管持倉、A/H 溢價、宏觀經濟指標 |
| 衍生品 | 期權鏈、窩輪篩選、發行商、窩輪報價 |
| 賬戶與組合 | 餘額、持倉、資金流水、自選股及分組 |
| 交易 | 下單、改單、撤單、可買量估算 |
| 自動化 | 股價提醒、定投(DCA)計劃 |
實際可用工具因地區、帳戶等級與 OAuth 授權範圍而異。
可用工具
Get account cash balance and asset summary. Returns balances[]{currency, total_cash, max_finance_amount, remaining_finance_amount, risk_level, margin_call}. Filter by currency (e.g. "USD", "HKD").
參數
currencystringFilter by currency code (e.g. "USD", "HKD"). Omit to return all currencies.
Get A/H share premium historical K-line data. Returns items[]{timestamp, open, high, low, close} representing the premium percentage over the given period.
參數
symbolstring必填Security symbol, e.g. "700.HK"
periodstringK-line period: "1m", "5m", "15m", "30m", "60m", "day" (default), "week", "month", "year"
countintegerNumber of K-lines to return (default: 100)
Get A/H share premium intraday time-share data. Returns items[]{timestamp, premium_rate} showing the intraday A/H premium percentage minute by minute.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Add a price alert. condition: price_rise/price_fall (absolute price) or percent_rise/percent_fall (relative %). frequency: once/daily/every. Returns created alert object.
參數
symbolstring必填Security symbol, e.g. "700.HK"
conditionstring必填Alert condition: "price_rise", "price_fall", "percent_rise", "percent_fall"
pricestring必填Threshold price or percentage value
frequencystringAlert frequency: "once" (trigger once then disable), "daily" (once per day), "every" (alert every time condition is met)
Delete a price alert by alert_id (numeric string from alert_list). Returns upstream API response on success; errors if alert_id is invalid.
參數
alert_idstring必填Alert indicator id
Disable a price alert by alert_id. Use alert_list to find the numeric alert_id.
參數
alert_idstring必填Alert indicator id
Enable a price alert by alert_id. Use alert_list to find the numeric alert_id.
參數
alert_idstring必填Alert indicator id
Get all configured price alerts.
無參數。
Get market anomaly alerts (unusual price/volume changes). market: HK/US/CN/SG. symbol: optional, filter to a specific stock. count: results per page (default 50, max 100).
參數
marketstring必填Market code: HK, US, CN, SG
symbolstringFilter to a specific symbol, e.g. "700.HK" or "AAPL.US"
countintegerNumber of results to return (default: 50, max: 100)
Authenticate when you have no Longbridge credentials yet (e.g. your client could not complete the browser OAuth flow). The user generates a one-time authorization code at https://open.longbridge.com/connect and pastes it to you; pass it as `auth_code`. On success the server returns an access token to use as the Bearer credential on subsequent requests, unlocking the full tool set. If you are not authenticated and the user has not provided a code, direct them to https://open.longbridge.com/connect to generate one.
參數
auth_codestring必填One-time OAuth authorization code generated by the user at <https://open.longbridge.com/connect>. Valid for 10 minutes and usable only once.
List linked withdrawal bank cards for the current account. Returns cards[]{id, bank_name, account_number (masked), currency, status}.
無參數。
Get top broker holding data for a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).
參數
symbolstring必填Security symbol, e.g. "700.HK"
periodstringPeriod: "rct_1" (1 day, default), "rct_5" (5 days), "rct_20" (20 days), "rct_60" (60 days)
Get daily holding history for a specific broker (by broker_id) in a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).
參數
symbolstring必填Security symbol, e.g. "700.HK"
broker_idstring必填Broker participant number
Get full broker holding detail list for a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get broker queue (HK stocks only). Map broker IDs to names via participants.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get current-period business segment revenue breakdown for a symbol (name, percent, total, currency)
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
Get historical business segment revenue trends (by period and category).
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
reportstringReport period: "qf" (quarterly), "saf" (semi-annual), "af" (annual)
catestringSegment category filter
Calculate financial indexes for symbols. Pass symbols, and optionally indexes (e.g. ["PeTtmRatio","PbRatio","LastDone","TurnoverRate"]). When indexes is omitted or empty, defaults to ["LastDone","ChangeValue","ChangeRate","Volume","PeTtmRatio","PbRatio","DividendRatioTtm","TurnoverRate","TotalMarketValue"]. Returns per-symbol index values.
參數
symbolsarray必填Security symbols, e.g. ["700.HK", "AAPL.US"]
indexesarrayCalc indexes (optional; defaults to LastDone, ChangeValue, ChangeRate, Volume, PeTtmRatio, PbRatio, DividendRatioTtm, TurnoverRate, TotalMarketValue): LastDone, ChangeValue, ChangeRate, Volume, Turnover, YtdChangeRate, TurnoverRate, TotalMarketValue, CapitalFlow, Amplitude, VolumeRatio, PeTtmRatio, PbRatio, DividendRatioTtm, FiveDayChangeRate, TenDayChangeRate, HalfYearChangeRate, FiveMinutesChangeRate, ExpiryDate, StrikePrice, UpperStrikePrice, LowerStrikePrice, OutstandingQty, OutstandingRatio, Premium, ItmOtm, ImpliedVolatility, WarrantDelta, CallPrice, ToCallPrice, EffectiveLeverage, LeverageRatio, ConversionRatio, BalancePoint, OpenInterest, Delta, Gamma, Theta, Vega, Rho
Cancel an open order by order_id. Returns plain text "order cancelled" on success; errors if the order is already filled or cancelled. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed that exact order. The code is derived from the order itself, so it applies only to that exact order. Never quote it back on your own initiative, and never in the same turn the user first asks. The dry run also echoes the order being targeted so the user can verify it is the right one.
參數
order_idstring必填Order ID to cancel (from today's orders or order history)
executestringThe `confirmation_code` from this order's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed that exact order. The code is single use, expires in 10 minutes, and applies only to this exact order — change any field and it stops working. Never quote it back on your own initiative, and never in the same turn the user first asks.
Get candlestick data (OHLCV). Only symbol is required; period defaults to day, count to 100 (max 1000), forward_adjust to false, trade_sessions to all. period: 1m/5m/15m/30m/60m/day/week/month/year. trade_sessions: intraday/all
參數
symbolstring必填Security symbol, e.g. "700.HK"
periodstringPeriod: 1m, 5m, 15m, 30m, 60m, day, week, month, year (default: day)
countintegerNumber of candlesticks (optional, max 1000; default 100)
forward_adjustbooleanWhether to forward-adjust for splits/dividends (default: false / no adjust)
trade_sessionsstringTrade sessions: "intraday" (regular hours only) or "all" (include pre-market and post-market; default "all")
Get capital distribution for a symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get capital inflow/outflow time series. Returns items[]{timestamp, inflow, outflow, net_flow} for the symbol (same-day data).
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get cash flow records (deposits, withdrawals, dividends). Returns items[]{transaction_type, amount, currency, balance, created_at, remark}. start_at/end_at in RFC3339.
參數
start_atstring必填Start time (RFC3339)
end_atstring必填End time (RFC3339)
Get company overview. US accounts querying a .US symbol get a differently-shaped response not matching output_schema (intro, market_cap, top_rank_tags, sharelist, detail_url); other combinations match output_schema.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get financial consensus estimates for upcoming periods. US accounts querying a .US symbol get a differently-shaped response not matching output_schema (ai_summary plus a details[] list per period); other combinations match output_schema.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get the constituents of an index or the asset allocation of an ETF. For an index (e.g. HSI.HK, .DJI.US) returns constituents[]{symbol, name, last_done, change_rate, market_cap, weight}. For an ETF (e.g. QQQ.US, 2800.HK) returns the asset allocation as info[] grouped by asset_type: 1=Holdings (top constituents with code, symbol, holding_detail), 2=Regional (country/region breakdown), 3=AssetClass (stock/bond/cash etc.), 4=Industry (sector breakdown). Each group has report_date and lists[]{name, position_ratio, name_locales}; Holdings groups additionally include code, symbol and holding_detail{industry_name, index_name, holding_type_name}.
參數
symbolstring必填Index symbol, e.g. "HSI.HK"
Get corporate actions (splits, buybacks, name changes).
參數
symbolstring必填Security symbol, e.g. "700.HK"
Create a new watchlist group. Optionally pass securities (e.g. ["AAPL.US", "700.HK"]) to pre-populate.
參數
namestring必填Group name
securitiesarraySecurities to add, e.g. ["700.HK", "AAPL.US"]
Check whether given symbols support DCA recurring investment.
參數
symbolsarray必填Security symbols to check, e.g. ["AAPL.US", "TSLA.US"]
Create a DCA recurring investment plan. frequency: Daily/Weekly/Monthly. day_of_week (Weekly): Mon/Tue/Wed/Thu/Fri. day_of_month (Monthly): 1-28.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
amountstring必填Amount to invest per cycle, e.g. "100"
frequencystring必填Investment frequency: Daily, Weekly, Monthly
day_of_weekstringDay of week for Weekly frequency: Mon, Tue, Wed, Thu, Fri
day_of_monthintegerDay of month for Monthly frequency (1-28)
allow_marginbooleanAllow margin financing (default false)
Get execution history records for a DCA plan by plan_id.
參數
plan_idstring必填Plan ID
pageintegerPage number (default 1)
limitintegerRecords per page (default 20)
List DCA recurring investment plans. Filter by status (Active/Suspended/Finished) or symbol.
參數
statusstringFilter by status: Active, Suspended, Finished. Omit to return all.
symbolstringFilter by symbol, e.g. "AAPL.US". Omit to return all plans.
pageintegerPage number (default 1)
limitintegerRecords per page (default 20)
Pause (suspend) a DCA plan by plan_id. The plan stops executing until resumed. Returns upstream API response. Use dca_resume to restart.
參數
plan_idstring必填Plan ID
Resume a suspended DCA plan by plan_id. Resumes automated execution on the configured schedule. Returns upstream API response.
參數
plan_idstring必填Plan ID
Get DCA investment statistics.
參數
symbolstringFilter by symbol, e.g. "AAPL.US". Omit to return stats for all plans.
Permanently stop a DCA plan by plan_id. This cannot be undone. To temporarily pause, use dca_pause instead. Returns upstream API response.
參數
plan_idstring必填Plan ID
Update an existing DCA plan by plan_id. Can change amount, frequency (Daily/Weekly/Monthly), day_of_week (Mon-Fri), or day_of_month (1-28). Returns updated plan.
參數
plan_idstring必填Plan ID to update
amountstringNew investment amount per cycle
frequencystringNew investment frequency: Daily, Weekly, Monthly
day_of_weekstringDay of week for Weekly frequency: Mon, Tue, Wed, Thu, Fri
day_of_monthintegerDay of month for Monthly frequency (1-28)
allow_marginbooleanAllow margin financing
Delete a watchlist group by id (numeric). Set purge=true to also remove its securities from all other groups.
參數
idinteger必填Watchlist group id
purgeboolean必填Whether to also remove the securities from other groups
List deposit history for the current account. Returns items[]{id, amount, currency, status, created_at, updated_at}. states: comma-separated (Pending/Finished/Failed). currencies: comma-separated codes.
參數
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
statesstringFilter by deposit states (comma-separated)
currenciesstringFilter by currencies (comma-separated, e.g. "USD,HKD")
Get order book depth for a symbol. Up to 10 price levels.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get dividend history for the symbol. US accounts querying a .US symbol get a differently-shaped response not matching output_schema (dividend_yield_ttm etc. are percent values, e.g. 0.34 means 0.34%); other combinations match output_schema.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get detailed dividend distribution scheme.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Estimate maximum buy/sell quantity for a symbol. Only symbol is required; side (case-insensitive Buy/Sell) defaults to Buy, order_type (case-insensitive) defaults to LO, and price is optional.
參數
symbolstring必填Security symbol, e.g. "700.HK"
sidestringBuy or Sell (case-insensitive; default: Buy)
order_typestringOrder type, case-insensitive (default: LO): LO (Limit Order) / ELO (Enhanced Limit Order) / MO (Market Order) / AO (At-auction) / ALO (At-auction Limit Order)
pricestringLimit price for limit-style orders. Omit for market orders.
Get regulatory/prospectus documents (etf-files) for a US ETF. US accounts only; errors with DcRegionRestricted for HK/CN/SG accounts.
參數
symbolstring必填ETF symbol, e.g. "SPY.US"
limitintegerMaximum number of documents to return. Omit for all.
Get exchange rates for all supported currencies. Returns list[]{from_currency, to_currency, rate, timestamp} covering USD, HKD, CNY, SGD and others.
無參數。
Get company executive and board member information.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get regulatory filings (8-K, 10-Q, 10-K, etc.). Returns items[]{id, title, type, language, filing_date, url} for the symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Finance calendar by category: report (earnings) / dividend / split / ipo / macrodata (CPI, NFP, rates) / closed (holidays). start and end (YYYY-MM-DD) are optional, default today plus 7 days; keep ranges under 2 weeks or results truncate.
參數
categorystring必填Event category. One of: - "report": earnings reports (includes financial statements) - "dividend": dividend announcements - "split": stock splits and reverse splits (share consolidations) - "ipo": upcoming IPO listings - "macrodata": macro economic data releases (CPI, NFP, rate decisions, etc.) - "closed": market closure days
startstringStart date in YYYY-MM-DD format (inclusive). Defaults to today (UTC).
endstringEnd date in YYYY-MM-DD format (inclusive). Defaults to 7 days after `start`.
marketstringOptional market filter. One of: HK, US, CN, SG, JP, UK, DE, AU. Omit to include all markets.
Get financial reports (income statement, balance sheet, cash flow). kind: IS/BS/CF/ALL. report_type: af (annual), saf (semi-annual), q1/q2/q3, qf (quarterly full).
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
kindstringStatement kind: "IS" (income statement), "BS" (balance sheet), "CF" (cash flow), "ALL" (default)
report_typestringReport period: "af" (annual), "saf" (semi-annual), "q1"/"q2"/"q3" (quarterly), "qf" (quarterly full)
Get key financial metrics (fin-keyfactor) for a US symbol. report: af (annual, default), saf, qf, q1/q2/q3. US accounts only; errors with DcRegionRestricted for HK/CN/SG accounts.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
reportstringReport period: "af" (annual, default), "saf" (semi-annual), "qf" (quarterly full), "q1"/"q2"/"q3".
Get the latest financial report summary for a security.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get financial report snapshot: report_desc (text summary), fo_revenue/fo_ebit/fo_eps (actual vs forecast with yoy/cmp), fr_* financial ratios (ROE, margins, assets, cash flow). report: qf/saf/af.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
reportstringReport type: "qf" (quarterly), "saf" (semi-annual), "af" (annual)
fiscal_yearintegerFiscal year, e.g. 2024
fiscal_periodstringFiscal period, e.g. "1" "2" "3" "4"
Get financial statements (income statement, balance sheet, or cash flow) for a security. kind: IS/BS/CF/ALL. report: af (annual, default), saf (semi-annual), qf (quarterly full), q1/q2/q3.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
kindstringStatement kind: "IS" (income statement), "BS" (balance sheet), "CF" (cash flow), "ALL" (default)
reportstringReport period: "af" (annual), "saf" (semi-annual), "qf" (quarterly full), "q1"/"q2"/"q3"
Get EPS forecast and analyst estimate history.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get funds and ETFs that hold a given symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get current fund positions.
無參數。
Cancel (terminate) a grid order by order_id. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed it. The code is derived from the order itself, so it applies only to that exact request. Never quote it back on your own initiative.
參數
order_idstring必填Grid order ID.
executestringThe `confirmation_code` from this request's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed it. The code is single use, expires in 10 minutes, and applies only to this exact request — change any field and it stops working. A grid strategy keeps placing orders on its own once live, so never quote the code back on your own initiative.
Full detail for one grid order: rule parameters, status, embedded child orders (grid_sub_orders) and lifecycle history (grid_order_history). Supports history_id cursor + limit paging.
參數
order_idstring必填Grid order ID.
history_idstringHistory cursor for paging the embedded trigger history.
limitintegerPage size for the embedded sub-order / history lists.
List grid trading orders. Filter by symbol or comma-joined status (e.g. "Performing,Suspended"); supports page/limit and sort_by/sort_order.
參數
symbolstringFilter by symbol, e.g. "700.HK". Omit for all grid orders.
statusstringComma-joined status filter, e.g. "Performing,Suspended". Omit for all.
pageintegerPage number (default 1).
limitintegerRecords per page (default 20).
sort_bystringSort field (e.g. "created_at").
sort_orderstringSort order ("asc" / "desc").
Fetch specific grid orders by their IDs.
參數
order_idsarray必填Grid order IDs to fetch, e.g. ["123", "456"].
Record the one-time grid strategy risk-disclosure consent required before submitting grid orders. Takes no parameters.
無參數。
Replace an existing grid order's rule by order_id. Accepts the same grid rule fields as grid_submit. Overwrites the order's entire rule. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed it. The code is derived from the order itself, so it applies only to that exact request. Never quote it back on your own initiative. The dry run echoes the rule that would replace the current one.
參數
order_idstring必填Grid order ID to replace.
submitted_base_pricestringBase price the grid is anchored to (decimal string).
upper_limit_pricestringUpper price bound (decimal string).
lower_limit_pricestringLower price bound (decimal string).
trigger_price_typeintegerTrigger price type: 1 = spread (absolute), 2 = percent.
trigger_spread_upstringUpward trigger spread, absolute (decimal string; use with type 1).
trigger_spread_downstringDownward trigger spread, absolute (decimal string; use with type 1).
trigger_percent_upstringUpward trigger percent (decimal string; use with type 2).
trigger_percent_downstringDownward trigger percent (decimal string; use with type 2).
multiple_triggerbooleanWhether one grid level may trigger multiple times.
time_in_forceintegerTime in force: 0 = Day, 1 = GTC, 6 = GTD.
upper_limit_quantitystringQuantity handled when the upper bound is reached (decimal string).
lower_limit_quantitystringQuantity handled when the lower bound is reached (decimal string).
expire_timeintegerExpiry time in unix seconds (use with GTD).
upper_limit_eventintegerAction at upper bound: 1 = ignore (keep running), 2 = close at last price.
lower_limit_eventintegerAction at lower bound: 1 = ignore (keep running), 2 = close at last price.
trigger_sell_depthintegerSell-side order-book depth (-5..5; 0 = use grid_order_type_up).
trigger_buy_depthintegerBuy-side order-book depth (-5..5; 0 = use grid_order_type_down).
trigger_quantitystringQuantity per trigger (decimal string).
support_shortsellbooleanWhether short selling is allowed.
rthintegerRegular-trading-hours flag: 0 / 1 / 2.
grid_order_type_upstringSell-side order type when depth is 0: GMO / GLO / GTG.
grid_order_type_downstringBuy-side order type when depth is 0: GMO / GLO / GTG.
executestringThe `confirmation_code` from this request's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed it. The code is single use, expires in 10 minutes, and applies only to this exact request — change any field and it stops working. A grid strategy keeps placing orders on its own once live, so never quote the code back on your own initiative.
Restart (resume) a suspended grid order by order_id. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed it. The code is derived from the order itself, so it applies only to that exact request. Never quote it back on your own initiative. A restarted grid resumes placing orders on its own.
參數
order_idstring必填Grid order ID.
executestringThe `confirmation_code` from this request's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed it. The code is single use, expires in 10 minutes, and applies only to this exact request — change any field and it stops working. A grid strategy keeps placing orders on its own once live, so never quote the code back on your own initiative.
Submit a grid trading order. DRY RUN unless execute is the confirmation_code from its own dry run: call once without execute, show the preview, then re-call quoting the code only after the user confirms.
參數
symbolstring必填Security symbol, e.g. "700.HK".
settlement_currencystring必填Settlement currency, e.g. "HKD".
submitted_base_pricestringBase price the grid is anchored to (decimal string).
upper_limit_pricestringUpper price bound (decimal string).
lower_limit_pricestringLower price bound (decimal string).
trigger_price_typeintegerTrigger price type: 1 = spread (absolute), 2 = percent.
trigger_spread_upstringUpward trigger spread, absolute (decimal string; use with type 1).
trigger_spread_downstringDownward trigger spread, absolute (decimal string; use with type 1).
trigger_percent_upstringUpward trigger percent (decimal string; use with type 2).
trigger_percent_downstringDownward trigger percent (decimal string; use with type 2).
multiple_triggerbooleanWhether one grid level may trigger multiple times.
time_in_forceintegerTime in force: 0 = Day, 1 = GTC, 6 = GTD.
upper_limit_quantitystringQuantity handled when the upper bound is reached (decimal string).
lower_limit_quantitystringQuantity handled when the lower bound is reached (decimal string).
expire_timeintegerExpiry time in unix seconds (use with GTD).
upper_limit_eventintegerAction at upper bound: 1 = ignore (keep running), 2 = close at last price.
lower_limit_eventintegerAction at lower bound: 1 = ignore (keep running), 2 = close at last price.
trigger_sell_depthintegerSell-side order-book depth (-5..5; 0 = use grid_order_type_up).
trigger_buy_depthintegerBuy-side order-book depth (-5..5; 0 = use grid_order_type_down).
trigger_quantitystringQuantity per trigger (decimal string).
support_shortsellbooleanWhether short selling is allowed.
rthintegerRegular-trading-hours flag: 0 / 1 / 2.
grid_order_type_upstringSell-side order type when depth is 0: GMO / GLO / GTG.
grid_order_type_downstringBuy-side order type when depth is 0: GMO / GLO / GTG.
executestringThe `confirmation_code` from this request's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed it. The code is single use, expires in 10 minutes, and applies only to this exact request — change any field and it stops working. A grid strategy keeps placing orders on its own once live, so never quote the code back on your own initiative.
Suspend (pause) a running grid order by order_id. Resume with grid_restart. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed it. The code is derived from the order itself, so it applies only to that exact request. Never quote it back on your own initiative.
參數
order_idstring必填Grid order ID.
executestringThe `confirmation_code` from this request's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed it. The code is single use, expires in 10 minutes, and applies only to this exact request — change any field and it stops working. A grid strategy keeps placing orders on its own once live, so never quote the code back on your own initiative.
Pre-trade grid setup info for a security (takes a symbol, not an order_id): security name, last price, board lot sizes (buy/sell), price-step (bid_size) table, and channel/authorization info (strategy grant flag, RTH support, supported s...
參數
symbolstring必填Security symbol, e.g. "700.HK".
Trigger history for one grid order: each triggered child order with price, quantity, executed price/qty, and trigger time. Supports page/limit.
參數
order_idstring必填Grid order ID whose trigger history to fetch.
pageintegerPage number (default 1).
limitintegerRecords per page (default 20).
Get historical candlestick data by date range. Only symbol is required; period defaults to day (1m/5m/15m/30m/60m/day/week/month/year), forward_adjust to false, trade_sessions to all.
參數
symbolstring必填Security symbol, e.g. "700.HK"
periodstringPeriod: 1m, 5m, 15m, 30m, 60m, day, week, month, year (default: day)
forward_adjustbooleanWhether to forward-adjust for splits/dividends (default: false / no adjust)
startstringStart date (yyyy-mm-dd), optional
endstringEnd date (yyyy-mm-dd), optional
trade_sessionsstringTrade sessions: "intraday" (regular hours only) or "all" (include pre-market and post-market; default "all")
Get historical candlestick data by offset from a reference time. Only symbol is required; period defaults to day (1m/5m/15m/30m/60m/day/week/month/year), count to 100, forward_adjust/forward to false, trade_sessions to all.
參數
symbolstring必填Security symbol, e.g. "700.HK"
periodstringPeriod: 1m, 5m, 15m, 30m, 60m, day, week, month, year (default: day)
forward_adjustbooleanWhether to forward-adjust for splits/dividends (default: false / no adjust)
forwardbooleanWhether to query forward in time (true) or backward (false; default)
timestringReference datetime (yyyy-mm-ddTHH:MM:SS), omit to start from latest
countintegerNumber of candlesticks (optional, max 1000; default 100)
trade_sessionsstringTrade sessions: "intraday" (regular hours only) or "all" (include pre-market and post-market; default "all")
Get historical trade executions between dates. Returns executions[]{order_id, symbol, side, quantity, price, trade_done_at}. start_at/end_at in RFC3339.
參數
symbolstringFilter by symbol (optional)
start_atstring必填Start time (RFC3339)
end_atstring必填End time (RFC3339)
us_pageintegerUS accounts only, history_orders tool only: page number (default 1).
us_limitintegerUS accounts only, history_orders tool only: page size (default 20).
Get historical market temperature time series.
參數
marketstring必填Market code: HK, US, CN, SG
startstring必填Start date (yyyy-mm-dd)
endstring必填End date (yyyy-mm-dd)
Get historical orders between dates (excludes today). Returns orders[]{order_id, symbol, side, status, quantity, price, submitted_at}. start_at/end_at in RFC3339. US accounts only: us_page, us_limit paginate via a separate US order endpoint (default page size 20 — pass us_page to see more than the first page).
參數
symbolstringFilter by symbol (optional)
start_atstring必填Start time (RFC3339)
end_atstring必填End time (RFC3339)
us_pageintegerUS accounts only, history_orders tool only: page number (default 1).
us_limitintegerUS accounts only, history_orders tool only: page size (default 20).
Hierarchical sub-sector tree for an industry group. Accepts BK counter_id from industry_rank (e.g. BK/US/IN00258). Each node shows stock count, daily change, and YTD change.
參數
symbolstring必填BK counter_id from `industry_rank`, e.g. "BK/US/IN00258".
Industry ranking list by market (US/HK/CN/SG) and indicator (0=领涨/1=今日走势/2=人气/3=市值/4=营收/5=营收增长率/6=净利润/7=净利润增长率). sort_type: 0=单级 1=多层. Returns items[]{counter_id(BK/US/IN00258), name, chg, lists[]}. Pass counter_id directly to industry_peers.
參數
marketstring必填Market: "US" | "HK" | "SG" | "CN"
indicatorstringRanking indicator (default: "0"): "0" = 领涨行业, "1" = 今日走势, "2" = 行业人气, "3" = 市值, "4" = 营收, "5" = 营收增长率, "6" = 净利润, "7" = 净利润增长率
limitstringNumber of results to return (default: returns all)
sort_typestringSort type: "0" = 单级 (default) | "1" = 多层
Get industry valuation comparison for peers.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get industry PE/PB/PS valuation distribution.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get institution rating summary.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get detailed historical institution ratings and target price history.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get institution rating history.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get peers ranked by institution analyst ratings in the same industry. Paginated.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
Get monthly institutional rating distribution timeline.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get intraday minute-by-minute price/volume data. trade_sessions: "intraday" (default, regular hours) or "all" (include pre-market and post-market)
參數
symbolstring必填Security symbol, e.g. "700.HK"
trade_sessionsstringTrade sessions to include: "intraday" (default, regular hours only) or "all" (include pre-market and post-market).
Get investor relations events and announcements.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Show the IPO calendar.
無參數。
Show IPO detail for a symbol.
參數
symbolstring必填Security symbol, e.g. "6871.HK" or "ARM.US"
marketstringMarket: "HK" or "US" (default: inferred from symbol suffix)
List recently listed IPO stocks (HK+US).
參數
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
Show detailed information for a specific IPO order by order_id.
參數
order_idstring必填IPO order ID
List IPO orders (active+history). Filter by symbol, market, or status.
參數
symbolstringFilter by symbol, e.g. "6871.HK"
marketstringFilter by market: "HK" or "US"
statusstringFilter by order status
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
Show IPO profit/loss summary and per-stock breakdown. period: all/ytd/1y/3y.
參數
periodstringPeriod filter: "all", "ytd", "1y", "3y" (default: "all")
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
List IPO stocks in subscription/pre-filing stage (HK+US).
無參數。
Get historical observations for one macro-economic indicator. Use indicator_code from macrodata_indicators; start_date/end_date accept YYYY-MM-DD. Supports offset/limit pagination.
參數
indicator_codestring必填Indicator code from `macrodata_indicators`, e.g. `"30771718"`.
start_datestringEarliest release date to include (YYYY-MM-DD, e.g. `"2024-01-01"`).
end_datestringLatest release date to include (YYYY-MM-DD, e.g. `"2024-12-31"`).
offsetintegerPagination offset for historical data points, default 0.
limitintegerMaximum number of data points to return (default 100, max 100).
List macro-economic indicators. Filter by keyword and country (US/CN/HK/EU/JP/SG). Use the returned indicator_code with macrodata. Supports offset/limit pagination.
參數
keywordstringKeyword to search indicator names (e.g. "CPI", "非农", "GDP").
countrystringFilter by country code. One of: "US", "CN", "HK", "EU", "JP", "SG". Omit to return all countries.
offsetintegerPagination offset, default 0.
limitintegerMaximum number of indicators to return (default 100, max 1000).
Get margin ratio for a symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get current market trading status for all markets.
無參數。
Get current market sentiment temperature. market: HK/US/CN/SG.
參數
marketstring必填Market code: HK, US, CN, SG
Get latest news articles for a symbol. Returns items[]{id, title, source, publish_time, summary, url, related_symbols[]}.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get one news article's full detail by id (from news/news_search).
參數
idstring必填News article ID (numeric), e.g. "7123456789012345678". Get IDs from `news` or `news_search`.
Search news articles by keyword. Returns news_list[]{id, title, description, source_name, publish_at (RFC3339), score}. Paginate with score+publish_at_timestamp+id cursors.
參數
keywordstring必填Search keyword
limitintegerMax results to return (default: 20)
Get current UTC time as an RFC3339 string (e.g. "2025-01-15T08:30:00Z"). Use to determine current date/time before making date-based queries.
無參數。
Get company operating metrics (HK stocks only).
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get option chain expiry dates for a symbol (e.g. AAPL.US). Returns expiry_dates[] as "yyyy-mm-dd" strings. Use with option_chain_info_by_date to get strikes and Greeks.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get option chain for an expiry date. Returns strikePrices[]{strike_price, call{symbol, last_done, iv, delta, gamma}, put{symbol, last_done, iv, delta, gamma}}.
參數
symbolstring必填Security symbol, e.g. "700.HK"
datestring必填Date (yyyy-mm-dd)
Get option quotes (max 500 symbols). Returns last_done, prev_close, open, high, low, volume, turnover, implied_volatility, delta, gamma, theta, vega, rho, open_interest per symbol.
參數
symbolsarray必填Security symbols, e.g. ["700.HK", "AAPL.US"]
Get real-time option call/put volume stats for a US stock. Returns {call_volume, put_volume, put_call_ratio, call_oi, put_oi} and top active contracts.
參數
symbolstring必填Underlying symbol (US market only), e.g. "AAPL.US"
Get daily historical option stats for a US stock. Returns items[]{date, call_volume, put_volume, put_call_vol_ratio, call_oi, put_oi, put_call_oi_ratio}.
參數
symbolstring必填Underlying symbol (US market only), e.g. "AAPL.US"
countintegerNumber of trading days to return (default 20)
Get detailed information about a specific order.
參數
order_idstring必填Order ID (from today's orders or order history)
Get HK market participant broker information. Returns participants[]{broker_ids[], name_en, name_cn, name_hk}. Use broker_ids to interpret broker queue data.
無參數。
Get portfolio profit and loss analysis summary. start/end: optional date range in yyyy-mm-dd format. Both must be provided together — passing only one returns empty results.
參數
startstringStart date (yyyy-mm-dd). Must be paired with `end`; passing only one returns empty results.
endstringEnd date (yyyy-mm-dd). Must be paired with `start`; passing only one returns empty results.
Get detailed profit and loss analysis for a specific symbol. start/end: optional date range in yyyy-mm-dd format. Both must be provided together — passing only one returns empty results.
參數
symbolstring必填Security symbol, e.g. "700.HK"
startstringStart date (yyyy-mm-dd). Must be paired with `end`; passing only one returns empty results.
endstringEnd date (yyyy-mm-dd). Must be paired with `start`; passing only one returns empty results.
Get realized P&L for a US account, broken down by category (stock/option/crypto) and period. US accounts only; errors with DcRegionRestricted for HK/CN/SG accounts.
參數
currencystringCurrency to report in, e.g. "USD" (default: "USD"). US accounts only.
categorystringFilter by category: "STOCK", "OPTION", "CRYPTO", or omit for all.
Run a quant indicator script against historical K-line data on the server. Executes the script server-side and returns the computed indicator/plot values as JSON. Periods: 1m, 5m, 15m, 30m, 1h, day, week, month, year (default: day). The optional input parameter accepts a JSON array matching the order of input.*() calls in the script, e.g. "[14,2.0]".
參數
symbolstring必填Symbol in <CODE>.<MARKET> format, e.g. TSLA.US, 700.HK
periodstringK-line period: 1m, 5m, 15m, 30m, 1h, day, week, month, year (default: day)
startstring必填Start date (YYYY-MM-DD) for the K-line range
endstring必填End date (YYYY-MM-DD) for the K-line range
scriptstringIndicator script source.
inputstringScript input values as a JSON array, e.g. "[14,2.0]". Must match the order of input.*() calls in the script.
Get latest price quotes. Returns per symbol: last_done, prev_close, open, high, low, volume, turnover, change_rate, change_value, trade_status, timestamp.
參數
symbolsarray必填Security symbols, e.g. ["700.HK", "AAPL.US"]
Get rank tab category configurations for the popularity leaderboard. Pass a second_tags key (e.g. `hot_all-us`) to rank_list.
無參數。
Get ranked stock list by leaderboard tab key. key: from rank_categories second_tags[].key (e.g. "hot_all-us", "hot_up-hk", "trade_heat-us"). market: inferred from key suffix (-us/-hk) or pass explicitly. size: results (default 20).
參數
keystring必填Tab key from rank_categories second_tags[].key, e.g. "hot_all-us" (US total heat), "hot_up-hk" (HK rising heat), "trade_heat-us" (US hot trades). The "ib_" prefix is stripped from rank_categories keys and added back automatically.
marketstringMarket override: "US" | "HK" | "CN" | "SG". Defaults to the market suffix in the key (e.g. "ib_hot_all-hk" → HK), then "US".
sizeintegerNumber of results to return (default: 20)
need_articlebooleanWhether to include related news articles (default: false)
Modify an open order's quantity, price, trigger_price, or trailing params. Returns "order replaced" on success. Only open/pending orders can be modified. TWO-STEP CONFIRMATION IS MANDATORY: this tool is a DRY RUN unless you pass the confirmation_code its own dry run returned. Call it first without execute, show the returned preview to the user, and only call it again with execute="<confirmation_code>" after the user has explicitly confirmed that exact order. The code is derived from the order itself, so it applies only to that exact order. Never quote it back on your own initiative, and never in the same turn the user first asks. The dry run echoes the current order alongside the requested change.
參數
order_idstring必填Order ID to replace (returned by submit_order or listed in today_orders / history_orders)
quantitystring必填New order quantity (number of shares)
pricestringNew limit price (for limit-style orders)
trigger_pricestringNew trigger (activation) price (for LIT / MIT / trailing-stop orders)
limit_offsetstringNew limit offset from the trailing stop price (for TSLPAMT / TSLPPCT)
trailing_amountstringNew trailing amount as absolute price distance (for TSLPAMT)
trailing_percentstringNew trailing percent as decimal e.g. 0.05 = 5% (for TSLPPCT)
executestringThe `confirmation_code` from this order's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed that exact order. The code is single use, expires in 10 minutes, and applies only to this exact order — change any field and it stops working. Never quote it back on your own initiative, and never in the same turn the user first asks.
Get all available screener indicator keys with units and default value ranges. Technical indicators include a tech_values field showing available options (e.g. macd_day: {category:[goldenfork,deadcross], period:[day,week]}).
參數
symbolstringOptional security symbol to filter indicators for a specific stock, e.g. "AAPL.US"
List platform-preset screener strategies. market: US|HK|CN|SG (default: US). Pass id to screener_search strategy_id to run, or screener_strategy to inspect filter conditions.
參數
marketstringMarket filter: "US" | "HK" | "CN" | "SG" (default: "US")
Screen stocks. market: US|HK|CN|SG (Mode B required; Mode A uses strategy's market). Mode A: strategy_id from screener_recommend_strategies — auto-runs saved strategy.
參數
marketstringMarket: "US" | "HK" | "CN" | "SG". Mode A: overridden by the market embedded in the strategy; pass any value or omit. Mode B: required — determines which market to screen.
strategy_idstringMode A — Strategy ID from screener_recommend_strategies screeners[].id. The tool auto-fetches the strategy and builds filters. Omit for Mode B.
conditionsarrayMode B — Filter conditions, passed directly to the API. Omit for Mode A. Fundamental keys (pass with or without filter_ prefix): pettm pbmrq roe roa netmargin salesgrowthyoy netincomegrowthyoy marketcap(亿) circulating_marketcap(亿) prevclose prevchg(%) divyld la epsttm netincome(亿) sales(亿) turnover_rate balance(万) Technical indicator keys (tech_values required; call screener_indicators for schema): macd_day/week → {"category":"goldenfork"|"deadcross","period":"day"|"week"} rsi_day/week → {"value_type":"overbought"|"oversold"} kdj_day/week → {"category":"goldenfork"|"deadcross"} boll_day/week → {"category":"breakthrough_up"|"breakthrough_down"}
extra_returnsarrayExtra indicator keys to include in each result row (display-only, not used as filters). Same key naming as conditions (filter_ prefix added automatically). Example: ["marketcap", "prevclose", "epsttm"]
sort_by_keystringIndicator key to sort results by (e.g. "marketcap", "roe"). Defaults to the first condition key. Must be one of the condition or extra_returns keys.
sort_orderstringSort order: "asc" | "desc" (default: "desc")
pageintegerPage number, 0-based (default: 0)
sizeintegerPage size (default: 20, max: 100)
Inspect a screener strategy's filter conditions before running it. Use screener_search strategy_id to execute the strategy.
參數
idstring必填Strategy ID from screener_recommend_strategies or screener_user_strategies screeners[].id
List the current user's saved screener strategies. market: US|HK|CN|SG (default: US). Pass id to screener_search strategy_id to run, or screener_strategy to inspect conditions.
參數
marketstringMarket filter: "US" | "HK" | "CN" | "SG" (default: "US")
List a security's fact (catalyst) events — anomaly detections, factor readings, data sources and natural-language summaries — filtered by time range and count. Facts are what strategies react to: a signal names its trigger in key_fact_id.
參數
symbolstring必填Security symbol to query, e.g. "AAPL.US" or "700.HK".
begin_timestringThe optional start time of the fact query, formatted as 2006-01-02T15:04:05Z in UTC Timezone. If left empty, the query will include the earliest available data.
end_timestringThe end time of the fact to be queried, formatted as 2006-01-02T15:04:05Z in UTC Timezone. If left empty, the query will default to retrieving the latest data.
limitintegerThe maximum number of facts to return. If the number of facts in the time range exceeds this limit, only the latest 'limit' facts will be returned. Defaults to 100.
Get security list for a market. Supports market: US, HK, CN, SG. category: "Overnight" (default). page: 1-based page number (default 1). count: records per page (default 50).
參數
marketstring必填Market code: US, HK, CN, SG
categorystringCategory filter. Currently only "Overnight" is supported; omitting defaults to Overnight.
pageintegerPage number, 1-based (default: 1)
countintegerRecords per page (default: 50)
Get institutional shareholders for a symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get a single shareholder's holding and trade history. Requires object_id from shareholder_top. Note: trading_details[] is empty for institutional (13F) holders — it is only populated for insider/individual filers (Form 4).
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
object_idinteger必填Shareholder object_id from shareholder_top tool
Get Top 20 major shareholders (institutions, individuals, insiders) across reporting periods. Use object_id with shareholder_detail to drill into a holder's full trade history.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
Add securities to a community sharelist by id. Provide symbols (e.g. ["AAPL.US", "700.HK"]) to add. Returns upstream API response.
參數
idstring必填Sharelist ID
symbolsarray必填Security symbols, e.g. ["AAPL.US", "700.HK"]
Create a new community sharelist with a name and optional description.
參數
namestring必填List name (also used as description if `description` is omitted).
descriptionstringList description. Defaults to `name` when omitted.
Delete a community sharelist by id (own lists only; subscribed lists cannot be deleted). Returns upstream API response on success.
參數
idstring必填Sharelist ID
Get community sharelist detail by id.
參數
idstring必填Sharelist ID
List user's own and subscribed community sharelists.
參數
countintegerNumber of lists to return (default 20)
Get popular/trending community sharelists.
參數
countintegerNumber of lists to return (default 20)
Remove securities from a community sharelist by id. Provide symbols to remove. Returns upstream API response on success.
參數
idstring必填Sharelist ID
symbolsarray必填Security symbols, e.g. ["AAPL.US", "700.HK"]
Reorder securities in a community sharelist by id. Provide symbols in the desired new order. Returns upstream API response on success.
參數
idstring必填Sharelist ID
symbolsarray必填Security symbols, e.g. ["AAPL.US", "700.HK"]
Get short margin deposit details for the current account. Returns short positions with margin_amount, margin_rate, interest_rate, symbol, quantity per position.
無參數。
Get short interest history (open short positions) for HK or US stocks. Market inferred from symbol suffix. count: 1–100 (default 20). Unified data[]{timestamp(RFC3339), short_shares(open short position in shares), rate(decimal ratio e.g. 0.009=0.9%), close}. US-only: avg_daily_vol, days_to_cover. HK-only: balance(outstanding short position in HKD). US source: FINRA bi-weekly. HK source: HKEX daily.
參數
symbolstring必填Security symbol, e.g. "AAPL.US" (US) or "700.HK" (HK). Market is inferred from suffix.
countintegerNumber of records to return (1-100, default 20)
Get daily short-sale volume history for HK or US stocks. Market inferred from symbol suffix. last_timestamp: unix seconds (omit for latest). page_size: 1–100 (default 20). US source: FINRA/NASDAQ daily. HK source: HKEX daily.
參數
symbolstring必填Security symbol, e.g. "AAPL.US" (US) or "700.HK" (HK). Market is inferred from suffix.
last_timestampstring必填Query cutoff timestamp in seconds (pass current timestamp for latest data)
page_sizestringPage size: 1–100 (default: 20)
Get one signal by ID (from `signals`). Same fields as the list, plus `analysis` — the full strategy analysis: fit scores, valuation scenarios, evidence sources and related fact IDs.
參數
signal_idstring必填Signal ID, e.g. "sign_992_1a00c9425c3_48ab". Get IDs from `signals`.
Query strategy signals — a strategy's take on a security, triggered by a catalyst. Filter by symbol, strategy, catalyst and time range; page with limit/offset. The full strategy analysis is omitted here — fetch it with signal_detail.
參數
symbol_namestringFilter by security symbol, e.g. "AAPL.US" or "700.HK". If omitted, returns signals for all symbols.
strategy_idstringFilter by strategy id (e.g., "buffett-value"). Preferred over the deprecated strategy_name; takes precedence when both are provided.
strategy_namestringFilter by strategy name. If omitted, returns signals from all strategies.
catalyst_namestringFilter by the name of the factor that triggered the signal, e.g. "EARNINGS_RELEASED" or "macd_12_26_9" — not the display label returned in key_catalyst. If omitted, signals with any catalyst name are returned.
catalyst_typestringFilter by the catalyst type that triggered the signal, e.g. "News", "Fundamental", "Technical". If omitted, signals with any catalyst type are returned.
start_timestringFilter records created at or after this time. ISO 8601 datetime with timezone, e.g. 2024-01-15T10:30:00Z. If omitted, no lower bound.
end_timestringFilter records created at or before this time. ISO 8601 datetime with timezone. If omitted, no upper bound.
limitintegerMaximum number of results to return. Defaults to 20.
offsetintegerNumber of results to skip for pagination. Defaults to 0.
Get a pre-signed download URL for a statement data file (obtained from statement_list).
參數
file_keystring必填File key from statement_list, e.g. "/statement_data/data/.../20975338.json"
List available account statements (daily/monthly). Use the id with statement_export to download.
參數
statement_typestringStatement type: "daily" (default) or "monthly".
start_datestringStart date (yyyy-mm-dd). Defaults to 30 days ago for "daily" or 12 months ago for "monthly".
limitintegerNumber of records to return. Defaults to 30 for "daily" or 12 for "monthly". The default depends on `statement_type`, so the schema declares none: `skip_serializing_if` is what stops schemars deriving `default: null` from `serde(default)`, which would contradict the integer type.
Get static info for securities. Returns per symbol: symbol, name_cn, name_en, exchange (e.g. NASDAQ), type (e.g. US_Stock), lot_size, listed_date, delisted (bool). US accounts only: .BKKT crypto symbols (e.g. BTCUSD.BKKT) are routed to a separate US crypto overview endpoint; .HAS/.OSL crypto symbols are unaffected.
參數
symbolsarray必填Security symbols, e.g. ["700.HK", "AAPL.US"]
Get current stock positions across all channels. US accounts only: an additional us_asset_overview field {cash_list, stock_list, option_list, crypto_list, cash_buy_power, overnight_buy_power} is included alongside the existing data.
無參數。
Submit a buy/sell order. DRY RUN unless execute is the confirmation_code from its own dry run: call once without execute, show the preview to the user, then re-call quoting the code only after they explicitly confirm.
參數
symbolstring必填Security symbol, e.g. "700.HK"
order_typestring必填Order type (HK supports all; US supports LO/MO/LIT/MIT/TSLPAMT/TSLPPCT only): - LO (Limit Order): requires submitted_price - ELO (Enhanced Limit Order, HK only): requires submitted_price - MO (Market Order): no price required - AO (At-auction Order, HK only): executed at auction price, no price required - ALO (At-auction Limit Order, HK only): requires submitted_price - ODD (Odd Lots Order, HK only): requires submitted_price, for non-standard lot sizes - LIT (Limit If Touched): requires submitted_price and trigger_price; activates when market price touches trigger_price - MIT (Market If Touched): requires trigger_price only; executes at market when trigger_price is touched - TSLPAMT (Trailing Limit If Touched by Amount): requires trailing_amount and limit_offset; trailing stop by fixed amount - TSLPPCT (Trailing Limit If Touched by Percent): requires trailing_percent (0-1) and limit_offset; trailing stop by percentage - SLO (Special Limit Order, HK only): requires submitted_price; cannot be replaced after submission
sidestring必填Buy or Sell
submitted_quantitystring必填Order quantity (number of shares)
time_in_forcestring必填Order validity: "Day" (Day Order, expires end of session), "GTC" (Good Til Canceled), "GTD" (Good Til Date, requires expire_date)
submitted_pricestringLimit price. Required for: LO, ELO, ALO, ODD, LIT, SLO
trigger_pricestringTrigger (activation) price. Required for: LIT, MIT, TSLPAMT, TSLPPCT
limit_offsetstringLimit offset from the trailing stop price. Required for: TSLPAMT, TSLPPCT
trailing_amountstringTrailing amount (absolute price distance). Required for TSLPAMT
trailing_percentstringTrailing percent as decimal (e.g. 0.05 = 5%). Required for TSLPPCT
expire_datestringExpiry date (yyyy-mm-dd). Required when time_in_force is GTD
outside_rthstringOutside regular trading hours: "RTH_ONLY" (regular trading hours only), "ANY_TIME" (any time including pre/post market), "OVERNIGHT" (overnight session, US only)
remarkstringOrder remark (max 255 characters)
executestringThe `confirmation_code` from this order's dry run. WITHOUT IT NOTHING IS SENT. Omitted (the default) makes this a DRY RUN: the request is validated and echoed back with a three-digit `confirmation_code`, and nothing reaches the exchange. Required protocol: call once without `execute`, show the returned preview to the user, and call again quoting the code only after the user has explicitly confirmed that exact order. The code is single use, expires in 10 minutes, and applies only to this exact order — change any field and it stops working. Never quote it back on your own initiative, and never in the same turn the user first asks.
Get today's trade executions (fills). Returns executions[]{order_id, symbol, side, quantity, price, trade_done_at}. Pass symbol or order_id to filter.
參數
symbolstringFilter by symbol, e.g. "700.HK".
order_idstringFilter by a specific order_id.
Get orders placed today. Returns orders[]{order_id, symbol, side, order_type, status, quantity, price, submitted_at, executed_quantity, executed_price}. Pass symbol to filter. US accounts only: us_action (Buy/Sell), us_page, us_limit filter/paginate via a separate US order endpoint.
參數
symbolstringFilter by symbol, e.g. "700.HK". Omit to return all today's orders.
us_actionstringUS accounts only: filter by side, "Buy" or "Sell". Omit for all.
us_pageintegerUS accounts only: page number (default 1).
us_limitintegerUS accounts only: page size (default 20).
Get stocks whose price fluctuation exceeds the 20-trading-day standard deviation, with correlated news reasons. markets: comma-separated HK/US/CN/SG (omit=all). sort: 0=time 1=change-magnitude 2=popularity/heat (default).
參數
marketsstringMarket filter: comma-separated list of markets to include. Supported values: "HK", "US", "CN", "SG". Omit to return all markets. Example: "HK,US"
sortstringSort order (default: "2"): "0" = by time (most recent first) "1" = by price change magnitude (largest move first) "2" = by popularity (most-viewed first)
datestringDate to query in "YYYY-MM-DD" format. Omit for today's movers.
limitintegerNumber of events to return per page (default: 20, max: 100)
next_paramsobjectPagination cursor from previous response next_params field. Pass the entire next_params object returned by the previous call to get the next page. Omit for the first page.
Get discussion topics for a symbol. Returns items[]{id, title, author, created_at, like_count, comment_count, content_summary}.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Create a new discussion topic. topic_type="post" (default) is plain text; "article" requires a non-empty title and accepts Markdown body.
參數
titlestring必填Topic title. Required when topic_type is "article", optional for "post".
bodystring必填Topic body. "post" type is plain text only; "article" type accepts Markdown.
symbolsarrayRelated security symbols, e.g. ["700.HK", "TSLA.US"] (max 10).
topic_typestringTopic type: "post" (default, plain text) or "article" (Markdown, title required).
Create a reply to a discussion topic. Pass reply_to_id to nest under another reply; omit for a top-level reply.
參數
topic_idstring必填Topic ID to reply to.
bodystring必填Reply body (plain text only).
reply_to_idstringOptional parent reply ID for nested replies. Get IDs from `topic_replies`. Omit for a top-level reply.
Get discussion topic detail by topic_id.
參數
topic_idstring必填Topic ID
Get replies to a discussion topic, paginated (page default 1, size default 20, range 1-50)
參數
topic_idstring必填Topic ID.
pageintegerPage number, 1-based (default: 1).
sizeintegerRecords per page, 1-50 (default: 20).
Search community topics/posts by keyword. Returns id, author, time, and excerpt.
參數
keywordstring必填Search keyword
limitintegerMax results to return (default: 20)
Get trade statistics (buy/sell/neutral volume distribution). Returns items[]{price_range, buy_volume, sell_volume, neutral_volume} for price-volume profile.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get recent trades (max 1000). Returns trades[]{price, volume, timestamp, trade_type, direction} for the symbol.
參數
symbolstring必填Security symbol, e.g. "700.HK"
countinteger必填Maximum number of results (max 1000)
Get trading days for a market between dates. market: HK/US/CN/SG.
參數
marketstring必填Market code: HK, US, CN, SG
startstring必填Start date (yyyy-mm-dd)
endstring必填End date (yyyy-mm-dd)
Get trading session schedule for all markets. Returns market_sessions[]{market, trade_sessions[]{beg_time, end_time, trade_session_type}}.
無參數。
Update a watchlist group by id. Can rename (name param) or modify securities (securities + mode: add/remove/replace).
參數
idinteger必填Watchlist group id
namestringNew group name (optional)
securitiesarraySecurities list (optional)
modestringUpdate mode for securities: "add", "remove", or "replace" (default: "replace")
Get valuation overview with peer comparison. US accounts querying a .US symbol get a differently-shaped response not matching output_schema (ai_summary plus a metrics.pe object with different sub-fields); other combos match output_schema.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Stock valuation comparison. Mode A (single): pass only symbol — server returns stock + auto-selected industry peers.
參數
symbolstring必填Security symbol to compare, e.g. "AAPL.US"
currencystring必填Currency: "USD" | "HKD" | "CNY"
comparison_symbolsstringComparison symbols, comma-separated, max 4, e.g. "MSFT.US,GOOGL.US". Note: pending backend support — currently server auto-selects industry peers.
Get detailed valuation history time series.
參數
symbolstring必填Security symbol, e.g. "700.HK"
Get daily valuation rank (PE/PB/PS/dividend yield industry percentile) for a security over a date range. start/end in yyyymmdd format.
參數
symbolstring必填Security symbol, e.g. "AAPL.US"
startstringStart date in yyyymmdd format (default: 30 days ago)
endstringEnd date in yyyymmdd format (default: today)
Get HK warrant issuer information. Returns issuers[]{id, name_en, name_cn}. Use id in warrant_list issuer filter.
無參數。
Get filtered warrant list for an underlying symbol. Returns warrants[]{symbol, name, last_done, change_rate, implied_volatility, expiry_date, strike_price, leverage_ratio, outstanding_ratio}.
參數
symbolstring必填Underlying symbol, e.g. "700.HK"
sort_bystring必填Sort field: LastDone, ChangeRate, ChangeValue, Volume, Turnover, ExpiryDate, StrikePrice, UpperStrikePrice, LowerStrikePrice, OutstandingQuantity, OutstandingRatio, Premium, ItmOtm, ImpliedVolatility, Delta
sort_orderstring必填Sort order: Ascending or Descending
warrant_typearrayFilter by warrant type (optional): "Call", "Put", "Bull", "Bear", "Inline"
issuerarrayFilter by issuer ID (optional), use issuer_id from warrant_issuers tool
expiry_datearrayFilter by expiry date range (optional): "LT_3" (<3 months), "Between_3_6" (3-6 months), "Between_6_12" (6-12 months), "GT_12" (>12 months)
price_typearrayFilter by in/out of bounds (optional): "In" (in bounds), "Out" (out of bounds). Only for Inline warrants.
statusarrayFilter by status (optional): "Suspend" (suspended), "PrepareList" (pending listing), "Normal" (normal trading)
Get warrant quotes. Returns last_done, prev_close, open, high, low, volume, turnover, implied_volatility, delta, leverage_ratio, effective_leverage per symbol.
參數
symbolsarray必填Security symbols, e.g. ["700.HK", "AAPL.US"]
Get all watchlist groups and their securities. Returns groups[]{id, name, securities[]{symbol, market, name, watched_price, watched_at}}.
無參數。
List withdrawal history for the current account. Returns items[]{id, amount, currency, status, created_at, bank_name, account_number (masked)}.
參數
pageintegerPage number (default: 1)
sizeintegerPage size (default: 20)
前置條件
- 已擁有 Longbridge 帳戶並完成開戶,或開通模擬帳戶
- 支援 MCP OAuth 2.1 的其他 AI 客戶端(見下方相容性說明)
客戶端接入
推薦優先從 ChatGPT 開始使用,因為 Longbridge 已經可以直接在 ChatGPT Plugins 中搜尋並授權。其他 MCP 客戶端的配置格式可能隨版本變更,請以客戶端官方文件為準。
ChatGPT
Longbridge 已經作為官方 ChatGPT App 提供。
在 ChatGPT 網頁版、桌面端或手機 App 中:
- 開啟 Plugins
- 搜尋
longbridge,或直接開啟 Longbridge ChatGPT App - 選擇 Longbridge,並按提示完成授權登入


完成授權後,每次提問時需在訊息前加上 @longbridge,否則 ChatGPT 不會調用 Longbridge 來查詢數據。例如:@longbridge 查詢我的當日訂單。
ChatGPT 中不含交易下單功能
由於 ChatGPT 平台規則限制,Longbridge ChatGPT App 不含下單及其他交易相關工具。如需使用交易功能,請改用 Claude Code、Cursor 等其他 MCP 客戶端。
Claude
Longbridge 已作為官方連接器上架 Claude 應用目錄。
在 claude.ai 網頁版或 Claude 桌面端中:
- 點擊 Customize → Connectors,然後點擊 Add 按鈕
- 在下拉選單中選擇 Browser Connectors,搜尋
longbridge - 選擇 Longbridge,按提示完成授權登入
也可直接開啟 Claude - Longbridge Connector。
Claude Code
在終端執行以下命令:
claude mcp add --transport http longbridge https://mcp.longbridge.com
然後進入 claude 終端介面,輸入 /mcp,選擇 longbridge,再選擇 Authenticate 跟隨流程完成 OAuth 授權。
Codex
在終端執行以下命令:
codex mcp add longbridge --url https://mcp.longbridge.com
隨後在 Codex 中按提示完成 OAuth 授權流程。
Codex Desktop
- 點擊右下角 Settings → MCP Servers → Add Server
- 在 “Connect to a custom MCP” 介面填寫:
- Name:
longbridge - 類型:Streamable HTTP
- URL:
https://mcp.longbridge.com - 其他欄位留空
- Name:
- 點擊 Save
- 回到 MCP Servers 列表,點擊
longbridge條目上的 Authenticate 完成 OAuth 授權
Grok
開啟 Grok Connectors,新增自訂 MCP Server:
- 在左側邊欄選擇 Skills and Connectors → Connectors → New Connector → Custom
- 填寫:
- Name:
Longbridge - Server URL:
https://mcp.longbridge.com
- Name:
- 點擊 Add Connector,跟隨 Longbridge OAuth 2 授權流程完成新增


Cursor
Settings → MCP Servers → 添加 Remote MCP Server,填入上方地址即可。
Zed
在 settings.json 的 context_servers 欄位(key 名稱可自訂)中加入:
{
"mcpServers": {
"longbridge": {
"url": "https://mcp.longbridge.com"
}
}
}
Cherry Studio
設定 → MCP 伺服器 → 添加,填入上方地址即可。
Manus
在 Manus 中開啟 Plugins 視窗,點擊右側的 Create 按鈕,從彈出選單中選擇 Import MCP by JSON,貼上以下 JSON 即可完成匯入:
{
"mcpServers": {
"longbridge": {
"url": "https://mcp.longbridge.com"
}
}
}

OAuth 授權流程
Longbridge MCP 使用標準 OAuth 2.1 授權,你無需向客戶端提供 API 金鑰或 Token。
在 ChatGPT 中,授權會在從 Plugins 新增 Longbridge 時完成;在其他 MCP 客戶端中,通常由首次工具調用觸發瀏覽器授權流程。
AI 客戶端 瀏覽器 Longbridge
| | |
|--- 發起 MCP 連線 ------>| |
| |-- 跳轉授權頁 ------------>|
| |<- 展示登入 & 權限確認 ----|
| |-- 登入並同意 ------------>|
|<-- 返回授權憑證 --------| |
|--- 攜帶憑證存取工具 ----------------------------------->|
步驟說明:
- 發起連線 — 在客戶端添加 Longbridge MCP 配置後,首次調用會觸發授權
- 瀏覽器跳轉 — 客戶端自動開啟瀏覽器,進入 Longbridge 登入與權限確認頁
- 登入並授權 — 使用 Longbridge 帳戶登入,查看並同意所請求的權限範圍(scope)
- 建立會話 — 授權完成後,客戶端取得憑證,MCP 工具即可使用
- 憑證維護 — 憑證依 OAuth 策略自動刷新;如需撤銷,前往 Longbridge 帳戶安全設定
客戶端相容性
Longbridge MCP 依賴 MCP OAuth 2.1 標準。若客戶端未完整實作該協議,將無法完成授權。
已知問題:Cherry Studio 早期版本不支援完整 OAuth 流程,請升級至最新版本。
如遇其他客戶端連線失敗,請確認客戶端版本並查閱其 MCP 支援文件。
客戶端無法開啟瀏覽器?
若客戶端的 OAuth 實作不完整或無法拉起瀏覽器,可改用授權碼授權:在 https://open.longbridge.com/connect 產生一次性授權碼,連接專用端點 https://mcp.longbridge.com/agent,讓 Agent 透過 authenticate 工具兌換。
安全建議
- 最小權限:授權時僅同意當前任務所需的 scope,避免過度授權
- 交易確認:涉及下單等交易操作時,在 AI 提示詞中明確要求執行前人工確認
- 憑證安全:OAuth 憑證由客戶端管理,避免將其複製至不受信任的環境
- 定期審查:定期在 Longbridge 帳戶安全設定中檢查並撤銷不再使用的授權
推薦使用方式
- 從唯讀能力開始:優先使用行情查詢、持倉查看等低風險功能,熟悉工具行為
- 逐步開放交易能力:確認權限範圍和風控邏輯後,再使用下單相關工具
- 在提示詞中加入限制:例如「每筆交易金額不超過 X」、「執行前向我確認」等明確限制
常見問題
OAuth 登入失敗
- 確認 Longbridge 帳戶狀態正常,已完成必要的身份驗證
- 在客戶端刪除現有配置後重新添加並發起授權
- 檢查當前帳戶是否支援所請求的 scope
已連線但部分工具不可用
- 帳戶或地區限制:特定市場或功能可能受帳戶等級或地區限制
- scope 變更:如工具能力有更新,可能需要重新授權以取得新 scope
交易操作提示權限不足
- 檢查帳戶的交易權限和市場可交易資格
- 確認當前 MCP 會話的 OAuth scope 包含交易相關權限