All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Rust:
Config::header(key, value)builder method to inject custom headers into every HTTP request and WebSocket upgrade request. - Rust, Python:
ContentContextadds three new methods:topic_detail(topic_id)— get detail of a single topic.list_topic_replies(opts)— list replies for a topic, with optional page/size filtering.create_topic_reply(opts)— create a reply under a topic.
- Rust, Python: New types
ListTopicRepliesOptions,CreateReplyOptions, andTopicReplyto support the above methods.
- All bindings: Correct
SecurityStaticInfo.dividend_yielddoc comment from "Dividend yield" (ratio) to "Dividend" (per share amount) across all language SDKs (Rust, Python, Node.js, Java, C, C++). - All bindings:
create_topicnow returns the topic ID (String) instead ofOwnedTopicto avoid deserialization errors when the API response omits optional fields.
- All bindings:
ContentContext.topics_minerenamed tomy_topics;ListMyTopicsOptionsrenamed toMyTopicsOptions. - All bindings:
licensefield removed fromOwnedTopicandCreateTopicOptions.
- All bindings:
ContentContextadds two new methods (Rust, Go, C, C++, Java, Python, Node.js):my_topics(opts)— get topics created by the current authenticated user, with optional page/size/topic_type filtering.create_topic(opts)— create a new topic; returns the topic ID (String) on success.
- All bindings: New types
OwnedTopic,MyTopicsOptions, andCreateTopicOptionsto support the above methods. - Python: Added type stubs (
openapi.pyi) forContentContext,AsyncContentContext,OwnedTopic,TopicReply,TopicAuthor, andTopicImage.
- C++:
create_topiccallback now correctly yieldsstd::string(topic ID) instead ofOwnedTopic.
- All bindings:
QuoteContext::new/TradeContext::new/ContentContext::neware now synchronous and infallible — no moreawait,.get(), or callback at construction time. The WebSocket connection is established lazily on first use. - All bindings:
member_id,quote_level, andquote_package_detailsare now async methods (were previously sync fields/properties). - Rust: A single global Tokio runtime is shared across all SDK components; per-binding runtimes removed.
- Reduced connection latency by ~1.3 s by fixing a geo-probe cache issue and a WebSocket rate-limiter initialisation bug.
- Quote: trading days are now loaded lazily on first use instead of eagerly at connect time.
- OAuth token refresh now triggers at 5 minutes before expiry instead of only after expiry, preventing a blocking refresh on the first API call.
- CN region detection updated to use a new probe endpoint.
- Rust: Fix copy-paste field mapping bugs in
TryFrom<quote::FilterWarrant> for WarrantInfowherestrike_price,itm_otm,implied_volatility,delta,effective_leverage,conversion_ratio, andbalance_pointwere incorrectly mapped tolast_done. (#485)
- Migrate OAuth base URL from
openapi.longbridgeapp.comtoopenapi.longbridge.com. - Migrate CN endpoint URLs from
longportapp.cntolongbridge.cn. - Change OAuth token storage path from
~/.longbridge-openapi/to~/.longbridge/openapi/. - Update all README docs to use
openapi.longbridge.comfor OAuth registration endpoints. - Update proto submodule with latest upstream changes (URL migration in proto comments).
- All bindings: New
ContentContext(Rust, C, C++, Java, Python, Node.js) with two methods:topics(symbol)— get discussion topics for a security.news(symbol)— get news list for a security.
- Quote API:
QuoteContext.filings(symbol)— get regulatory filings for a security. Available in all bindings (Rust, C, C++, Java, Python, Node.js). - MCP server: Expose
news,topics, andfilingsas MCP tools.
- Python: Fix
str()on enum fields (e.g.CashFlow.direction,Subscription,OptionDirection) causing a hang/deadlock by registering previously missing types in the quote and trade modules. (#476)
-
OAuth 2.0 authentication for all language bindings (Rust, C, C++, Java, Python, Node.js). Use
OAuthBuilderto run the browser flow; pass the resultingOAuthhandle toConfig::from_oauth(). Tokens are persisted under~/.longbridge/openapi/tokens/<client_id>and reused; the browser is only opened when no valid token exists. -
Python — async callbacks:
AsyncQuoteContextandAsyncTradeContextaccept async callbacks forset_on_quote,set_on_depth,set_on_brokers,set_on_trades,set_on_candlestick, andset_on_order_changed. If a callback returns a coroutine, the SDK schedules it on the asyncio loop. Sync callbacks still work as before. -
Python —
loop_parameter:AsyncQuoteContext.create()andAsyncTradeContext.create()take an optionalloop_argument. When using async callbacks, passloop_=asyncio.get_running_loop()so the SDK can schedule coroutines withasyncio.run_coroutine_threadsafe. Omitloop_when using only sync callbacks.
- Rust:
Config::new→Config::from_apikey,Config::from_env→Config::from_apikey_env; removedConfig::refresh_access_tokenandConfig::refresh_access_token_blocking. - C/C++:
lb_config_new→lb_config_from_apikey,lb_config_from_env→lb_config_from_apikey_env, removedlb_config_refresh_access_token;lb_http_client_new→lb_http_client_from_apikey,lb_http_client_from_env→lb_http_client_from_apikey_env. - Java:
Config.fromEnv()→Config.fromApikeyEnv(), removedConfig.refreshAccessToken(). - Python:
Config.from_env()→Config.from_apikey_env(), removedConfig.refresh_access_token();HttpClient.from_env()→HttpClient.from_apikey_env(). - Node.js:
Config.fromEnv()→Config.fromApikeyEnv().
- python: add asyncio support for quote, trade, and HTTP client; existing sync API unchanged.
- rust: fix incorrect field mapping in
WarrantInfofor warrant filter API.
- java-sdk: fix
limit_depth_levelandtrigger_countbeing correctly passed and read asIntegerin submit/replace order options and order detail.
- add
limit_depth_level,trigger_count,monitor_pricetoOrderDetail, 'Order' types. - add support specify
limit_depth_level,trigger_count,monitor_pricewhen placing order.
- add
US_VIXmarket definition. - python: add support Python
3.14.
- fix candlesticks (K-line) might be generated incorrectly in certain situations.
- fix parsing
OrderDetailmay fail in certain situations.
- add
SecurityBoard.SPXIndexandSecurityBoard.VIXIndex.
- add
ErrorKindenum to represent error kinds.
- fix candlesticks (K-line) might be generated incorrectly in certain situations.
- fix #298
- add
trade_sessionfor query all session intraday. - add
Market.Crypto. - fix subscription index K-line.
- python: fix unable to import SecurityBoard
- A connection limit exceeded error occurred while creating an OTP.
- fix: subscribe candlesticks with
Period::Day.
- add
AccountBalance.frozen_transaction_fees - fix(nodejs): correct condition for disabling quote package printing #230
- fix: Add missing types register #226
- java-sdk: rename
QuoteContext.securityListtoQuoteContext.getSecurityList - java-sdk: add
QuoteContext.getMarketTemperatureandQuoteContext.getHistoryMarketTemperaturemethods
- fix #213
- fix #212
- add support extended hours candlesticks
- add market temperature api
- add support use environment variable
LONGBRIDGE_LANGUAGEto set the response language - java-sdk: add
QuoteContext.getCapitalDistributionmethod - fix #208
- add
log_pathfield toConfig
- add support for more candlesticks periods
- add PushQuote.current_volume, PushQuote.current_turnover
- Add
PushCandlestick.is_confirmedfield.
- Update candlesticks rule.
- Add Serialize/Deserialize to response types.
- Add
LONGBRIDGE_PRINT_QUOTE_PACKAGESenvironment variable to enable printing the opened quote packages when connected to the server, default istrue.
- Changed the
timeparameter ofQuote.history_candlesticks_by_offsetmethod to be optional.
- [python] Change
TradeStatus.SuspendTradetoTradeStatus.Suspendin pyi.
- Returns the most recent historical candlesticks after subscribing to the candlesticks.
- Print the opened quote packages when connected to the server.
- Add
EstimateMaxPurchaseQuantityOptions.fractional_sharesfield, sets totrueto get the maximum fractional share buying power. - The quantity type in the trading API has changed from
inttoDecimal.
- make Depth.price to optional type