Skip to content

Conversation

@Shadowstep33
Copy link
Contributor

@Shadowstep33 Shadowstep33 commented Apr 17, 2021

Description

I found that I could realistically only keep one websocket open as the topic was not unique enough so now using wsKey which has topic+symbol

Changes

  • bug fix for older versions of js: adds const to function declarations missing a var|const|let
  • adds Socket.getSocketDictKey which is unique topic key for ws by symbol
  • use /endpoint for ws because wasn't working otherwise (API updates?)
  • send "ping" explicitly to ws for heartbeat (might not be needed but was having issues w/ ws staying open)

Notes

  • Added /endpoint as the kucoin websocket api randomly stopped working for me. This is what I'm using locally and is working fine but maybe an original author can comment as why it worked for me and what I may have done wrong that necessitated making the change in the first.
  • Changes have NOT been tested after I rebased in with master

@Shadowstep33
Copy link
Contributor Author

@escwdev

@escwdev
Copy link
Owner

escwdev commented Apr 18, 2021

So I'm going to review this and hold off for just right now. A new semver will be required by early May to incorporate the new signing method required for Kucoin's private endpoints.

Since that is a breaking change and this also would break some backend code that relies on the current websocket setup, I'll save it for the bigger update if everything looks/tests smoothly.

}

getPrivateWsToken = async function(baseURL, sign) {
const getPrivateWsToken = async function(baseURL, sign) {

Choose a reason for hiding this comment

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

15

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what this means :)

@Shadowstep33
Copy link
Contributor Author

Hi @escwdev just wanted to ping on this :)

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.

3 participants