gocryptotrader
gocryptotrader copied to clipboard
Kucoin: Changes default subscription channel for tickers and orderbooks
PR Description
- ~~There was a lag process involving numerous outbound subscriptions, this helps alleviate that by batching calls [spot only]~~ This was done in a PR that was merged first and it was much better than this. 🚀
- ~~This also brings subscription errors to the surface~~ Not needed anymore
- Changes default subscription channel for spot tickers
marketTickerChannel
tomarketAllTickersChannel
as this is counted as one subscription and allows more potential subscriptions to occur for orderbooks. - Changes default subscription channel for spot orderbooks
marketOrderbookLevel2Channels
tomarketOrderbookLevel2to5Channel
so as to not send subsequent REST requests to build books. This has a limitation of not being real time (ms latency not defined anyway) to 100ms. - optimise
listOfAssetsCurrencyPairEnabledFor
and refactor caller usage - Fix handling of orderbook depth 5 && 20 orderbook snapshots (REST request not needed)
- Fixes issue where there is a deadlock when there is a slow subscriber when all pairs enabled. 211aa6f
Notes:
- ~~This is only for SPOT~~
- There is a subscription limit per connection at ~300
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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/AppVeyor with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
I shall mergerino
Codecov Report
Attention: Patch coverage is 57.33333%
with 64 lines
in your changes are missing coverage. Please review.
Project coverage is 35.86%. Comparing base (
954aa02
) to head (023e150
).
Additional details and impacted files
@@ Coverage Diff @@
## master #1371 +/- ##
==========================================
- Coverage 35.87% 35.86% -0.01%
==========================================
Files 411 411
Lines 177444 177488 +44
==========================================
+ Hits 63651 63661 +10
- Misses 106029 106048 +19
- Partials 7764 7779 +15
Files | Coverage Δ | |
---|---|---|
exchanges/gateio/gateio_wrapper.go | 38.67% <ø> (+0.05%) |
:arrow_up: |
exchanges/kucoin/kucoin_futures.go | 23.25% <100.00%> (-0.14%) |
:arrow_down: |
exchanges/kucoin/kucoin_types.go | 60.86% <ø> (ø) |
|
engine/websocketroutine_manager.go | 51.96% <0.00%> (ø) |
|
exchanges/kucoin/kucoin_wrapper.go | 34.95% <82.35%> (+0.04%) |
:arrow_up: |
exchanges/kucoin/kucoin_websocket.go | 54.26% <51.63%> (-2.49%) |
:arrow_down: |