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

exchanges: abstract websocket/REST orderbook initial update code from wrapper to exchanges package. #1481

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

Conversation

shazbert
Copy link
Collaborator

PR Description

  • Abstracts majority of code that handles initial snapshot updates fetched via REST
  • Consolidates changes to Binance only for review+testing before all exchange conversion
  • Considered putting everything under the hood in stream package; but this is easy for first demonstration. Eventually will consolidate a lot of duplicated code.

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.

  • go test ./... -race
  • golangci-lint run
  • Test X

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally and on Github Actions with my changes
  • Any dependent changes have been merged and published in downstream modules

@shazbert shazbert added help wanted review me This pull request is ready for review labels Feb 14, 2024
@shazbert shazbert requested a review from a team February 14, 2024 23:04
@shazbert shazbert self-assigned this Feb 14, 2024
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: Patch coverage is 73.60595% with 71 lines in your changes are missing coverage. Please review.

Project coverage is 35.88%. Comparing base (4cd4fb0) to head (0f4be56).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1481      +/-   ##
==========================================
- Coverage   37.80%   35.88%   -1.92%     
==========================================
  Files         409      411       +2     
  Lines      147712   177260   +29548     
==========================================
+ Hits        55841    63616    +7775     
- Misses      84005   105792   +21787     
+ Partials     7866     7852      -14     
Files Coverage Δ
exchanges/binance/binance.go 45.19% <ø> (-3.13%) ⬇️
exchanges/binanceus/binanceus_websocket.go 43.94% <100.00%> (-3.32%) ⬇️
exchanges/btcmarkets/btcmarkets_websocket.go 39.63% <100.00%> (-3.76%) ⬇️
exchanges/bybit/bybit_websocket.go 46.81% <100.00%> (-3.99%) ⬇️
exchanges/coinut/coinut_websocket.go 25.79% <100.00%> (-2.18%) ⬇️
exchanges/hitbtc/hitbtc_websocket.go 25.42% <100.00%> (-2.84%) ⬇️
exchanges/kucoin/kucoin_websocket.go 54.26% <100.00%> (-4.32%) ⬇️
exchanges/orderbook/depth.go 100.00% <100.00%> (ø)
exchanges/poloniex/poloniex_websocket.go 50.79% <100.00%> (-3.26%) ⬇️
exchanges/stream/buffer/buffer.go 65.93% <100.00%> (-3.34%) ⬇️
... and 3 more

... and 377 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant