feat: add Hyperliquid WebSocket and Solana gRPC streaming endpoints#98
Closed
user1303836 wants to merge 1 commit intomainfrom
Closed
feat: add Hyperliquid WebSocket and Solana gRPC streaming endpoints#98user1303836 wants to merge 1 commit intomainfrom
user1303836 wants to merge 1 commit intomainfrom
Conversation
…upport
Add real-time streaming infrastructure to the API with three new
endpoints: POST /v1/stream/start, POST /v1/stream/{id}/stop, and
GET /v1/streams. Streams ingest transactions in batches (100 items or
5-second interval) using CancellationToken for lifecycle management
and semaphore-based concurrency limiting (max 5 concurrent streams).
Hyperliquid streaming uses the existing HyperliquidWsClient to subscribe
to user fills, fundings, and ledger updates via WebSocket. Solana
streaming uses the existing SolanaGrpcAdapter via Yellowstone gRPC.
Also adds solana_grpc_url/solana_grpc_token config fields and
Clone derive on Repository for spawned task usage.
Owner
Author
|
Closing: PR #94 already merged Solana gRPC streaming with the shared stream infrastructure. This PR's Hyperliquid WS streaming additions conflict with that merged code. Filed as a future enhancement issue instead. |
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
POST /v1/stream/start,POST /v1/stream/{stream_id}/stop,GET /v1/streamsHyperliquidWsClient(subscribes to userFills, userFundings, userNonFundingLedgerUpdates)SolanaGrpcAdapter(Yellowstone)solana_grpc_urlandsolana_grpc_tokenconfig fieldsClonederive onRepositoryfor spawned task usageChanged files
api/src/main.rs- streaming handlers, routes, StreamEntry/StreamInfo structs, run_hyperliquid_stream, run_solana_stream, testsapi/Cargo.toml- add tokio-util, chrono dependenciescore/src/config.rs- add solana_grpc_url, solana_grpc_token fieldsadapters/src/repo.rs- add#[derive(Clone)]to RepositoryTest plan
cargo test)cargo clippy -- -D warningscleancargo fmt -- --checkcleansolana_grpc_urlconfigured)