Skip to content
forked from c9s/bbgo

Commit

Permalink
add cmd-doc makefile target and update cmd doc files
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Mar 2, 2022
1 parent 3f8f17b commit f839cb8
Show file tree
Hide file tree
Showing 24 changed files with 78 additions and 28 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ pkg/version/dev.go: .FORCE
dev-version: pkg/version/dev.go
git commit $< -m "update dev build version"

version: pkg/version/version.go pkg/version/dev.go migrations
cmd-doc: .FORCE
go run ./cmd/update-doc
git add -v doc/commands

version: pkg/version/version.go pkg/version/dev.go migrations cmd-doc
git commit $< $(word 2,$^) -m "bump version to $(VERSION)" || true
[[ -e doc/release/$(VERSION).md ]] || (echo "file doc/release/$(VERSION).md does not exist" ; exit 1)
git add -v doc/release/$(VERSION).md && git commit doc/release/$(VERSION).md -m "add $(VERSION) release note" || true
Expand Down
5 changes: 3 additions & 2 deletions doc/commands/bbgo.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,20 @@ bbgo [flags]
* [bbgo cancel-order](bbgo_cancel-order.md) - cancel orders
* [bbgo deposits](bbgo_deposits.md) - A testing utility that will query deposition history in last 7 days
* [bbgo execute-order](bbgo_execute-order.md) - execute buy/sell on the balance/position you have on specific symbol
* [bbgo get-order](bbgo_get-order.md) - Get order status
* [bbgo kline](bbgo_kline.md) - connect to the kline market data streaming service of an exchange
* [bbgo list-orders](bbgo_list-orders.md) - list user's open orders in exchange of a specific trading pair
* [bbgo market](bbgo_market.md) - List the symbols that the are available to be traded in the exchange
* [bbgo orderbook](bbgo_orderbook.md) - connect to the order book market data streaming service of an exchange
* [bbgo orderupdate](bbgo_orderupdate.md) - Listen to order update events
* [bbgo pnl](bbgo_pnl.md) - pnl calculator
* [bbgo run](bbgo_run.md) - run strategies from config file
* [bbgo submit-order](bbgo_submit-order.md) - submit limit order to the exchange
* [bbgo submit-order](bbgo_submit-order.md) - place limit order to the exchange
* [bbgo sync](bbgo_sync.md) - sync trades and orders history
* [bbgo trades](bbgo_trades.md) - Query trading history
* [bbgo tradeupdate](bbgo_tradeupdate.md) - Listen to trade update events
* [bbgo transfer-history](bbgo_transfer-history.md) - show transfer history
* [bbgo userdatastream](bbgo_userdatastream.md) - Listen to session events (orderUpdate, tradeUpdate, balanceUpdate, balanceSnapshot)
* [bbgo version](bbgo_version.md) - show version name

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ bbgo account [--session=[exchange_name]] [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_backtest.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ bbgo backtest [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
4 changes: 2 additions & 2 deletions doc/commands/bbgo_balances.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Show user account balances

```
bbgo balances [flags]
bbgo balances --session SESSION [flags]
```

### Options
Expand Down Expand Up @@ -40,4 +40,4 @@ bbgo balances [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ bbgo build [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_cancel-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ bbgo cancel-order [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_deposits.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ bbgo deposits [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
4 changes: 2 additions & 2 deletions doc/commands/bbgo_execute-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
execute buy/sell on the balance/position you have on specific symbol

```
bbgo execute-order [flags]
bbgo execute-order --session SESSION --symbol SYMBOL --side SIDE --target-quantity TOTAL_QUANTITY --slice-quantity SLICE_QUANTITY [flags]
```

### Options
Expand Down Expand Up @@ -48,4 +48,4 @@ bbgo execute-order [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
45 changes: 45 additions & 0 deletions doc/commands/bbgo_get-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## bbgo get-order

Get order status

```
bbgo get-order --session SESSION --order-id ORDER_ID [flags]
```

### Options

```
-h, --help help for get-order
--order-id string order id
--session string the exchange session name for sync
--symbol string the trading pair, like btcusdt
```

### Options inherited from parent commands

```
--binance-api-key string binance api key
--binance-api-secret string binance api secret
--config string config file (default "bbgo.yaml")
--debug debug mode
--dotenv string the dotenv file you want to load (default ".env.local")
--ftx-api-key string ftx api key
--ftx-api-secret string ftx api secret
--ftx-subaccount string subaccount name. Specify it if the credential is for subaccount.
--max-api-key string max api key
--max-api-secret string max api secret
--metrics enable prometheus metrics
--metrics-port string prometheus http server port (default "9090")
--no-dotenv disable built-in dotenv
--slack-channel string slack trading channel (default "dev-bbgo")
--slack-error-channel string slack error channel (default "bbgo-error")
--slack-token string slack token
--telegram-bot-auth-token string telegram auth token
--telegram-bot-token string telegram bot token from bot father
```

### SEE ALSO

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_kline.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bbgo kline [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
4 changes: 2 additions & 2 deletions doc/commands/bbgo_list-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
list user's open orders in exchange of a specific trading pair

```
bbgo list-orders [status] [flags]
bbgo list-orders open|closed --session SESSION --symbol SYMBOL [flags]
```

### Options
Expand Down Expand Up @@ -41,4 +41,4 @@ bbgo list-orders [status] [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_market.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ bbgo market [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_orderbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bbgo orderbook --session=[exchange_name] --symbol=[pair_name] [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_orderupdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ bbgo orderupdate [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_pnl.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ bbgo pnl [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ bbgo run [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
4 changes: 2 additions & 2 deletions doc/commands/bbgo_submit-order.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## bbgo submit-order

submit limit order to the exchange
place limit order to the exchange

```
bbgo submit-order --session SESSION --symbol SYMBOL --side SIDE --quantity QUANTITY [--price PRICE] [flags]
Expand Down Expand Up @@ -44,4 +44,4 @@ bbgo submit-order --session SESSION --symbol SYMBOL --side SIDE --quantity QUANT

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bbgo sync --session=[exchange_name] --symbol=[pair_name] [--since=yyyy/mm/dd] [f

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_trades.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bbgo trades --session=[exchange_name] --symbol=[pair_name] [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_tradeupdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ bbgo tradeupdate --session=[exchange_name] [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_transfer-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bbgo transfer-history [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_userdatastream.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ bbgo userdatastream [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022
2 changes: 1 addition & 1 deletion doc/commands/bbgo_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ bbgo version [flags]

* [bbgo](bbgo.md) - bbgo is a crypto trading bot

###### Auto generated by spf13/cobra on 22-Feb-2022
###### Auto generated by spf13/cobra on 3-Mar-2022

0 comments on commit f839cb8

Please sign in to comment.