Coinigy / api

Coinigy API Examples
161 stars 65 forks source link

Ticker is not working in javascript socket #25

Open DaniyalGeek opened 6 years ago

DaniyalGeek commented 6 years ago

TRADE and ORDER is working perfeclty

var socketCluster = require('socketcluster-client'); var api_credentials = { "apiKey" : "KEY", "apiSecret" : "SECRET" }

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

console.log(options); var SCsocket = socketCluster.connect(options); // Once connected, authenticate with credentials SCsocket.on('connect', function (status) { SCsocket.emit("auth", api_credentials, function (err, token) {

    if (!err && token) {            
        // Subscribe to Bittrex Ethereum/Bitcoin market's live websocket trade feed
        var scChannel = SCsocket.subscribe("TICKER");

        scChannel.watch(function (data) {
            // log output as new messages stream in
            console.log(data);
        });                
    } else {

        console.log(err);       
    }      
});   

}); // Catch and log any error messages SCsocket.on('error', function (status) { console.log(status); });

RonWalker22 commented 6 years ago

@DaniyalGeek Did you find a solution?

robborden commented 6 years ago

Hi guys, please see the following blog post: https://blog.coinigy.com/2017/07/cryptoticker-updated-ticker-websocket-channel-to-be-deprecated/

There is a new way to subscribe to your personal ticker.