longbridge
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BIND | No | HTTP server listen address, default 127.0.0.1:8000 | |
| LOG_DIR | No | Directory for rolling log files | |
| TLS_KEY | No | PEM private key file for HTTPS | |
| BASE_URL | No | Public base URL for resource metadata | |
| TLS_CERT | No | PEM certificate file for HTTPS | |
| LONGBRIDGE_HTTP_URL | No | Longbridge API base URL | |
| LONGBRIDGE_LOG_PATH | No | SDK internal log path | |
| LONGBRIDGE_QUOTE_WS_URL | No | Quote WebSocket endpoint | |
| LONGBRIDGE_TRADE_WS_URL | No | Trade WebSocket endpoint | |
| LONGBRIDGE_MCP_CONFIG_DIR | No | Config file directory |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| account_balanceA | Get account cash balance and asset summary. Pass currency (e.g. "USD", "HKD") to filter; omit to return all currencies. |
| ah_premiumA | Get A/H share premium historical K-line data |
| ah_premium_intradayA | Get A/H share premium intraday time-share data |
| alert_addA | Add a price alert. condition: price_rise/price_fall/percent_rise/percent_fall |
| alert_deleteB | Delete a price alert by alert_id |
| alert_disableB | Disable a price alert by alert_id |
| alert_enableB | Enable a price alert by alert_id |
| alert_listA | Get all configured price alerts |
| anomalyA | Get market anomaly alerts (unusual price/volume changes) |
| broker_holdingB | Get top broker holding data for a symbol |
| broker_holding_dailyB | Get daily holding history for a specific broker |
| broker_holding_detailB | Get full broker holding detail list |
| brokersC | Get broker queue data |
| calc_indexesA | Calculate financial indexes (PE, PB, dividend ratio, etc.) for symbols |
| cancel_orderA | Cancel an open order by order_id |
| candlesticksA | Get candlestick data (OHLCV). period: 1m/5m/15m/30m/60m/day/week/month/year. trade_sessions: intraday/all |
| capital_distributionA | Get capital distribution (large/medium/small holder flows) |
| capital_flowA | Get capital inflow/outflow time series |
| cash_flowB | Get cash flow records (deposits, withdrawals, dividends) |
| companyB | Get company overview (name, CEO, employees, profile) |
| consensusA | Get financial consensus estimates (revenue, EPS, net income) |
| constituentA | Get constituent stocks of an index (e.g. HSI.HK) |
| corp_actionB | Get corporate actions (splits, buybacks, name changes) |
| create_watchlist_groupA | Create a new watchlist group with optional initial securities |
| dca_checkA | Check whether given symbols support DCA recurring investment |
| dca_createC | 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. |
| dca_historyA | Get execution history records for a DCA plan by plan_id |
| dca_listA | List DCA recurring investment plans. Filter by status (Active/Suspended/Finished) or symbol. |
| dca_pauseA | Pause (suspend) a DCA recurring investment plan by plan_id |
| dca_resumeA | Resume a suspended DCA recurring investment plan by plan_id |
| dca_statsB | Get DCA investment statistics summary. Optionally filter by symbol. |
| dca_stopA | Permanently stop a DCA recurring investment plan by plan_id |
| dca_updateB | Update an existing DCA recurring investment plan by plan_id |
| delete_watchlist_groupA | Delete a watchlist group by id |
| depthA | Get order book depth (bid/ask levels) |
| dividendA | Get dividend history for a symbol |
| dividend_detailA | Get detailed dividend distribution scheme |
| estimate_max_purchase_quantityA | Estimate maximum buy/sell quantity for a symbol |
| exchange_rateA | Get exchange rates for all supported currencies |
| executiveB | Get company executive and board member information |
| filingsB | Get regulatory filings (8-K, 10-Q, 10-K, etc.) |
| finance_calendarA | Get finance calendar events by category and date range. category: report (earnings + financials) / dividend / split (splits & reverse splits) / ipo / macrodata (CPI, NFP, rate decisions) / closed (market holidays). market: HK/US/CN/SG/JP/UK/DE/AU (optional). |
| financial_reportC | Get financial reports for a symbol. report_type: annual or quarterly |
| forecast_epsB | Get EPS forecast and analyst estimate history |
| fund_holderA | Get funds and ETFs that hold a given symbol |
| fund_positionsA | Get current fund positions |
| history_candlesticks_by_dateA | Get historical candlestick data by date range. period: 1m/5m/15m/30m/60m/day/week/month/year |
| history_candlesticks_by_offsetB | Get historical candlestick data by offset from a reference time. period: 1m/5m/15m/30m/60m/day/week/month/year |
| history_executionsB | Get historical trade executions between dates |
| history_market_temperatureA | Get historical market temperature time series |
| history_ordersA | Get historical orders between dates (excludes today) |
| industry_valuationA | Get industry valuation comparison for peers |
| industry_valuation_distB | Get industry PE/PB/PS valuation distribution |
| institution_ratingB | Get institution rating summary with analyst consensus and target price |
| institution_rating_detailA | Get detailed historical institution ratings and target price history |
| intradayA | Get intraday minute-by-minute price/volume data. trade_sessions: "intraday" (default, regular hours) or "all" (include pre-market and post-market) |
| invest_relationA | Get investor relations events and announcements |
| margin_ratioA | Get margin ratio (initial/maintenance/forced liquidation) |
| market_statusA | Get current market trading status for all markets |
| market_temperatureA | Get current market sentiment temperature (0-100) |
| newsA | Get latest news articles for a symbol |
| nowA | Get current UTC time |
| operatingB | Get company operating metrics |
| option_chain_expiry_date_listA | Get option chain expiry dates for a symbol |
| option_chain_info_by_dateA | Get option chain strike prices and Greeks for an expiry date |
| option_quoteA | Get option quotes (max 500 symbols) |
| option_volumeA | Get real-time option call/put volume and put/call ratio for a US stock |
| option_volume_dailyA | Get daily historical option call/put volume, open interest, and put/call ratios for a US stock |
| order_detailA | Get detailed information about a specific order |
| participantsB | Get market participant broker information |
| profit_analysisA | 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. |
| profit_analysis_detailA | 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. |
| quant_runA | 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]". |
| quoteA | Get latest price quotes (last_done, open, high, low, volume, turnover) |
| replace_orderC | Replace/modify an existing order |
| security_listA | Get security list for a market. category must be "Overnight"; other values or omitting it will cause an error. Currently only market="US" is supported; other markets will also return an error |
| shareholderA | Get institutional shareholders for a symbol |
| sharelist_addA | Add securities to a community sharelist |
| sharelist_createB | Create a new community sharelist |
| sharelist_deleteA | Delete a community sharelist by id |
| sharelist_detailA | Get community sharelist detail including constituent stocks and quotes by id |
| sharelist_listA | List user's own and subscribed community sharelists |
| sharelist_popularA | Get popular/trending community sharelists |
| sharelist_removeA | Remove securities from a community sharelist |
| sharelist_sortA | Reorder securities in a community sharelist (provide symbols in desired order) |
| short_positionsA | Get short interest data for a US stock (short ratio, short shares, days to cover). Only US market is supported. |
| statement_exportA | Get a pre-signed download URL for a statement data file (obtained from statement_list). Returns {url}; fetch that URL to get the statement JSON. |
| statement_listB | List available account statements (daily/monthly) |
| static_infoA | Get basic information of securities (name, exchange, type, lot_size) |
| stock_positionsA | Get current stock positions across all channels |
| submit_orderA | Submit a buy/sell order. order_type: LO (Limit) / ELO (Enhanced Limit, HK) / MO (Market) / AO (At-auction, HK) / ALO (At-auction Limit, HK) / ODD (Odd Lots, HK) / LIT (Limit If Touched) / MIT (Market If Touched) / TSLPAMT (Trailing Limit by Amount) / TSLPPCT (Trailing Limit by Percent) / SLO (Special Limit, HK). side: Buy/Sell. time_in_force: Day/GTC/GTD |
| today_executionsA | Get today's trade executions (fills). Pass symbol or order_id to filter; omit both to return all. |
| today_ordersA | Get orders placed today. Pass symbol to filter; omit to return all. |
| topicB | Get discussion topics for a symbol |
| topic_createA | Create a new discussion topic. topic_type="post" (default) is plain text; "article" requires a non-empty title and accepts Markdown body. |
| topic_create_replyA | Create a reply to a discussion topic. Pass reply_to_id to nest under another reply; omit for a top-level reply. |
| topic_detailA | Get discussion topic detail by topic_id |
| topic_repliesA | Get replies to a discussion topic, paginated (page default 1, size default 20, range 1-50) |
| trade_statsA | Get trade statistics (buy/sell/neutral volume distribution) |
| tradesC | Get recent trades (max 1000) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/longbridge/longbridge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server