Skip to content

feat: add Hyperliquid WebSocket streaming support#100

Closed
user1303836 wants to merge 1 commit intomainfrom
feature/hyperliquid-streaming
Closed

feat: add Hyperliquid WebSocket streaming support#100
user1303836 wants to merge 1 commit intomainfrom
feature/hyperliquid-streaming

Conversation

@user1303836
Copy link
Owner

Summary

Extends the existing Solana-only streaming endpoints (from PR #94) to also support Hyperliquid real-time WebSocket streaming.

  • Multi-chain dispatch in start_stream routes to either SolanaGrpcAdapter or HyperliquidWsClient based on the chain field
  • Hyperliquid streams require a wallet address parameter and validate it before starting
  • Uses mpsc channel to bridge sync WS callbacks into the async batch-flush pipeline (same pattern as Solana gRPC)
  • StreamEntry and StreamInfo now include chain and optional wallet fields
  • list_streams response includes chain/wallet; wallet is omitted when None (solana streams)

Test plan

  • All 214 tests pass (120 API + 60+11 adapter + 18 CLI + 5 core)
  • Clippy clean with -D warnings
  • Cargo fmt clean
  • New tests: HL missing wallet, HL invalid wallet, chain+wallet in list output, StreamInfo serialization with/without wallet
  • Existing streaming tests updated with new chain/wallet fields

Extend the existing Solana-only streaming endpoints to also support
Hyperliquid real-time WebSocket streaming. Multi-chain dispatch in
start_stream routes to either SolanaGrpcAdapter or HyperliquidWsClient
based on the chain field. Hyperliquid streams require a wallet address
and use an mpsc channel to bridge sync WS callbacks into the async
batch-flush pipeline.

Changes:
- Add chain/wallet fields to StreamEntry, StreamInfo, StartStreamRequest
- Dispatch start_stream between solana and hyperliquid chains
- Validate wallet address for hyperliquid streams
- Populate chain/wallet in list_streams response
- Skip wallet serialization when None (solana streams)
- Add tests for HL missing/invalid wallet, chain+wallet in list output
@user1303836
Copy link
Owner Author

Closing per wind-down. Issue #99 tracks this as future work. The implementation here can be referenced when picking it up.

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