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 support for streaming orderbook changes only when the top N asks or bids changed #14

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

shaynevanasperen
Copy link
Contributor

The reason for adding this support is so that a trading bot doesn't need to process orderbook updates that are happening "deep down" in the orderbook. This is because many trading algorithms are only concerned with orderbooks changes that would materially impact it's trading activity.

Most of the time we are only interested in the top few levels of asks/bids as we would be able to fill our market orders without causing much slippage. The intention behind this change is to optimize the resource usage of consuming code so that they don't need to process "frivolous" orderbook updates.

@Marfusios Marfusios self-requested a review June 17, 2024 10:17
Copy link
Owner

@Marfusios Marfusios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks great. Could you write some tests covering this new stream in the following PR?

@Marfusios Marfusios merged commit ca715ed into Marfusios:master Jun 17, 2024
1 of 2 checks passed
@shaynevanasperen shaynevanasperen deleted the stream-top-n-levels branch July 6, 2024 17:57
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