npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@clubinvestbr/binance-min-amount

v0.0.20

Published

This module was created to format the values in case there is a need to avoid LOT_SIZE errors due to the formatting of the quantity field. Then we create the formatMinAmount function, you can also capture the minimum value to make the order in the quantit

Downloads

21

Readme

Binance Min Amount

This module was created to format the values in case there is a need to avoid LOT_SIZE errors due to the formatting of the quantity field. Then we create the formatMinAmount function, you can also capture the minimum value to make the order in the quantity field that is the function getMinAmount, this will avoid simple problems and no more LOT_SIZE will occur.

Installation

NPM
npm install @clubinvestbr/binance-min-amount --save
YARN
yarn add @clubinvestbr/binance-min-amount

Getting started

formatMinAmount
const { formatMinAmount } = require('@clubinvestbr/binance-min-amount');

await formatMinAmount(0.11100000, "ETHBTC");
// "0.111"

await formatMinAmount(5.11100000, "ETHBTC");
// "5.111"
getMinAmount
const { getMinAmount } = require('@clubinvestbr/binance-min-amount');

await getMinAmount("ETHBTC");
// "0.001"

Test

$ ./node_modules/.bin/jest
 PASS  src/index.test.js
  ✓ should format the value 0.001 in pair ADABTC to 0 (6ms)
  ✓ should format the value 5.000 in pair ADABTC to 5
  ✓ should format the value 1 in pair ADABTC to 1 (1ms)
  ✓ should format the value 500.00 in pair ADABTC to 500
  ✓ should format the value 0.00000000 in pair ADABTC to 0 (1ms)
  ✓ should format the value 3.000 in pair EOSETH to 3
  ✓ should format the value 0.010 in pair BCCETH to 0.01
  ✓ should format the value 0.020 in pair BCCETH to 0.02 (1ms)
  ✓ should format the value 10 in pair BCCETH to 10
  ✓ should format the value 0.00179 in pair BCCBNB to 0.00179 (1ms)
  ✓ should format the value 0.00179000 in pair BCCBNB to 0.00179
  ✓ should format the value 0.99 in pair AEETH to 0.99
  ✓ should format the value 0.999 in pair AEETH to 0.99 (1ms)
  ✓ should format the value 0.9 in pair AEETH to 0.9
  ✓ should format the value 0.90000000 in pair AEETH to 0.9
  ✓ should format the value 1.103 in pair ZENBNB to 1.103 (1ms)
  ✓ should format the value 0.103 in pair ZENBNB to 0.103
  ✓ should format the value 0.10300 in pair ZENBNB to 0.103
  ✓ should show the minQty value of the symbol ADABTC
  ✓ should show the minQty value of the symbol EOSETH (1ms)
  ✓ should show the minQty value of the symbol BCCETH
  ✓ should show the minQty value of the symbol BCCBNB
  ✓ should show the minQty value of the symbol AEETH
  ✓ should show the minQty value of the symbol ZENBNB (1ms)