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

[FEATURE]: support binance futures orderbook depth buffer #1902

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anywhy
Copy link
Contributor

@anywhy anywhy commented Feb 12, 2025

No description provided.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 23.22%. Comparing base (adb17a5) to head (6b709e5).
Report is 77 commits behind head on main.

Files with missing lines Patch % Lines
pkg/exchange/binance/parse.go 0.00% 6 Missing ⚠️
pkg/exchange/binance/stream.go 0.00% 4 Missing ⚠️
pkg/exchange/binance/futures.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1902      +/-   ##
==========================================
- Coverage   23.40%   23.22%   -0.18%     
==========================================
  Files         648      657       +9     
  Lines       49010    49528     +518     
==========================================
+ Hits        11469    11504      +35     
- Misses      36693    37173     +480     
- Partials      848      851       +3     
Files with missing lines Coverage Δ
pkg/exchange/binance/exchange.go 5.31% <ø> (-0.18%) ⬇️
pkg/exchange/binance/futures.go 0.00% <0.00%> (ø)
pkg/exchange/binance/stream.go 0.00% <0.00%> (ø)
pkg/exchange/binance/parse.go 19.53% <0.00%> (-0.06%) ⬇️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 022161d...6b709e5. Read the comment docs.

// skip old events
if u.FinalUpdateID <= finalUpdateID {
continue
if b.isFutures {
Copy link
Owner

Choose a reason for hiding this comment

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

what's the difference between futures and non-futures?

}
if u.FirstUpdateID <= finalUpdateID && u.FinalUpdateID >= finalUpdateID {
pushUpdates = append(pushUpdates, u)
}
Copy link
Owner

Choose a reason for hiding this comment

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

I think this logic is the same as non-futures? it's just reversed ?

Copy link
Owner

Choose a reason for hiding this comment

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

And the field PreviousUpdateID is not used here?

Copy link
Contributor Author

@anywhy anywhy Feb 15, 2025

Choose a reason for hiding this comment

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

I see, it's indeed the same logic. I'll merge it.

@anywhy anywhy force-pushed the futures_depth_buffer branch from 2691d3d to 6b709e5 Compare February 15, 2025 09:32
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