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

binance-withdrawal

v1.1.5

Published

A Binance client for withdrawing fund to non-custodial wallet

Downloads

21

Readme

Binance Withdrawal

A library that let you withdraw funds from Binance through simple API.

Features:

  • Retrieves tokens in your account.
  • Withdraw tokens from your account to non-custodial wallet.

Installation

npm install binance-withdrawal

Prerequisite

  1. Create apiKey and apiSecret here

  2. Copy apiKey and apiSecret to secure place.

  3. Check on Enable Withdrawal box.

  4. Change IP access restriction to Restrict access to trusted IPs only (Recommended)

  5. Enter your client IP address. (Recommend the client to use personal hosted VPN to make sure the ip address will always be the same.)

Note you cannot use this library on the device that doesn't have IP address on the list.

Usage

Get all withdrawable tokens in your account

const binance = new Binance('https://api.binance.com', 'YOUR_API_KEY', 'YOUR_API_SECRET')

const tokens = await binance.getWithdrawableTokens()
[
    {
        "coin": "BTC",
        "depositAllEnable": true,
        "free": "0.08074558",
        "freeze": "0.00000000",
        "ipoable": "0.00000000",
        "ipoing": "0.00000000",
        "isLegalMoney": false,
        "locked": "0.00000000",
        "name": "Bitcoin",
        "networkList": [
            {
                "addressRegex": "^(bnb1)[0-9a-z]{38}$",
                "coin": "BTC",
                "depositDesc": "Wallet Maintenance, Deposit Suspended",
                "depositEnable": false,
                "isDefault": false,
                "memoRegex": "^[0-9A-Za-z\\-_]{1,120}$",
                "minConfirm": 1,
                "name": "BEP2",
                "network": "BNB",
                "resetAddressStatus": false,
                "specialTips": "Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.",
                "unLockConfirm": 0,
                "withdrawDesc": "Wallet Maintenance, Withdrawal Suspended",
                "withdrawEnable": false,
                "withdrawFee": "0.00000220",
                "withdrawMin": "0.00000440"
            },
            {
                "addressRegex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$",
                "coin": "BTC",
                "depositEnable": true,
                "insertTime": 1563532929000,
                "isDefault": true,
                "memoRegex": "",
                "minConfirm": 1,
                "name": "BTC",
                "network": "BTC",
                "resetAddressStatus": false,
                "specialTips": "",
                "unLockConfirm": 2,
                "updateTime": 1571014804000,
                "withdrawEnable": true,
                "withdrawFee": "0.00050000",
                "withdrawIntegerMultiple": "0.00000001",
                "withdrawMin": "0.00100000"
            }
        ],
        "storage": "0.00000000",
        "trading": true,
        "withdrawAllEnable": true,
        "withdrawing": "0.00000000"
    }
]

Withdraw tokens from your Binance account to non-custodial wallet

const binance = new Binance('https://api.binance.com', 'YOUR_API_KEY', 'YOUR_API_SECRET')

const response = await binance.withdraw({
  asset: 'ETH',
  address: 'YOUR_WALLET_ADDRESS',
  amount: 1 // this means 1 ETH not 1 wei
})

Example output:

{
    "id":"7213fea8e94b4a5593d507237e5a555b"
}