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

Kucoin: Margin sub fix and improvements #1761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Dec 23, 2024

  • Fixes margin-only subscriptions not subscribing to the enabled spot asset pairs, despite there being no enabled spot sub
  • All margin pairs are merged to the spot subscription, if there is one, reducing the number of subscriptions
  • Require/Assert wording fixed in kucoin test

Fixes #1755

Use case

As a GCT user with spot and margin assets enabled, but only margin asset enabled websocket subscriptions, I should still get subscriptions for all the pairs in margin which are also in spot Currently it only works when spot subscriptions are enabled. Otherwise the spot pairs are ignored.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested

  • go test ./... -race
  • golangci-lint run
  • TestGenerateMarginSubscriptions

As a GCT user with spot and margin assets enabled, but only margin asset enabled websocket subscriptions,
I should still get subscriptions for all the pairs in margin which are also in spot
Currently it only works when spot subscriptions are enabled. Otherwise the spot pairs are ignored.

Fixes thrasher-corp#1755
@gbjk gbjk added bug review me This pull request is ready for review labels Dec 23, 2024
@gbjk gbjk self-assigned this Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.34%. Comparing base (50448ec) to head (4402598).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1761      +/-   ##
==========================================
- Coverage   37.37%   37.34%   -0.03%     
==========================================
  Files         415      415              
  Lines      178627   178656      +29     
==========================================
- Hits        66760    66727      -33     
- Misses     104089   104140      +51     
- Partials     7778     7789      +11     
Files with missing lines Coverage Δ
exchanges/kucoin/kucoin_websocket.go 57.44% <100.00%> (+0.93%) ⬆️

... and 17 files with indirect coverage changes

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

Successfully merging this pull request may close these issues.

Kucoin: Margin only-subs don't subscribe to spot pairs
1 participant