Skip to content

chore: Market Insights - update service and type#8263

Open
zone-live wants to merge 6 commits intomainfrom
TSA-update-digest-parameter-and-add-perpsAssetId
Open

chore: Market Insights - update service and type#8263
zone-live wants to merge 6 commits intomainfrom
TSA-update-digest-parameter-and-add-perpsAssetId

Conversation

@zone-live
Copy link
Contributor

@zone-live zone-live commented Mar 20, 2026

Explanation

Fix searchDigest response parsing, the /asset-summary API changed its envelope key from digest to summary. Replaced MarketInsightsDigestEnvelopeStruct with MarketInsightsSummaryEnvelopeStruct so market insights reports are correctly unwrapped.
Adds perpsAssetId to RelatedAsset, new field for resolving Perps icon URLs on the client (supersedes the deprecated hlPerpsMarket).

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Updates client/server contract for the asset-summary call (query param and response envelope), which could break market-insights fetching if the backend or consumers are out of sync. Changes are localized to AiDigestService/types/tests with minimal behavioral surface area beyond the API integration.

Overview
Aligns Market Insights API integration with updated /asset-summary contract. AiDigestService.searchDigest now always calls /asset-summary?asset=<identifier> (removing CAIP-19 vs perps param branching) and the related tests/changelog are updated accordingly.

Fixes response unwrapping for the new envelope shape. Market insights parsing now accepts { summary: MarketInsightsReport } instead of { digest: ... }, and types/docs clarify that RelatedAsset.hlPerpsMarket can represent any HyperLiquid market identifier (including synthetic perps like xyz:TSLA).

Written by Cursor Bugbot for commit 37574b3. This will update automatically on new commits. Configure here.

@zone-live zone-live requested review from a team as code owners March 20, 2026 14:56
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