How to use the node-binance-api.exchangeInfo function in node-binance-api

To help you get started, we’ve selected a few node-binance-api 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 andresilvasantos / bitprophet / exchange_utils.js View on Github external
initExchangeInfo: function(next) {
        binance.exchangeInfo(function(error, data) {
            if(data.symbols) {
                for(var obj of data.symbols ) {
            		var filters = {status: obj.status};
            		for (var filter of obj.filters) {
            			if ( filter.filterType == "MIN_NOTIONAL" ) {
            				filters.minNotional = filter.minNotional;
            			}
                        else if ( filter.filterType == "PRICE_FILTER" ) {
            				filters.minPrice = filter.minPrice;
            				filters.maxPrice = filter.maxPrice;
            				filters.tickSize = filter.tickSize;
            			}
                        else if ( filter.filterType == "LOT_SIZE" ) {
            				filters.stepSize = filter.stepSize;
            				filters.minQty = filter.minQty;
            				filters.maxQty = filter.maxQty;
github bmino / trading-with-trends / src / main / service / MarketDataService.js View on Github external
return new Promise((resolve, reject) => {
        return binance.exchangeInfo((error, data) => {
            if (error) return reject(error);

            let symbols = [];
            let tickers = [];

            data.symbols.map(obj => {
                if (obj.status !== 'TRADING') return;
                symbols.push(obj.baseAsset);
                tickers.push(obj.symbol);
            });

            MarketDataService.tickers = tickers;
            MarketDataService.symbols = symbols.filter((sym, index, self) => {
                return self.indexOf(sym) === index;
            });