Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [Unreleased]

## Added

- **All languages (Rust, Python, Node.js, Java, C, C++):** `FundamentalContext` gains three new methods (raw JSON responses):
- `shareholder_top(symbol)` — GET `/v1/quote/shareholders/top`: ranked list of top shareholders.
- `shareholder_detail(symbol, object_id)` — GET `/v1/quote/shareholders/holding`: holding history and detail for one shareholder object.
- `valuation_comparison(symbol, currency, comparison_symbols)` — GET `/v1/quote/compare/valuation`: valuation comparison between a security and optional peers.
- **All languages (Rust, Python, Node.js, Java, C, C++):** `MarketContext` gains three new methods (raw JSON responses):
- `stock_events(markets, sort, date, limit)` — POST `/v1/quote/market/stock-events`: stock events across one or more markets.
- `rank_categories()` — GET `/v1/quote/market/rank/categories`: all available rank category keys and labels.
- `rank_list(key, need_article)` — GET `/v1/quote/market/rank/list`: ranked list of securities for a category.
- **All languages (Rust, Python, Node.js, Java, C, C++):** New `ScreenerContext` with five methods (raw JSON responses):
- `screener_recommend_strategies()` — GET `/v1/quote/screener/strategies/recommend`.
- `screener_user_strategies()` — GET `/v1/quote/screener/strategies/mine`.
- `screener_strategy(id)` — GET `/v1/quote/screener/strategy?id=<id>`.
- `screener_search(market, strategy_id, page, size)` — POST `/v1/quote/screener/search`.
- `screener_indicators()` — GET `/v1/quote/screener/indicators`.
- **All languages (Rust, Python, Node.js, Java, C, C++):** `QuoteContext::short_trades(symbol, count)` — GET `/v1/quote/short-trades/hk` or `/v1/quote/short-trades/us` (auto-detected from symbol suffix): short trade records (raw JSON).

## Changed

- **All languages (Rust, Python, Node.js, Java, C, C++):** `QuoteContext::short_positions(symbol, count)` now auto-detects market from the symbol suffix (`.HK` → HK endpoint, otherwise US endpoint) and accepts a `count` parameter. `ShortPositionsResponse` is now a raw JSON response instead of a typed struct. **Breaking change** — old `ShortPosition` sub-type and `symbol`/`sources` fields are removed.

## Breaking changes

- **Rust / Python / Node.js / Java / C / C++:** `QuoteContext::hk_short_positions` is removed. Use `short_positions(symbol, count)` which auto-detects HK vs US from the symbol suffix.
- **Rust / Python / Node.js / Java / C / C++:** `ShortPositionsResponse` no longer contains typed `symbol`, `data: Vec<ShortPosition>`, and `sources` fields. It now has a single `data` field with the raw JSON payload. Callers must parse the JSON themselves.

# [4.1.0]

## Breaking changes
Expand Down
27 changes: 25 additions & 2 deletions c/cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,26 @@ cpp_compat = true
"CRatingCategory" = "lb_rating_category_t"
"CStockRatings" = "lb_stock_ratings_t"
# QuoteContext extensions
"CShortPosition" = "lb_short_position_t"
"CShortPositionsResponse" = "lb_short_positions_response_t"
"CShortTradesResponse" = "lb_short_trades_response_t"
"COptionVolumeStats" = "lb_option_volume_stats_t"
"COptionVolumeDailyStat" = "lb_option_volume_daily_stat_t"
"COptionVolumeDaily" = "lb_option_volume_daily_t"
# FundamentalContext new types
"CShareholderTopResponse" = "lb_shareholder_top_response_t"
"CShareholderDetailResponse" = "lb_shareholder_detail_response_t"
"CValuationComparisonResponse" = "lb_valuation_comparison_response_t"
# MarketContext new types
"CStockEventsResponse" = "lb_stock_events_response_t"
"CRankCategoriesResponse" = "lb_rank_categories_response_t"
"CRankListResponse" = "lb_rank_list_response_t"
# ScreenerContext
"CScreenerContext" = "lb_screener_context_t"
"CScreenerRecommendStrategiesResponse" = "lb_screener_recommend_strategies_response_t"
"CScreenerUserStrategiesResponse" = "lb_screener_user_strategies_response_t"
"CScreenerStrategyResponse" = "lb_screener_strategy_response_t"
"CScreenerSearchResponse" = "lb_screener_search_response_t"
"CScreenerIndicatorsResponse" = "lb_screener_indicators_response_t"

[export]
include = [
Expand Down Expand Up @@ -392,7 +407,15 @@ include = [
# FundamentalContext opaque type (no rename, typedef added in hpp)
"CFundamentalContext",
# QuoteContext extensions
"CShortPosition", "CShortPositionsResponse",
"CShortPositionsResponse", "CShortTradesResponse",
"COptionVolumeStats",
"COptionVolumeDailyStat", "COptionVolumeDaily",
# FundamentalContext new types
"CShareholderTopResponse", "CShareholderDetailResponse", "CValuationComparisonResponse",
# MarketContext new types
"CStockEventsResponse", "CRankCategoriesResponse", "CRankListResponse",
# ScreenerContext
"CScreenerContext",
"CScreenerRecommendStrategiesResponse", "CScreenerUserStrategiesResponse",
"CScreenerStrategyResponse", "CScreenerSearchResponse", "CScreenerIndicatorsResponse",
]
Loading