Skip to content

Commit 78d8ddc

Browse files
hogan-yuanclaudesunli829
authored
chore: release 4.2.2 (#534)
Merge main into release to publish 4.2.2. ## 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`) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Sunli <scott_s829@163.com>
1 parent c5275cf commit 78d8ddc

12 files changed

Lines changed: 36 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [4.2.2]
8+
9+
### Fixed
10+
11+
- **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
12+
- **All languages:** `CalendarEventInfo.symbol` now returns standard symbol format (e.g. `CRM.US`) instead of raw `counter_id` format (e.g. `ST/US/CRM`)
13+
714
## [4.2.1]
815

916
### Changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "3"
33
members = ["rust", "python", "nodejs", "java", "c"]
44

55
[workspace.package]
6-
version = "4.2.1"
6+
version = "4.2.2"
77
edition = "2024"
88

99
[profile.release]

c/csrc/include/longbridge.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7110,6 +7110,10 @@ typedef struct lb_calendar_events_response_t {
71107110
* Number of elements in the `list` array.
71117111
*/
71127112
uintptr_t num_list;
7113+
/**
7114+
* Pagination cursor; pass as start to fetch the next page, empty when there are no more pages.
7115+
*/
7116+
const char *next_date;
71137117
} lb_calendar_events_response_t;
71147118

71157119
/**

c/src/calendar_context/types.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,21 @@ pub struct CCalendarEventsResponse {
198198
pub list: *const CCalendarDateGroup,
199199
/// Number of elements in the `list` array.
200200
pub num_list: usize,
201+
/// Pagination cursor; pass as start to fetch the next page, empty when
202+
/// there are no more pages.
203+
pub next_date: *const c_char,
201204
}
202205
pub(crate) struct CCalendarEventsResponseOwned {
203206
date: CString,
204207
list: CVec<CCalendarDateGroupOwned>,
208+
next_date: CString,
205209
}
206210
impl From<CalendarEventsResponse> for CCalendarEventsResponseOwned {
207211
fn from(v: CalendarEventsResponse) -> Self {
208212
Self {
209213
date: v.date.into(),
210214
list: v.list.into(),
215+
next_date: v.next_date.into(),
211216
}
212217
}
213218
}
@@ -218,6 +223,7 @@ impl ToFFI for CCalendarEventsResponseOwned {
218223
date: self.date.to_ffi_type(),
219224
list: self.list.to_ffi_type(),
220225
num_list: self.list.len(),
226+
next_date: self.next_date.to_ffi_type(),
221227
}
222228
}
223229
}

cpp/include/calendar_context.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ struct CalendarEventInfo { std::string symbol; std::string market; std::string c
2626
/// Calendar events grouped by date.
2727
struct CalendarDateGroup { std::string date; int32_t count; std::vector<CalendarEventInfo> infos; };
2828
/// Response for finance_calendar — events grouped by date within the requested range.
29-
struct CalendarEventsResponse { std::string date; std::vector<CalendarDateGroup> list; };
29+
/// Response for finance_calendar — events grouped by date within the requested range.
30+
struct CalendarEventsResponse { std::string date; std::vector<CalendarDateGroup> list; std::string next_date; };
3031

3132
/// Financial calendar context — earnings, dividends, splits, IPOs, macro data.
3233
class CalendarContext {

cpp/src/calendar_context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void CalendarContext::finance_calendar(CalendarCategory category, const std::str
2929
auto* r = (const lb_calendar_events_response_t*)res->data;
3030
CalendarEventsResponse resp;
3131
resp.date = r->date;
32+
resp.next_date = r->next_date ? r->next_date : "";
3233
for (size_t i = 0; i < r->num_list; ++i) {
3334
CalendarDateGroup grp; grp.date = r->list[i].date; grp.count = r->list[i].count;
3435
for (size_t j = 0; j < r->list[i].num_infos; ++j) {

java/javasrc/src/main/java/com/longbridge/calendar/CalendarEventsResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ public class CalendarEventsResponse {
66
public String date;
77
/** Per-day event groups. */
88
public CalendarDateGroup[] list;
9+
/** Pagination cursor; pass as start to fetch the next page, empty when there are no more pages. */
10+
public String nextDate;
911
}

java/src/types/classes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,8 @@ impl_java_class!(
12611261
[
12621262
date,
12631263
#[java(objarray)]
1264-
list
1264+
list,
1265+
next_date
12651266
]
12661267
);
12671268

nodejs/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3397,6 +3397,8 @@ export interface CalendarEventsResponse {
33973397
date: string
33983398
/** Per-day event groups */
33993399
list: Array<CalendarDateGroup>
3400+
/** Pagination cursor; pass as start to fetch the next page, empty when there are no more pages */
3401+
nextDate: string
34003402
}
34013403

34023404
export declare const enum CashFlowDirection {

python/pysrc/longbridge/openapi.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10759,6 +10759,8 @@ class CalendarEventsResponse:
1075910759
"""Start date of the query window"""
1076010760
list: list[CalendarDateGroup]
1076110761
"""Per-day event groups"""
10762+
next_date: str
10763+
"""Pagination cursor; pass as start to fetch the next page, empty when there are no more pages"""
1076210764

1076310765

1076410766
class CalendarCategory:

0 commit comments

Comments
 (0)