Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

Add exchange GMO Coin #247

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

Conversation

tequdev
Copy link

@tequdev tequdev commented Jan 8, 2021

@tequdev
Copy link
Author

tequdev commented Jan 9, 2021

some bug exists
This exchange only allow only one channnel to one websoket connection

this PR cannot process this now

【FIXED】

Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

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

Thanks for submitting the issue and PR, much appreciated! Overall things look pretty clean, nicely done!

The two concerns in the client itself are why the BasicMultiClient is being used and that rate limiting isn't added to the client. From looking at the documentation, I think once rate limiting is added you can simplify the code and just use the BasicClient implementation instead of BasicMultiClient.

__tests__/exchanges/gmocoin-client.spec.js Outdated Show resolved Hide resolved
__tests__/exchanges/gmocoin-client.spec.js Outdated Show resolved Hide resolved
src/exchanges/gmocoin-client.js Outdated Show resolved Hide resolved
src/exchanges/gmocoin-client.js Show resolved Hide resolved
@bmancini55 bmancini55 linked an issue Jan 10, 2021 that may be closed by this pull request
@tequdev
Copy link
Author

tequdev commented Jan 11, 2021

Thank you for advice.
I fixed it .

Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

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

@develoQ thanks for making the requested changes!

A few things still need to be fixed:

  • you need to use the _send method where you using this._wss.send throughout the client
  • you need to override _onClosing and clean up the rate limiter function. The contributing guide mentions it but it's not clear what that means.

If you could be so kind as to add some commenting for future developers at the class level (link to documentation for the API, what channels are supported, rate limiting for the exchange, etc) as well as sample JSON parsed in the _construct* methods.

Thanks!

src/exchanges/gmocoin-client.js Outdated Show resolved Hide resolved
src/exchanges/gmocoin-client.js Outdated Show resolved Hide resolved
const Level2Point = require("../level2-point");
const Level2Snapshot = require("../level2-snapshot");
const moment = require("moment");

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a class level comment that points to the documentation and indicates that types of subscriptions that are available to the client?

src/exchanges/gmocoin-client.js Show resolved Hide resolved
src/exchanges/gmocoin-client.js Show resolved Hide resolved
src/exchanges/gmocoin-client.js Show resolved Hide resolved
src/exchanges/gmocoin-client.js Show resolved Hide resolved
Copy link
Member

@bmancini55 bmancini55 left a comment

Choose a reason for hiding this comment

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

@develoQ, much thanks for making the changes! One minor fix and should be good to merge.

}

_onClosing() {
this._sendMessage.cancel();
Copy link
Member

Choose a reason for hiding this comment

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

This should be this._send.cancel(); since that's what your method is called.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add exchange GMO Coin
2 participants