How to use the node.bittrex.api.getmarketsummaries 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 kevinflo / twitchplayscrypto / app / server.js View on Github external
function buildAcceptableSymbolsList() {
    bittrex.getmarketsummaries(function(marketData, err) {
        marketData.result.forEach(function(market) {
            if (
                market.MarketName &&
                market.MarketName.indexOf("BTC-") === 0
            ) {
                var symbol = market.MarketName.split("BTC-")[1];
                if (symbol && symbol.toLowerCase) {
                    acceptableSymbolsList.push(symbol.toLowerCase());
                }

            }
        });
    });
}
github kevinflo / twitchplayscrypto / app / routes / api.js View on Github external
router.get('/tickers', function(req, res, next) {
    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.getmarketsummaries(function(data){
            if(data.error){
                reject(data.error);
            } else {
                resolve(data.result);
            }
        });
    });
}