move and update the notification configuration doc

This commit is contained in:
c9s 2021-12-06 23:48:07 +08:00
parent ceb4d1353e
commit f1f62c22a0
3 changed files with 58 additions and 41 deletions

View File

@ -139,48 +139,10 @@ Note on date formats, the following date formats are supported:
* RFC822, which looks like `02 Jan 06 15:04 MST` * RFC822, which looks like `02 Jan 06 15:04 MST`
* You can also use `2021-11-26T15:04:56` * You can also use `2021-11-26T15:04:56`
## Advanced Setup ## Advanced Configuration
### Setting up Telegram Bot Notification - [Setting up Telegram notification](./doc/configuration/telegram.md)
- [Setting up Slack notification](./doc/configuration/slack.md)
Open your Telegram app, and chat with @botFather
Enter `/newbot` to create a new bot
Enter the bot display name. ex. `your_bbgo_bot`
Enter the bot username. This should be global unique. e.g., `bbgo_bot_711222333`
Botfather will response your a bot token. *Keep bot token safe*
Set `TELEGRAM_BOT_TOKEN` in the `.env.local` file, e.g.,
```sh
TELEGRAM_BOT_TOKEN=347374838:ABFTjfiweajfiawoejfiaojfeijoaef
```
For the telegram chat authentication (your bot needs to verify it's you), if you only need a fixed authentication token,
you can set `TELEGRAM_AUTH_TOKEN` in the `.env.local` file, e.g.,
```sh
TELEGRAM_BOT_AUTH_TOKEN=itsme55667788
```
Run your bbgo,
Open your Telegram app, search your bot `bbgo_bot_711222333`
Enter `/start` and `/auth {code}`
Done! your notifications will be routed to the telegram chat.
### Setting up Slack Notification
Put your slack bot token in the .env.local file:
```sh
SLACK_TOKEN=xxoox
```
### Synchronizing Trading Data ### Synchronizing Trading Data

View File

@ -0,0 +1,23 @@
### Setting up Slack Notification
Put your slack bot token in the .env.local file:
```sh
SLACK_TOKEN=xxoox
```
And add the following notification config in your `bbgo.yml`:
```yaml
---
notifications:
slack:
defaultChannel: "bbgo-xarb"
errorChannel: "bbgo-error"
# routing rules
routing:
trade: "$silent"
order: "$slient"
submitOrder: "$slient"
```

View File

@ -0,0 +1,32 @@
### Setting up Telegram Bot Notification
Open your Telegram app, and chat with @botFather
Enter `/newbot` to create a new bot
Enter the bot display name. ex. `your_bbgo_bot`
Enter the bot username. This should be global unique. e.g., `bbgo_bot_711222333`
Botfather will response your a bot token. *Keep bot token safe*
Set `TELEGRAM_BOT_TOKEN` in the `.env.local` file, e.g.,
```sh
TELEGRAM_BOT_TOKEN=347374838:ABFTjfiweajfiawoejfiaojfeijoaef
```
For the telegram chat authentication (your bot needs to verify it's you), if you only need a fixed authentication token,
you can set `TELEGRAM_AUTH_TOKEN` in the `.env.local` file, e.g.,
```sh
TELEGRAM_BOT_AUTH_TOKEN=itsme55667788
```
Run your bbgo,
Open your Telegram app, search your bot `bbgo_bot_711222333`
Enter `/start` and `/auth {code}`
Done! your notifications will be routed to the telegram chat.