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. If the account's entitlement caps out below the requested count, this returns as many candles as allowed instead of erroring — check the returned array length against count if an exact number matters.
参数
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. If the account's entitlement caps out below the requested count, this returns as many candles as allowed instead of erroring — check the returned array length against count if an exact number matters.
参数
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). Symbols must be option contract symbols (e.g. "AAPL230317P160000.US"), NOT plain stock symbols — obtain valid ones from option_chain_info_by_date's call.symbol/put.symbol fields. Returns last_done, prev_close, open, high, low, volume, turnover, implied_volatility, delta, gamma, theta, vega, rho, open_interest per symbol.
参数
symbolsarray必填Option contract symbols, e.g. ["AAPL230317P160000.US"]. These are NOT plain stock symbols — get valid ones from `option_chain_info_by_date`'s per-strike `call.symbol`/`put.symbol` fields (after listing expiry dates with `option_chain_expiry_date_list`).
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 网页版、桌面端或手机客户端中:
- 打开 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 包含交易相关权限