fix: Perps rate limit hotfix cp-7.63.0#25472
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Please don't merge until @abretonc7s has given an approval |
app/components/UI/Perps/Views/PerpsMarketDetailsView/PerpsMarketDetailsView.test.tsx
Show resolved
Hide resolved
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.63.0) All E2E tests pre-selected. |
app/components/UI/Perps/Views/PerpsMarketDetailsView/PerpsMarketDetailsView.tsx
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/7.63.0 #25472 +/- ##
=================================================
Coverage ? 75.33%
=================================================
Files ? 4246
Lines ? 109315
Branches ? 22872
=================================================
Hits ? 82354
Misses ? 21015
Partials ? 5946 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
No release label on PR. Adding release label release-7.63.0 on PR, as PR was added to branch 7.63.0 when release was cut. |


Description
Includes two sets of fixes that improve 429 errors during Perps transactions. They were already merged to main, and have been included in a hotfix to 7.62.2 here: #25443
Changelog
CHANGELOG entry: hotfix to improve 429 error handling in Perps
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches Perps order/position management and provider networking behavior (cache-vs-REST fallbacks), which can affect trade execution flows and data freshness. Changes are mitigated by added validation, staleness checks, and expanded unit tests, but still warrant careful review in production-like conditions.
Overview
Reduces Perps 429s by shifting several read paths to cache-first WebSocket data with REST fallback: adds
getOrFetchFills(provider + aggregated provider) and introduces atomic cache getters for orders/fills/prices inHyperLiquidSubscriptionService.Updates
HyperLiquidProviderto centralize price retrieval (getOrFetchPricewith validity checks), prefer live WebSocket positions forupdatePositionTPSL/closePosition, and avoid multi-DEX REST queries when canceling TP/SL orders (use cached orders or single-DEX fallback).Refactors stop-loss prompt handling:
useHasExistingPositionnow returnspositionOpenedTimestamp(WS fills + REST fallback) andPerpsMarketDetailsViewadds staleness/closure-safety refs so banner TP/SL updates don’t misapply after market/position changes; the banner UI switches from a toggle to a Set button with success checkmark + delayed fade-out. Also improves order flow UX by surfacing a toast when post-order TP/SL updates fail.Written by Cursor Bugbot for commit 060868b. This will update automatically on new commits. Configure here.