Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hyperliquid #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

calumrussell
Copy link

Adds util for Hyperliquid WS data feed.

Feed only has trades and depth snapshots so I am using DiffOrderBookSnapshot to reconcile (mentioned in the other PR but I was unclear if I could use DEPTH_SNAPSHOT_EVENT here). Is this correct?

And the purpose of this is to give an accurate queue position?

Thank you for your hard work on this.

@nkaz001
Copy link
Owner

nkaz001 commented Jan 14, 2025

Thank for your contribution. If the exchange provides only market depth snapshot, the first snapshot l2book is flagged as DEPTH_SNAPSHOT_EVENT and subsequent snapshots are processed by DiffOrderBookSnapshot to generate deltas flagged as DEPTH_EVENT. DiffOrderBookSnapshot instance should persist throughout the loop and it's better to pass the tick size and the lot size from the function arguments rather than using constants.

Yes, correct. it's for queue position estimation.

@calumrussell
Copy link
Author

Waits until first l2Book channel event, loads as DEPTH_SNAPSHOT_EVENT, subsequent events are loaded using DiffOrderBookSnapshot.

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.

2 participants