|
| 1 | +# Binance CLI |
| 2 | +A command-line tool for Binance API developed based on the Go language, supporting various trading functions such as spot, futures, and portfolio margin. |
| 3 | + |
| 4 | +## Installation and Configuration |
| 5 | + |
| 6 | +### Installation |
| 7 | +// TODO |
| 8 | + |
| 9 | +### Environment variables |
| 10 | +Before using, you need to set the Binance API key: |
| 11 | +```shell |
| 12 | +export API_KEY="your_api_key" |
| 13 | +export API_SECRET="your_api_secret" |
| 14 | +``` |
| 15 | + |
| 16 | +## Usage |
| 17 | +All commands are to be used in the following format: |
| 18 | +``` |
| 19 | +./binance-cli [Module] [Subcommand] [Arguments] |
| 20 | +``` |
| 21 | + |
| 22 | +### Spot Module |
| 23 | +Exec: `./binance-cli spot [Subcommand] [Arguments]` |
| 24 | +```shell |
| 25 | +Available Commands: |
| 26 | + account Show account info |
| 27 | + asset Show account assets |
| 28 | + dividend Get dividend information |
| 29 | + order Support create, cancel, list orders |
| 30 | +``` |
| 31 | + |
| 32 | +### Futures Module |
| 33 | +Exec: `./binance-cli futures [Subcommand] [Arguments]` |
| 34 | +```shell |
| 35 | +Available Commands: |
| 36 | + account Show account balances & account config |
| 37 | + commission-rate Show commission rate |
| 38 | + fee BNB payment fee |
| 39 | + income Query income history |
| 40 | + multi-assets-mode Show and set multi-assets mode |
| 41 | + order Support create, cancel, list futures orders |
| 42 | + position Show positions & show position risk & set position margin & change position side |
| 43 | + symbol Symbol config(leverage & margin type) |
| 44 | + trade Get trades for a specific account and symbol. |
| 45 | +``` |
| 46 | +### Portfolio |
| 47 | +#### Portfolio USDⓈ-Margined Futures |
| 48 | +Exec: `./binance-cli portfolio um [Subcommand] [Arguments]` |
| 49 | +```shell |
| 50 | +Available Commands: |
| 51 | + commission-rate Get User Commission Rate for UM |
| 52 | + fee BNB payment fee |
| 53 | + income Get UM Income History |
| 54 | + order Support create, cancel, list um orders |
| 55 | + position Show positions & show position risk & change position side |
| 56 | + symbol Symbol config |
| 57 | +``` |
| 58 | + |
| 59 | +#### Portfolio Margin Trading |
| 60 | +Exec: `./binance-cli portfolio margin [Subcommand] [Arguments]` |
| 61 | +```shell |
| 62 | +Available Commands: |
| 63 | + interest-history Interest history |
| 64 | + loan Loan |
| 65 | + order Support create, cancel, list margin orders |
| 66 | +``` |
| 67 | + |
| 68 | +## License |
| 69 | +UnipayFI/binance-cli is released under the [MIT License](https://opensource.org/licenses/MIT). |
0 commit comments