Skip to content

feat!: remove all symbol↔counter_id conversions (port longbridge/openapi #562) - #119

Open
hogan-yuan wants to merge 1 commit into
mainfrom
feat/remove-counter-id-conversion
Open

feat!: remove all symbol↔counter_id conversions (port longbridge/openapi #562)#119
hogan-yuan wants to merge 1 commit into
mainfrom
feat/remove-counter-id-conversion

Conversation

@hogan-yuan

Copy link
Copy Markdown
Member

Ports longbridge/openapi#562 to the Go SDK.

What changed

  • Request side: counter_id / counter_ids / underlying_counter_id query/body params renamed to symbol / symbols, sending the user-facing symbol as-is (AAPL.US, HSI.HK, BTCUSD.BKKT) instead of converting to ST/US/AAPL / IX/HK/HSI / ETF/SH/513050 / VA/BKKT/BTCUSD. Special cases: ValuationComparison comparison_counter_idscomparison_symbols; USQueryOrders body counter_idssymbols.
  • Response side: fields previously read from counter_id (and converted) now read the server's symbol directly — executives, shareholders, fund holders, operatings, industry rank/peers, ETF asset allocation, DCA plans/records, sharelist members, alert groups, index constituents, anomaly/top-movers/rank-list, option-volume daily, US orders and US assets overview (USStockEntry.FullSymbolfull_symbol, crypto entries ← symbol).
  • DELETE semantics: alert.Delete (ids) and sharelist.RemoveSecurities (symbols) now pass params via query string with no request body; sharelist.Delete sends no body.
  • Removed: public counter package, internal/counter (embedded US-ETF/IX/WT CSVs), and QuoteContext.SymbolToCounterIds / ResolveCounterIds (POST /v1/quote/symbol-to-counter-ids no longer called).
  • fundamental.Ratings (GET /v1/quote/ratings) commented out — endpoint 暂不开放.
  • TopMoversResponse.NextParams → plain cursor string; portfolio flows ExecutedTimestamp normalized to string (int/string/null tolerated).

Verification

🤖 Generated with Claude Code

…api #562)

- Request params counter_id/counter_ids/underlying_counter_id -> symbol/symbols,
  sending the user-facing symbol as-is (AAPL.US, HSI.HK, BTCUSD.BKKT)
- Responses read the server's symbol field directly (US assets: stock full_symbol,
  crypto symbol); removed all counter_id -> symbol response conversions
- DELETE endpoints send parameters via query string and no longer send a body
  (alert ids, sharelist symbols; sharelist delete sends no body at all)
- Removed the public counter package, internal/counter and
  QuoteContext.SymbolToCounterIds/ResolveCounterIds (symbol-to-counter-ids
  endpoint is no longer called)
- fundamental.Ratings temporarily disabled (endpoint not yet open)
- TopMoversResponse.NextParams is now a plain cursor string; portfolio flows
  ExecutedTimestamp normalized to string
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