feat(fundamental): add macrodata_indicators and macrodata methods#540
Open
hogan-yuan wants to merge 15 commits into
Open
feat(fundamental): add macrodata_indicators and macrodata methods#540hogan-yuan wants to merge 15 commits into
hogan-yuan wants to merge 15 commits into
Conversation
… methods
Two new methods on FundamentalContext across all language SDKs:
- economic_indicator_list: GET /v1/quote/macrodata
- economic_indicator: GET /v1/quote/macrodata/{indicator_code}
New types: MultiLanguageText, EconomicIndicatorInfo, EconomicIndicatorData,
EconomicIndicatorResponse.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- EconomicIndicatorInfo.start_date: String -> Option<OffsetDateTime> - EconomicIndicatorData.release_at/next_release_at: String -> Option<OffsetDateTime> Python: PyOffsetDateTimeWrapper (datetime), Node.js: Option<i64> (unix seconds). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…FC3339) Input params now accept OffsetDateTime and are serialized as RFC3339 (2024-01-01T00:00:00Z) to match API requirements. - Rust/Python: Option<OffsetDateTime> - Node.js: Option<i64> unix seconds (converted internally) - Java: Option<OffsetDateTime> - Go: *time.Time Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
start_date -> start_time: YYYY-MM-DDT00:00:00Z end_date -> end_time: YYYY-MM-DDT23:59:59Z Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
EconomicIndicatorInfo -> MacrodataIndicatorInfo EconomicIndicatorData -> MacrodataRecord EconomicIndicatorResponse -> MacrodataResponse Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
MacrodataIndicatorInfo -> MacrodataIndicator MacrodataRecord -> Macrodata Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- start_date/release_at/next_release_at: timestamp_opt -> rfc3339_opt (API returns RFC3339 strings, not unix seconds) - EconomicIndicatorListResponse: rename data field to list 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>
describe field can be null in API response; use null_as_default deserializer to map null -> Default (empty strings). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Vec<T> does not implement IntoJValue; ObjectArray<T> does. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…uild 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 10, 2026
## Summary
Two new methods on `FundamentalContext`:
- `MacrodataIndicators(ctx, offset, limit)` — `GET /v1/quote/macrodata`
— list all macroeconomic indicators (~619 total)
- `Macrodata(ctx, indicatorCode, startDate, endDate, limit)` — `GET
/v1/quote/macrodata/{indicator_code}` — fetch historical data for one
indicator
`startDate` / `endDate` accept `"YYYY-MM-DD"` strings and are sent to
the API as `YYYY-MM-DDT00:00:00Z` / `YYYY-MM-DDT23:59:59Z`.
## New Types
| Type | Description |
|------|-------------|
| `MultiLanguageText` | Localized text (English / Simplified Chinese /
Traditional Chinese) |
| `MacrodataIndicator` | Indicator metadata (code, country, category,
periodicity, importance, etc.) |
| `Macrodata` | One historical data point (period,
actual/previous/forecast/revised values, release timestamps, unit) |
| `MacrodataResponse` | `Info MacrodataIndicator` + `Data []Macrodata` |
## Time field formats
All timestamp fields (`StartDate`, `ReleaseAt`, `NextReleaseAt`) are
returned as `*time.Time` (UTC) — consistent with other SDK methods.
## Related
- Upstream (all language SDKs): longbridge/openapi#540
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…istResponse 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
Two new methods on
FundamentalContextacross all language SDKs (Rust, Python, Node.js, Java):macrodata_indicators(offset, limit)—GET /v1/quote/macrodata— list all macroeconomic indicators (~619 total)macrodata(indicator_code, start_date, end_date, limit)—GET /v1/quote/macrodata/{indicator_code}— fetch historical data for one indicatorstart_date/end_dateaccept"YYYY-MM-DD"strings and are sent to the API asYYYY-MM-DDT00:00:00Z/YYYY-MM-DDT23:59:59Z.New Types
MultiLanguageTextMacrodataIndicatorMacrodataMacrodataResponseinfo: MacrodataIndicator+data: Vec<Macrodata>Time field formats
All timestamp fields (
start_date,release_at,next_release_at) are returned asOffsetDateTime(Rust / Java),datetime(Python),i64unix seconds (Node.js) — consistent with other SDK methods.Related