Skip to content

refactor(etf): remove code query param from etf-holdings - #10

Merged
kevinypfan merged 1 commit into
release/v1.5.0from
feat/etf-holdings
Jul 8, 2026
Merged

refactor(etf): remove code query param from etf-holdings#10
kevinypfan merged 1 commit into
release/v1.5.0from
feat/etf-holdings

Conversation

@kevinypfan

Copy link
Copy Markdown
Collaborator

概要

對齊 server-side MR !376,移除 GET /v1.0/stock/ownership/etf-holdings/:symbol 的選填 code query param。

這是 #8(新增 ETF endpoint)的 follow-up。#8 已 merge 進 release/v1.5.0 但尚未 release,趁 release 前把 code 拿掉,使用者不會看到帶 code 的版本。

為什麼移除

Server MR !376 已移除該 param(命名不一致、功能雞肋、cache key 膨脹)。移除後仍是 soft degrade:server 未開 whitelist,舊呼叫帶 ?code= 不會報錯,只是拿回未過濾的完整清單。需過濾單一成分股時,client 端一行 filter components 即可。

變更內容

  • src/rest/stock/ownership/etf-holdings.ts:移除 params interface 的 code?: string;
  • test/rest-client.spec.ts:測試移除 code,URL 斷言同步更新

測試

  • jest:92 passed

🤖 Generated with Claude Code

Server-side removed the optional `code` filter param from
GET /v1.0/stock/ownership/etf-holdings/:symbol. Drop it from the
SDK's advertised params interface and update the test accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wfv3Xw3onZwDEEZQ5dvRZr
@kevinypfan
kevinypfan merged commit a3de266 into release/v1.5.0 Jul 8, 2026
4 checks passed
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