fix: Hyperliquid array parser, Aevo wrong channel, add ping keepalive#4
Merged
fix: Hyperliquid array parser, Aevo wrong channel, add ping keepalive#4
Conversation
- Hyperliquid trades channel sends data as array, not single object. Parser now iterates the array so liquidations are actually captured. - Aevo subscription changed from orderbook:BTC-PERP to trades:BTC-PERP. Orderbook channel never carries trade/liquidation data. - Added configurable ping keepalive (30s) for Hyperliquid to prevent silent connection drops during quiet markets. - Fixed ID collision risk by adding random suffix to Hyperliquid IDs. - Parse errors now logged via console.debug instead of silently swallowed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes critical bugs found during code review that caused Hyperliquid and Aevo liquidations to be silently dropped.
dataas an array of trade objects, not a single object. The old parser accessedmsg.data.liquidationon the array itself, which was alwaysundefined— zero Hyperliquid liquidations were ever captured. Now iterates the array correctly.orderbook:BTC-PERPwhich delivers order book snapshots, not trades. Changed totrades:BTC-PERPwhich carries theis_liquidationflag the parser expects.{ method: 'ping' }every 30s to prevent silent connection drops during quiet markets (~60s idle timeout).console.debuginstead of silently swallowed.Test plan
parse errordebug logs (should be minimal)🤖 Generated with Claude Code