-
Notifications
You must be signed in to change notification settings - Fork 14
Releases: longbridge/openapi-go
Releases · longbridge/openapi-go
v0.25.1
@hogan-yuan
hogan-yuan
7bd65ea
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
FundamentalContext.MacroeconomicIndicatorsgainskeyword *stringparameter for fuzzy name filtering viaGET /v2/quote/macrodataFundamentalContext.Macroeconomicswitches toGET /v2/quote/macrodata/{id}, results sorted newest-first (sort=desc) by default
Changed
MacroeconomicIndicator.Name/.Describe:MultiLanguageText→stringMacroeconomic.Unit/.UnitPrefix:MultiLanguageText→string
Assets 2
v0.25.0
@hogan-yuan
hogan-yuan
e812e94
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
- New public
counterpackage for symbol ↔counter_idconversion, backed by an embedded ETF (7250) / index (648) / warrant (17693) directory:SymbolToCounterID/IndexSymbolToCounterID/CounterIDToSymbolIsETFreports whether a symbol resolves to an ETFLookupCounterIDresolves locally only (embedded directory + on-disk cache + leading-dot index notation)CacheCounterIDspersists remotely resolved entries to$LONGBRIDGE_CACHE_DIR/counter-ids.csv(default~/.longbridge/cache/counter-ids.csv)
QuoteContext.SymbolToCounterIds— batch convert symbols to counter IDs viaPOST /v1/quote/symbol-to-counter-idsQuoteContext.ResolveCounterIds— local-first counter ID resolution with batched remote fallback and automatic cachingFundamentalContext.EtfAssetAllocation— ETF asset allocation (holdings / regional / asset class / industry) viaGET /v1/quote/etf-asset-allocationFundamentalContext.MacroeconomicIndicators(country, offset, limit)— list macroeconomic indicators viaGET /v1/quote/macrodata; filter byMacroeconomicCountry(HK/CN/US/EU/JP/SG); response includesCountFundamentalContext.Macroeconomic(indicatorCode, startDate, endDate, offset, limit)— historical data for a specific indicator viaGET /v1/quote/macrodata/{indicator_code};startDate/endDateaccept"YYYY-MM-DD"strings; response includesCount- New types:
MultiLanguageText,MacroeconomicCountry,MacroeconomicImportance,MacroeconomicIndicator,MacroeconomicIndicatorListResponse,Macroeconomic,MacroeconomicResponse
Upgrade
go get github.com/longbridge/openapi-go@v0.25.0
Assets 2
v0.24.2
@hogan-yuan
hogan-yuan
3e77a38
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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/openapi-go@v0.24.2
Assets 2
v0.24.1
@sunfuze
sunfuze
2ee338c
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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/openapi-go@v0.24.1
Assets 2
v0.24.0
@sunfuze
sunfuze
e7e4a85
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
Assets 2
v0.23.0
@hogan-yuan
hogan-yuan
473e8c6
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
Assets 2
v0.22.0
What's Changed
migrate CN endpoints to longbridge.cn, update token storage path
Full Changelog: v0.21.0...v0.22.0
Assets 2
v0.21.0
@hogan-yuan
hogan-yuan
d213845
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
Assets 2
v0.20.0
@huacnlee
huacnlee
b9f72a6
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Assets 2
v0.17.1
@sunfuze
sunfuze
e183969
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's Changed
Full Changelog: v0.17.0...v0.17.1