Releases: longbridge/openapi-go
Releases · longbridge/openapi-go
v0.24.2
Bug Fixes
calendar.CalendarEventsResponse: exposeNextDatepagination cursor — fixes incomplete results when a date range spans multiple pages (e.g. CRM.US, PDD.US missing from a 2026-05-23→05-30 range query)calendar.CalendarEventInfo.Symbol: convert rawcounter_id(e.g.ST/US/CRM) to standard symbol format (CRM.US)quote.DailyOptionVolume.Symbol: convertunderlying_counter_idto standard symbol format
Changes
- Add
internal/counter.IDToSymbolas a sharedcounter_id→ symbol conversion helper;sharelistmigrated to use it
Upgrade
go get github.com/longbridge/[email protected]v0.24.1
What's New
7 New Context Types
| Package | Context | Description |
|---|---|---|
alert |
AlertContext |
Price alert management — List / Add / Update / Delete |
calendar |
CalendarContext |
Financial calendar — earnings, dividends, IPOs, macro data, market holidays |
dca |
DCAContext |
DCA plan management — List / Create / Update / Pause / Resume / Stop / History / Stats / CheckSupport / CalcDate / SetReminder |
fundamental |
FundamentalContext |
Fundamental data — financial statements, institutional ratings, dividends, EPS forecasts, valuation, company profile, executives, shareholders, fund holdings, corporate actions, buybacks, and more (20 methods) |
market |
MarketContext |
Market data — broker holdings, A/H premium, trading stats, market anomalies, index constituents (9 methods) |
portfolio |
PortfolioContext |
Portfolio analysis — FX rates, P&L breakdown by market / security / transaction |
sharelist |
SharelistContext |
Community share list management — List / Detail / Popular / Create / Delete / AddSecurities / RemoveSecurities / SortSecurities |
19 New APIs
FundamentalContext+9:Shareholders,BusinessSegments,InstitutionRatingViews,IndustryRank,IndustryPeers,FinancialReportSnapshot, and moreMarketContext+3: new market-related endpointsQuoteContext+4:ShortPositions,OptionVolume,OptionVolumeDaily,UpdatePinned- New
screenerpackage +5:ScreenerRecommendStrategies/ScreenerUserStrategies/ScreenerSearchand more, endpoints migrated to/v1/quote/ai/screener/*
Extensions to Existing APIs
QuoteContext— addedShortPositions,OptionVolume,OptionVolumeDaily,UpdatePinnedWatchedSecurity— addedIsPinned boolfieldConfig— addedWithHeader(key, value string) *Configto inject custom HTTP headers per request
HTTP Connection Improvements
- Removed
req.Close = truethat was forcing a new TCP connection per request - Configured a custom
http.TransportwithIdleConnTimeoutof 60 seconds to enable connection reuse
Breaking Changes
AlertContext.Enable/AlertContext.Disablemerged into a singleAlertContext.Update(item *AlertItem)methodStockEvents→TopMovers;StockEventsResponse→TopMoversResponseHkShortPositionsremoved; useShortPositions(ctx, symbol, count)instead- Response types for
ShortPositions,ShortTrades,TopMovers,RankList,ValuationComparisonchanged from raw JSON to typed structs; timestamps unified to RFC 3339 ScreenerRecommendStrategies/ScreenerUserStrategiesnow accept amarketparameter;ScreenerSearchaccepts typedScreenerConditionobjects
Bug Fixes
fundamental.ValuationPoint.Timestamp,ForecastEpsItem.ForecastStartDate/EndDate: fixed deserialization failure when API returns string timestampsdca.DcaPlan.AlterHours: fixed type mismatchquote.ShortPositions: corrected request parameter tocounter_idformatquote.UpdatePinned:modenow sends string"add"/"remove"instead of integerdca.CalcDate: handle both Unix timestamp andYYYY-MM-DDformats returned by the APIOperatingFinancial: renamedCounterID→Symbol(auto-convertsST/US/AAPL→AAPL.US)oauth: fixed panic (sync: unlock of unlocked mutex) when authorization flow fails
Upgrade
go get github.com/longbridge/[email protected]v0.24.0
What's Changed
- optimize: Add some trade-related type constants. by @sunfuze in #87
- fix lost buy_power field by @wulianglongrd in #78
Full Changelog: v0.23.0...v0.24.0
v0.23.0
What's Changed
- feat(content): add ContentContext with topic and reply APIs by @huacnlee in #82
- feat(asset): add StatementContext for statement list and download APIs, support staging environment by @ZGeomantic in #83
- refactor: rename ListMyTopicsOptions to MyTopicsOptions by @wuxsoft in #84
- upgrade changelog by @wuxsoft in #85
New Contributors
- @huacnlee made their first contribution in #82
- @ZGeomantic made their first contribution in #83
Full Changelog: v0.22.0...v0.23.0
v0.22.0
What's Changed
migrate CN endpoints to longbridge.cn, update token storage path
Full Changelog: v0.21.0...v0.22.0
v0.21.0
What's Changed
- Add news topics and filings by @wuxsoft in #80
New Contributors
- @wuxsoft made their first contribution in #80
Full Changelog: v0.20.0...v0.21.0