Skip to content

fix(api-reference): de-duplicate API page titles and descriptions - #1335

Merged
twosugar merged 1 commit into
mainfrom
fix/api-reference-duplicate-meta
Nov 19, 2026
Merged

twosugar merged 1 commit into
mainfrom
fix/api-reference-duplicate-meta

Conversation

@twosugar

Copy link
Copy Markdown
Collaborator

Merge Verdict

[APPROVE]

1 file · +19 / -19 · copy-only change to openapi.yaml, no code touched

Summary

Several API Reference pages shared the same <title> or meta description, which search engines treat as duplicate pages and which also misdescribed some endpoints. This PR fixes the copy in openapi.yaml only:

Pages Before After
ws-push-depth / ws-push-trade / ws-push-candlestick (en) Depth / Trades / Candlesticks, same as the pull commands Depth Subscription / Trades Subscription / Candlesticks Subscription
ws-push-candlestick (zh-CN / zh-HK) K 线 / K 線, same as pull 实时 K 线订阅 / K 線訂閱, matching the other push commands (实时盘口订阅 / 盤口訂閱)
fund_positions (zh-CN / zh-HK) 基金持仓 / 基金持倉, same as fund_holdings 账户基金持仓 / 賬戶基金持倉
short_positions_hk / short_positions_us (3 locales) Both said "US or HK, auto-detected by symbol suffix" Each describes its own market and update cadence
short_trades_hk / short_trades_us (3 locales) Both said "supports US and HK" Each describes its own market and update cadence

Update cadences (daily / bi-monthly / each trading day / bi-weekly) are carried over unchanged from the original text.

Risk Analysis

Risk Level Mitigation
Push command names also appear in the left nav and site search, so en users now see … Subscription there Low Intended: it is what distinguishes them from the pull commands
YAML breakage Low Only scalar values on existing lines changed; file parses with js-yaml

Design Decisions

  • English push names get a Subscription suffix rather than renaming the pull side, so existing pull page titles stay stable.
  • Chinese push naming follows the pattern the other push commands already use.

Code Concerns

[FYI] symbol parameter text on the four short-selling endpoints still mentions both markets (openapi.yaml, x-parameters of short_positions_hk/us, short_trades_hk/us): it still reads "e.g. TSLA.US or 700.HK" on each market-specific endpoint. Out of scope for this copy fix; can be aligned in a follow-up.

Verification

Conclusion basis: Verified

  • Recomputed title/description for all 483 API pages in 3 locales with apiPageMeta (the same function the pages use): 13 duplicate groups before, 0 after.
  • bun test in packages/api-reference: 10 pass, 0 fail.
  • Deployed to canary; spot-checked the changed pages on both open-canary.longbridge.xyz (11 pages) and open.longbridge.xyz (5 pages, all 3 locales): new titles and descriptions are served.

🤖 Generated with Claude Code

- WS push depth/trades/candlesticks: add "Subscription" so they no longer share titles with the pull commands
- fund_positions: zh title 账户基金持仓, distinct from fund_holdings
- short_positions_hk/us, short_trades_hk/us: describe each endpoint's own market

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@twosugar
twosugar merged commit ae3ba97 into main Nov 19, 2026
2 checks passed
@twosugar
twosugar deleted the fix/api-reference-duplicate-meta branch November 19, 2026 05:36
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