How to use the node.bittrex.api.getticker function in node

To help you get started, we’ve selected a few node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redcap3000 / crypto-socket / index.js View on Github external
bittrexMarketFilter.filter(function(o,i){
            bittrex.getticker( {market :o},function( response ) {
                if(typeof response != 'undefined' && typeof response.Last != 'undefined'){
                    if(typeof bittrexMarketFilterRelation[i] != "undefined"){
                    // for the record :
                        var relation = bittrexMarketFilterRelation[i]
                        if(typeof Exchanges.bittrex[relation] == "undefined"){
                            Exchanges.bittrex[relation] = true
                        }

                        if(typeof  response.Last == "undefined"){
                            return false
                        }

                        if (Exchanges.bittrex[relation] !=  response.Last) {
                            Exchanges.bittrex[relation] =  response['Last'];
                        }
                    }else{
github zjasonshen / BittrexArbitrageBot / arbitrageBot.js View on Github external
const getBidOrAsk = (coinStruct, tradeNum) => {
    bittrex.getticker({market: coinStruct.markets[tradeNum]}, function(data, err) {
        if (err) {
            return console.error(err);
        }

        if (data.success === true) {
            if (tradeNum === 0) {
                let ask = data.result.Ask;
                coinStruct.prices.push(ask);
                getBidOrAsk(coinStruct, 1);
            } else if (tradeNum === 1) {
                let bid = data.result.Bid;
                coinStruct.prices.push(bid);
                getBidOrAsk(coinStruct, 2);

            } else {
                let bid = data.result.Bid;
github kevinflo / twitchplayscrypto / app / routes / api.js View on Github external
bittrex.getmarketsummaries(function(data, err) {
        if (err) {
            return console.error(err);
        }
        var tickers = []
        for (var i in data.result) {
            bittrex.getticker({ market: data.result[i].MarketName }, function(ticker) {
                tickers.push(ticker)

                if (tickers.length === Object.keys(data.result).length) {
                    res.json(tickers)
                }
            });
        }
    });
});
github DOKKA / bttrxr / lib / bittrex-promise.js View on Github external
return new Promise(function(resolve, reject){
        bittrex.getticker({market: currencyPair},function(response){
            if(response.error){
                reject(response.error);
            } else {
                resolve(response.result);
            }
        });
    });
}