feat(fundamental): macroeconomic v2 API + keyword/sort support#100
Open
hogan-yuan wants to merge 26 commits into
Open
feat(fundamental): macroeconomic v2 API + keyword/sort support#100hogan-yuan wants to merge 26 commits into
hogan-yuan wants to merge 26 commits into
Conversation
- MacrodataIndicators: add country parameter (MacrodataCountry enum) - MacrodataIndicators: return MacrodataIndicatorListResponse with count - Macrodata: add offset parameter for pagination - Macrodata: response includes count field - Add MacrodataImportance enum (1=Low, 2=Medium, 3=High) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
SDK accepts HK/CN/US/EU/JP/SG; converts to 'Hong Kong SAR China'/'China (Mainland)'/etc. when sending to API. 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>
…APIValue Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- macroeconomic_indicators / MacroeconomicIndicatorsV2: GET /v2/quote/macrodata
- market defaults to 'ALL' when country is nil
- new keyword param for fuzzy name filter
- maps V2MacroIndicator to existing MacroeconomicIndicator type
- macroeconomic / MacroeconomicV2: 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 Also confirm list endpoint has offset/limit/total. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… published_time RFC3339 parsing Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ator 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>
… to string Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Remove: convertMultiLanguageText, convertMacroeconomicIndicator, convertMacroeconomic, macroeconomicCountryToAPIValue 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>
- CHANGELOG v0.25.1 - v2 API wire types and routing for macroeconomic interfaces - string types for Name/Describe/Unit/UnitPrefix Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- MacroeconomicIndicators: GET /v1 → /v2/quote/macrodata, adds keyword param, uses market code directly
- Macroeconomic: GET /v1 → /v2/quote/macrodata/{id}, defaults sort=desc
- Add convertV2MacroeconomicIndicator/Detail/Macroeconomic converters
- Remove unused v1 converters: convertMacroeconomicIndicator, convertMacroeconomic, macroeconomicCountryToAPIValue, convertMultiLanguageText
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ust SDK - start_time/end_time (RFC3339) → start_date/end_date (YYYY-MM-DD) per proto spec - Add count fallback: if total==0 use len(data), matching Rust behavior 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 macroeconomic APIs to v2 endpoints and simplifies types.
Changes
New / updated methods
MacroeconomicIndicators(ctx, country, keyword, offset, limit)—GET /v2/quote/macrodatakeywordfor fuzzy name filtering (case-insensitive)Periodicity,Describe,Importancefrom v2 APIMacroeconomic(ctx, indicatorCode, startDate, endDate, offset, limit)—GET /v2/quote/macrodata/{id}sort=desc(newest first)Unitstring from v2 APIType simplifications
MacroeconomicIndicator.Name/.Describe:MultiLanguageText→stringMacroeconomic.Unit/.UnitPrefix:MultiLanguageText→stringCleanup
convertMacroeconomicIndicator,convertMultiLanguageText,convertMacroeconomic,macroeconomicCountryToAPIValue_v2method variants hidden from public APIVersion
v0.25.1Related