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

"Key/Secret Pair Failed", but key+secret is correct #34

Open
freeideas opened this issue May 22, 2018 · 6 comments
Open

"Key/Secret Pair Failed", but key+secret is correct #34

freeideas opened this issue May 22, 2018 · 6 comments

Comments

@freeideas
Copy link

// Using the provided example code (which worked for me last week),
// this results in "Key/Secret Pair Failed".
// Anyone else having this problem, or is it just me?

// (Yes, I have included a real key/secret, but it is to a new trial account with no exchange keys.
// But I get the same error with my paid subscription account. And coinigy support hasn't
// answered my ticket yet, after almost 4 days)

var socketCluster = require('socketcluster-client');

var api_credentials =
{
"apiKey" : "77c6ba0a9f264d497fef1fd298719dce",
"apiSecret" : "e4759419caae402dfc5930ff1c23e065"
}

var options = {
hostname : "sc-02.coinigy.com",
port : "443",
secure : "true"
};

console.log(options);
var SCsocket = socketCluster.connect(options);

SCsocket.on('connect', function (status) {

console.log(status);

SCsocket.on('error', function (err) {
    console.log(err);
});


SCsocket.emit("auth", api_credentials, function (err, token) {

    if (!err && token) {

        var scChannel = SCsocket.subscribe("TRADE-OK--BTC--CNY");
        console.log(scChannel);
        scChannel.watch(function (data) {
            console.log(data);
        });

        SCsocket.emit("exchanges", null, function (err, data) {
            if (!err) {
                console.log(data);
            } else {
                console.log(err)
            }
        });


        SCsocket.emit("channels", "OK", function (err, data) {
            if (!err) {
                console.log(data);
            } else {
                console.log(err)
            }
        });
    } else {
        console.log(err)
    }
});

});

@robborden
Copy link
Contributor

The websocket API is currently disabled due to excessive load being placed on the platform by people using the API improperly in order to bypass channel-limit restrictions. We've been forced to temporarily suspend the service until we're able to implement a way to prevent people from abusing it and causing issues with the platform. We expect it to be back online within the next couple of weeks.

@sacOO7
Copy link

sacOO7 commented Jun 25, 2018

Hi @robborden any updates on this?

@robborden
Copy link
Contributor

robborden commented Jun 25, 2018

Hi, thanks for asking. The websocket API is available again, however you must be a Coinigy CryptoFeed subscriber to access it now. You may upgrade your subscription here: https://www.coinigy.com/subscription/renew

@sacOO7
Copy link

sacOO7 commented Jun 26, 2018

Hi @robborden, I am currently the main author of all socketcluster clients. I am planning to write sample code in every language [ Java, Python, Golang, Swift, DotNet, C, Ruby (coming up...)] to create connection with coinigy api. I will probably host it on github gists. Sample python code can be found here https://gist.github.com/sacOO7/3a0040b1e7e53a5c68d37a3347fafde2. There are plenty of developers currently asking for way to connect to coinigy websocket server-api. I think it will be really helpful for them to basic idea to use the api. I am not sure if I need to purchase subscription with coinigy to test all those codes. But it will be helpful if you can provide any guest credentials that will be helpful for testing... (If you can ....). My gittter id is https://gitter.im/sacOO7. Also, if you need any official support for clients, we can talk about it 👍 .

@sacOO7
Copy link

sacOO7 commented Jun 27, 2018

Hi @robborden , any updates on above?

@sacOO7
Copy link

sacOO7 commented Jul 16, 2018

HI @freeideas , you can find java code here
https://gist.github.com/sacOO7/a3fc817dfc5c85cf21ec96f09869fdfc

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

No branches or pull requests

3 participants