kucoin-node-sdk icon indicating copy to clipboard operation
kucoin-node-sdk copied to clipboard

Allow for client instances instead of using global variables

Open kvindascr opened this issue 3 years ago • 1 comments

Is there a reason why the config is a global variable?

This scheme makes it difficult to create different connections, as the config is centralized and there is no way to override it.

It is relatively insecure or at least not ideal to be replacing the config to be able to keep different connections.

I would like to recommend having an approach where you can create a client instance with a configuration and set of parameters.

This will allow the user to create diverse connections on the same node instance if required.

kvindascr avatar May 06 '21 00:05 kvindascr

Upvoted! I have the same request. My app makes multiple connections and replacing the config feels unsafe

DavidKrpt avatar Apr 27 '22 07:04 DavidKrpt