Skip to content

docs(market): document finance_calendar pagination and fix examples - #1267

Open
hogan-yuan wants to merge 2 commits into
mainfrom
fix/finance-calendar-doc-params
Open

hogan-yuan wants to merge 2 commits into
mainfrom
fix/finance-calendar-doc-params

Conversation

@hogan-yuan

@hogan-yuan hogan-yuan commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What

Sync the calendar reference docs with the SDK change in longbridge/openapi#597 (which exposes the finance_calendar pagination parameters), and roll up the outstanding calendar-doc fixes from the now-stale #1125.

1. Pagination parameters

Add count, offset and next (CalendarPageDirection: Later / Earlier) to the "SDK method parameters" table on every calendar page — split / dividend / earnings / ipo / macro / meeting / merge, across en, zh-CN, zh-HK.

2. Fix broken request examples

The split / dividend / earnings / ipo / macro pages called non-existent per-category methods like ctx.split_calendar("AAPL.US") (wrong name, and a symbol instead of a date range). Every language tab now calls the real method:

finance_calendar(CalendarCategory.<Category>, "2024-01-01", "2024-03-31")

with the correct category per page (earnings → Report, macro → MacroData, etc.), consistent with the meeting / merge pages. Rust examples use the new 7-argument signature.

3. Missing translations

Add zh-CN / zh-HK meeting_calendar and merge_calendar pages (4 files) — they previously existed only in English.

4. Response examples

Fix the misleading Response Example JSON: macro now shows a real macro-economic event instead of a stock, per-day event counts corrected to match the single sample row, and sample dates aligned to the request window.

Note on #1125

This supersedes #1125, which addressed the same broken examples and missing translations but targeted the pre-.mdx docs (the pages were since migrated by convert-md-to-mdx.ts) and predates the pagination change, so it can no longer merge cleanly.

Related: #1265

Add the count/offset/next pagination parameters to the calendar
reference pages (split/dividend/earnings/ipo/macro/meeting/merge across
en, zh-CN, zh-HK), matching the SDK change in longbridge/openapi#597.

Also fix the request examples on the split/dividend/earnings/ipo/macro
pages, which called non-existent per-category methods such as
`split_calendar("AAPL.US")`; every language tab now calls
`finance_calendar(CalendarCategory.X, start, end)`, consistent with the
already-correct meeting/merge pages.

Related: #1265
…mples

- Add zh-CN / zh-HK translations for meeting_calendar and merge_calendar
  (4 files), which previously existed only in English.
- Fix the misleading Response Example JSON on the split/dividend/earnings/
  ipo/macro pages: macro now shows a real macro-economic event instead of
  a stock, per-day event counts corrected to match the single sample row,
  and the sample dates aligned to the request window.

Salvaged from the stale #1125, which targeted the
pre-`.mdx` docs and can no longer merge cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant