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 mexc #173

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

add mexc #173

wants to merge 5 commits into from

Conversation

calumrussell
Copy link

Adds util for MEXC WS spot data feed.

Feed has change and depth snapshots. I wasn't clear if I need DEPTH_SNAPSHOT_EVENT here or what that event does?

I see that initial_snapshot is an optional argument to the backtest, but I am unclear how the backtest works if I don't provide initial snapshot?

Thank you for your hard work on this.

@nkaz001
Copy link
Owner

nkaz001 commented Jan 14, 2025

If the initial snapshot is not provided, market depth reconstruction relies entirely on natural refresh, where the depth is updated by DEPTH_EVENT starting from an empty book. As a result, it will take some time to reach a certain level of completeness.

Also, DEPTH_CLEAR_EVENT is used to clear all or multiple levels of market depth. To remove a specific level (or update a level to a quantity of 0), use DEPTH_EVENT with a quantity of 0.

@calumrussell
Copy link
Author

I think that fixes, intention is:

  • If the feed has snapshots then we use DEPTH_SNAPSHOT_EVENT to update from these
  • Single levels are cleared when the diff feed updates with zero

@nkaz001
Copy link
Owner

nkaz001 commented Jan 16, 2025

Looks good. By the way, have you checked if the processed data is correct? I wonder if you could upload a small sample file to test with? MEXC and Hyperliquid?

@calumrussell
Copy link
Author

Added examples for both.

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