-
Notifications
You must be signed in to change notification settings - Fork 804
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: Add subscription templating and various fixes #1579
Kucoin: Add subscription templating and various fixes #1579
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1579 +/- ##
==========================================
- Coverage 38.20% 36.32% -1.89%
==========================================
Files 421 422 +1
Lines 152345 183014 +30669
==========================================
+ Hits 58204 66480 +8276
- Misses 86072 108483 +22411
+ Partials 8069 8051 -18
|
7754e57
to
c969696
Compare
f45a386
to
7718f2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, nothing really jumps out, just some things I noticed and there are some ci errors that need to be resolved. 🔥
52f9f16
to
bd970c0
Compare
Tests fixed. Can't and shouldn't cache a compiled template closuring anything on Kucoin itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great just some minor niggles, tested websocket.
9c56aab
to
d3d2fa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK! Nice work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ch ack
Now only the assetPairs relevant to the subscription are in the context
We want to trim before checking for "AssetSeparator vs All" because a template should be allowed to reuse a range template and generate just one trailing AssetSeparator whilst using a specific Asset
Turns out that contary to the documentation, kucoin supports batching of all symbols and currencies
This reduces the complexity of error checking to just be "do we get the correct numbers". Fixes Asset.All with only one asset erroring on xpandPairs, because we trimmed the only asset separator, and then errored that we're not xpanding Assets and the asset on the sub is asset.All This use-case conflicted with commit 6bbd546, which required: ``` Subscriptions: Trim AssetSeparator early We want to trim before checking for "AssetSeparator vs All" because a template should be allowed to reuse a range template and generate just one trailing AssetSeparator whilst using a specific Asset ``` Now we set up the assets earlier, and we remove the check for xpandAssets, since the number of asset lines matching is all that matters. I've removed the asset tests for this, but they were correctly erroring on the number of asset lines instead. Everything hits coverage, as well.
01a9f9f
to
82c5a54
Compare
Squashed down for final review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor nit on the introduction of the new Batch helper. It makes a pre-existing helper func obsolete.
Tests, functionality for Kucoin and config uprade all worked well. Nice stuff! Appreciate the strings.HasPrefix improvement as well on the websocket handling topic info!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes
Kucoin
Subscription Templates
BatchSize
support$.AssetPairs
only receives relevant assets for the subscriptionCommon
Batch
andSort
to commonpairs.Remove
common.SortStrings
pairs.Add
andpairs.Remove
Stacked Dependencies
Type of change
How has this been tested