How to use the node-binance-api.prices 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 gmverdon / TradingBot / src / scenes / TradeHub / index.js View on Github external
changeSelectedCrypto = (symbol) => {
    const crypto = this.state.cryptoList.find(obj => obj.symbol === symbol);
    if (crypto === null) return;

    binance.prices((error, ticker) => {
      const currentPrice = parseFloat(ticker[crypto.symbol]);
      this.setState({
        currentPrice,
        sellEnabled: false,
        highestPrice: currentPrice,
      });
    });

    this.setState({
      selectedCrypto: crypto,
    }, () => this.rebindSocket());
  };
github andresilvasantos / bitprophet / exchange_utils.js View on Github external
tokenPrice: function(pairName, next) {
        binance.prices(pairName, (error, ticker) => {
            next(error, ticker[pairName])
        });
    },
    createLimitOrder: function(pairName, sideBuy, price, quantity, next) {