feat(hermes-server) Add ignore_invalid_price_ids
flag to hermes ws endpoint
#2599
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
Add a new flag
ignore_invalid_price_ids
to WebSocket subscriptions that enables partial subscriptions when some price IDs are invalid. When enabled, Hermes will establish the WebSocket connection and stream updates only for the valid price IDs while silently ignoring any invalid ones. This enhancement aligns the WebSocket API behaviour with the existing REST API functionality introduced in #2091.Rationale
This change simplifies integration for clients who need to subscribe to multiple price feeds but don't require all of them to be valid. Current workarounds are suboptimal:
The new flag provides a more efficient solution by allowing clients to subscribe to all desired price feeds in a single request while gracefully handling any invalid IDs. This reduces implementation complexity for clients and improves connection efficiency by eliminating the need for multiple subscription attempts or error handling logic.
How has this been tested?