A command-line tool for Binance API developed based on the Go language, supporting various trading functions such as spot, futures, and portfolio margin.
curl -sSL https://raw.githubusercontent.com/UnipayFI/binance-cli/refs/heads/main/download.sh | bashBefore using, you need to set the Binance API key:
export API_KEY="your_api_key"
export API_SECRET="your_api_secret"All commands are to be used in the following format:
./binance-cli [Module] [Subcommand] [Arguments]
Available Commands:
futures Futures
help Help about any command
portfolio Portfolio
spot Spot
wallet Wallet
Exec: ./binance-cli spot [Subcommand] [Arguments]
Available Commands:
account Show account info
asset Show account assets
dividend Get dividend information
order Support create, cancel, list ordersExec: ./binance-cli futures [Subcommand] [Arguments]
Available Commands:
account Show account balances & account config
commission-rate Show commission rate
fee BNB payment fee
income Query income history
multi-assets-mode Show and set multi-assets mode
order Support create, cancel, list futures orders
position Show positions & show position risk & set position margin & change position side
symbol Symbol config(leverage & margin type)
trade Get trades for a specific account and symbol.Exec: ./binance-cli portfolio um [Subcommand] [Arguments]
Available Commands:
commission-rate Get User Commission Rate for UM
fee BNB payment fee
income Get UM Income History
order Support create, cancel, list um orders
position Show positions & show position risk & change position side
symbol Symbol configExec: ./binance-cli portfolio margin [Subcommand] [Arguments]
Available Commands:
interest-history Interest history
loan Loan
order Support create, cancel, list margin ordersExec: ./binance-cli wallet [Subcommand] [Arguments]
Available Commands:
dust dust asset conversion and history
fee BNB payment fee
universal-transfer Transfer asset and historyUnipayFI/binance-cli is released under the MIT License.