How to use the node-bitstamp.CURRENCY.ETH_EUR function in node-bitstamp

To help you get started, we’ve selected a few node-bitstamp 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 krystianity / coinpusher / lib / Coinpusher.js View on Github external
[CURRENCY.BTC_EUR]: {
        predict: trades => { //before prediction (is called)
            return TRADES_TO_ROW(trades, BTC_EUR_FACTOR);
        },
        main: row => { //before training (is mapped)
           // const trades = row.x.slice(0);
            row.x = TRADES_TO_ROW(row.x, BTC_EUR_FACTOR);
            row.y = TRADES_TO_ROW_OUTPUT(row.y, ETL_FACTOR);
            return row;
        },
        alter: (outputs, tradeForPrediction) => { //after prediction (is called)
            return OUTPUT_TO_TRADE_PRICES(outputs, ETL_FACTOR, tradeForPrediction);
        }
    },

    [CURRENCY.ETH_EUR]: {
        predict: trades => { //before prediction (is called)
            return TRADES_TO_ROW(trades, ETH_EUR_FACTOR);
        },
        main: row => { //before training (is mapped)
           // const trades = row.x.slice(0);
            row.x = TRADES_TO_ROW(row.x, ETH_EUR_FACTOR);
            row.y = TRADES_TO_ROW_OUTPUT(row.y, ETL_FACTOR);
            return row;
        },
        alter: (outputs, tradeForPrediction) => { //after prediction (is called)
            return OUTPUT_TO_TRADE_PRICES(outputs, ETL_FACTOR, tradeForPrediction);
        }
    },

    [CURRENCY.LTC_EUR]: {
        predict: trades => { //before prediction (is called)
github krystianity / coinpusher / lib / Coinpusher.js View on Github external
startForEthereum(){
        return this.start(CURRENCY.ETH_EUR, 3334);
    }
github krystianity / coinpusher / lib / Coinstream.js View on Github external
constructor(opts = {}){
        super();

        const {
            currency,
            step,
            streamDir,
            tickerStream
        } = opts;

        this.currency = currency || CURRENCY.ETH_EUR;
        this.step = step || 20;
        this.streamDir = streamDir || path.join(__dirname, "./../streams");
        this.tickerStream = tickerStream;

        this.collected = [];
        this.dataset = null; //TODO dont hold the full dataset in memory
        this.stream = null;
        this.lastTrade = null;
        this._intv = null;
    }

node-bitstamp

bitstamp rest and websocket v1 and v2 api client

MIT
Latest version published 4 years ago

Package Health Score

42 / 100
Full package analysis