fix(calendar): expose next_date cursor in finance_calendar response#532
Merged
Conversation
… results The /v1/quote/finance_calendar endpoint paginates via a next_date cursor. Previously only the first page was returned, causing events on later pages (e.g. CRM.US, PDD.US, MRVL.US for a 2026-05-23→05-30 range) to be silently dropped. Add an internal Page deserialization type with next_date and loop in finance_calendar() until next_date is empty, deduplicating events by ID across pages. All language bindings (Node.js, Python, Java, C, C++) delegate to this Rust core and are fixed automatically. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The /v1/quote/finance_calendar endpoint paginates via a next_date cursor. Previously next_date was silently dropped, making it impossible for callers to fetch subsequent pages. Now next_date is returned as-is so callers can follow the cursor themselves. Changes across all language SDKs: - Rust: add next_date to CalendarEventsResponse, revert to single request - C: add next_date to lb_calendar_events_response_t and CCalendarEventsResponseOwned - C++: add next_date to CalendarEventsResponse struct and populate in callback - Node.js: add nextDate to CalendarEventsResponse interface - Python: add next_date to CalendarEventsResponse stub - Java: add nextDate field to CalendarEventsResponse Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The impl_java_class! macro was missing next_date, causing the Java SDK build to fail as the field exists in CalendarEventsResponse.java but was never set from the Rust side. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This was referenced Jun 2, 2026
Merged
hogan-yuan
added a commit
that referenced
this pull request
Jun 2, 2026
## Summary Bump version to `4.2.2` and add CHANGELOG entry. ## Changes in 4.2.2 ### Fixed - **All languages:** `CalendarEventsResponse` now exposes `next_date` cursor — callers can pass it as `start` (with the same `end`) to fetch the next page of `/v1/quote/finance_calendar` results - **All languages:** `CalendarEventInfo.symbol` now returns standard symbol format (e.g. `CRM.US`) instead of raw `counter_id` format (e.g. `ST/US/CRM`) ## Related - PR #532
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
/v1/quote/finance_calendarendpoint paginates via anext_datecursor, but all SDK bindings were silently dropping it, making multi-page range queries return incomplete data (e.g. CRM.US, PDD.US, MRVL.US missing for a 2026-05-23→05-30 range)next_dateis now returned as-is inCalendarEventsResponseacross all language SDKs so callers can follow the cursor themselvesChanges
rust/src/calendar/types.rsnext_datetoCalendarEventsResponserust/src/calendar/context.rsc/src/calendar_context/types.rsnext_dateto C binding owned/FFI typesc/csrc/include/longbridge.hnext_datetolb_calendar_events_response_tcpp/include/calendar_context.hppnext_dateto C++CalendarEventsResponsestructcpp/src/calendar_context.cppnext_datefrom C response in callbacknodejs/index.d.tsnextDate: stringtoCalendarEventsResponsepython/pysrc/longbridge/openapi.pyinext_date: strtoCalendarEventsResponsejava/.../CalendarEventsResponse.javapublic String nextDateRelated