feat(fundamental): add macroeconomic_indicators_v2 and macroeconomic_v2 methods (v2 endpoints)#543
Merged
Merged
Conversation
- macroeconomic_indicators / macroeconomic_indicators_v2: GET /v2/quote/macrodata
- market defaults to 'ALL' when country is None
- new keyword param for fuzzy name filter
- maps V2MacroIndicator to existing MacroeconomicIndicator type
- macroeconomic / macroeconomic_v2: GET /v2/quote/macrodata/{id}
- new sort param (asc/desc)
- maps V2MacroIndicatorDetail to existing MacroeconomicResponse type
- original method signatures unchanged; _v2 variants add new params
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ndicator_data_list GetMacroIndicatorHistoryResp returns: indicator: MacroIndicatorDetail (single object) total: int32 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ly cargo fmt Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e type and list mapping Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
MacroIndicatorItem.frequence maps to MacroeconomicIndicator.periodicity Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ageText to string Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…t to string Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Rust: macroeconomic_indicators_v2/macroeconomic_v2 -> pub(crate) - Python: remove _v2 methods from sync/async bindings - Node.js: remove _v2 methods from napi binding - Java: remove getMacroeconomicIndicatorsV2/getMacroeconomicV2 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
fundamentalContextMacroeconomicIndicatorsV2 and fundamentalContextMacroeconomicV2 called pub(crate) methods that are no longer accessible from the java crate. The Java public API (getMacroeconomicIndicators/getMacroeconomic) already delegates to the correct public Rust methods. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
hogan-yuan
added a commit
to longbridge/openapi-go
that referenced
this pull request
Jun 13, 2026
## Summary
Switches macroeconomic APIs to v2 endpoints and simplifies types.
## Changes
### New / updated methods
- `MacroeconomicIndicators(ctx, country, keyword, offset, limit)` — `GET
/v2/quote/macrodata`
- Added `keyword` for fuzzy name filtering (case-insensitive)
- Now returns `Periodicity`, `Describe`, `Importance` from v2 API
- `Macroeconomic(ctx, indicatorCode, startDate, endDate, offset, limit)`
— `GET /v2/quote/macrodata/{id}`
- Defaults to `sort=desc` (newest first)
- Returns `Unit` string from v2 API
### Type simplifications
- `MacroeconomicIndicator.Name` / `.Describe`: `MultiLanguageText` →
`string`
- `Macroeconomic.Unit` / `.UnitPrefix`: `MultiLanguageText` → `string`
### Cleanup
- Removed unused helpers: `convertMacroeconomicIndicator`,
`convertMultiLanguageText`, `convertMacroeconomic`,
`macroeconomicCountryToAPIValue`
- Internal `_v2` method variants hidden from public API
## Version
`v0.25.1`
## Related
- Upstream (all language SDKs): longbridge/openapi#543
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches the macroeconomic indicator APIs to v2 endpoints while keeping existing method signatures and output types unchanged. All language SDKs updated.
Changes
Existing methods (unchanged signatures, route to v2 internally)
macroeconomic_indicators(country, offset, limit)→ delegates tomacroeconomic_indicators_v2macroeconomic(indicator_code, start_date, end_date, offset, limit)→ delegates tomacroeconomic_v2New v2 methods
macroeconomic_indicators_v2(country, keyword, offset, limit)→GET /v2/quote/macrodatakeyword: optional fuzzy filter on indicator namecountryNone defaults to market=ALLoffset/limitpassed through for pagination; responsecountuses APItotalmacroeconomic_v2(indicator_code, start_date, end_date, offset, limit, sort)→GET /v2/quote/macrodata/{indicator_id}sort:"asc"or"desc"indicatorobject to existingMacroeconomicResponsev2 response → existing type mapping
indicator_id(int32)indicator_code(string)indicator_namename.englishobservation_dateMacroeconomic.periodpublished_timeMacroeconomic.release_atactual_dataMacroeconomic.actual_valuetotalcount(for pagination)Languages updated
Rust, Python, Node.js, Java (all bindings add
_v2variants with extra params)Related