Skip to content

Commit 6210448

Browse files
committed
Update copy and add README.md documentation
1 parent 14c1d86 commit 6210448

20 files changed

Lines changed: 105 additions & 35 deletions

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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).

cmd/futures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
var futuresCmd = &cobra.Command{
99
Use: "futures",
10-
Short: "futures",
10+
Short: "Futures",
1111
}
1212

1313
func init() {

cmd/futures/account.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
var (
1414
accountCmd = &cobra.Command{
1515
Use: "account",
16-
Short: "show account balances & account config",
16+
Short: "Show account balances & account config",
1717
}
1818

1919
balancesCmd = &cobra.Command{
2020
Use: "balances",
21-
Short: "show account balances",
21+
Short: "Show account balances",
2222
Long: `Get current account's balances.
2323
2424
Docs Link: https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3`,
@@ -27,7 +27,7 @@ Docs Link: https://developers.binance.com/docs/derivatives/usds-margined-futures
2727

2828
accountConfigCmd = &cobra.Command{
2929
Use: "config",
30-
Short: "show account config",
30+
Short: "Show account config",
3131
Long: `Query account configuration.
3232
3333
Docs Link: https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config`,

cmd/futures/commission_rate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var (
1414
commissionRateCmd = &cobra.Command{
1515
Use: "commission-rate",
1616
Aliases: []string{"cr"},
17-
Short: "show commission rate",
17+
Short: "Show commission rate",
1818
Long: `Get User Commission Rate.
1919
2020
Docs Link: https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate`,

cmd/futures/positions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
var (
1515
positionCmd = &cobra.Command{
1616
Use: "position",
17-
Short: "show positions & show position risk & set position margin & change position side",
17+
Short: "Show positions & show position risk & set position margin & change position side",
1818
}
1919

2020
positionListCmd = &cobra.Command{

cmd/futures/symbol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
var (
1616
symbolConfigCmd = &cobra.Command{
1717
Use: "symbol",
18-
Short: "symbol config(leverage & margin type)",
18+
Short: "Symbol config(leverage & margin type)",
1919
}
2020

2121
showSymbolConfigCmd = &cobra.Command{

cmd/portfolio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
var (
99
portfolioCmd = &cobra.Command{
1010
Use: "portfolio",
11-
Short: "portfolio",
11+
Short: "Portfolio",
1212
}
1313
)
1414

cmd/portfolio/account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var (
1313
accountCmd = &cobra.Command{
1414
Use: "account",
15-
Short: "show account info",
15+
Short: "Show account info",
1616
Long: `Query account information.
1717
1818
Docs Link: https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Information`,

cmd/portfolio/auto_repay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var (
1313
autoRepayCmd = &cobra.Command{
1414
Use: "auto-repay",
15-
Short: "auto-repay",
15+
Short: "Auto-repay",
1616
}
1717

1818
autoRepayStatusCmd = &cobra.Command{

cmd/portfolio/collection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var (
1313
collectionCmd = &cobra.Command{
1414
Use: "collection",
15-
Short: "collection",
15+
Short: "Collection",
1616
}
1717

1818
autoCollectionCmd = &cobra.Command{

0 commit comments

Comments
 (0)