How to use the node-binance-api.roundStep 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
normalizeAmount: function(pair, amount, price) {
        // Set minimum order amount with minQty
        if ( amount < vars.pairsInfo[pair].filters.minQty ) amount = vars.pairsInfo[pair].filters.minQty;
        // Set minimum order amount with minNotional
        if (price && price * amount < vars.pairsInfo[pair].filters.minNotional ) {
            amount = vars.pairsInfo[pair].filters.minNotional / price;
        }
        // Round to stepSize
        return binance.roundStep(amount, vars.pairsInfo[pair].filters.stepSize);
    },
    fixPrice: function(pair, price) {