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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@binance/binance-cli

v1.1.1

Published

Official Binance CLI - A lightweight cli tool that provides a convenient interface to Binance's REST API.

Downloads

1,839

Readme

Binance CLI

Latest Release npm Downloads

A simple CLI that interacts with the Binance API

Installation

# Install from npm
npm install -g @binance/binance-cli

Usage

Help

Use --help to consult all the available commands

binance-cli --help

--help is supported for each product and each command.

Authentication

Using Environment variable


# Display help command
binance-cli -h

# Set the API key and secret as global variables
export BINANCE_API_KEY=<the_api_key>
export BINANCE_SECRET_KEY=<the_api_secret> # Can be secret key, path to private key or content of private key

# Set the environment (prod by default, valid options: prod, demo and testnet)
export BINANCE_API_ENV=testnet

# It is possible to have a custom base URL
export BINANCE_SPOT_BASE_PATH=https://testnet.binance.vision
export BINANCE_FUTURES_USDS_BASE_PATH=https://testnet.binancefuture.com

Using profile (non-interactive)

Create a new profile
binance-cli profile create --name new-name --api-key <the_api_key> --api-secret <the_api_secret> --env <prod|demo|testnet>
Select a profile
binance-cli profile select --name new-name

View the current active profile

binance-cli profile view

List all the existing profiles

binance-cli profile list

The active profile will be shown with an asterisk.

Delete an existing profile

binance-cli profile delete --name profile-name

Specify profile

It is also possible to specify the profile for a single command.

binance-cli spot get-account --profile my_profile

Using profile (interactive)

Create a new profile
binance-cli profile create -i # binance-cli will prompt the questions to create a new profile

It can also be used to update an existing profile.

Select a profile
binance-cli profile select -i # select the profile to activate
View the current active profile
binance-cli profile view

Commands

Available commands

Parameters

CLI Argument
binance-cli spot klines --symbol "BNBUSDT" --interval "1s"
Using pipe
echo '{"symbol": "BNBUSDT", "interval": "1s"}' | binance-cli spot klines

Using interactive mode

binance-cli spot klines -i

Completion

In order to add completion, the following steps can be followed:

For Bash:

Append the output to the .bashrc file:

binance-cli completion >> ~/.bashrc
For Zsh:

Append the output to the .zshrc file:

binance-cli completion >> ~/.zshrc

After updating the file, the terminal needs to be restarted or activate the completion with source ~/.bashrc (or .zshrc).

Custom request

Custom request can also be sent using binance-cli, any parameter can be added to the command and will be sent in the request.

binance-cli request GET https://api.binance.com/api/v3/trades --symbol BNBUSDT --limit 5

Signed endpoints are also supported.

binance-cli request GET https://testnet.binance.vision/api/v3/account --signed

LICENSE

MIT