mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
move and update the notification configuration doc
This commit is contained in:
parent
ceb4d1353e
commit
f1f62c22a0
44
README.md
44
README.md
|
@ -139,48 +139,10 @@ Note on date formats, the following date formats are supported:
|
|||
* RFC822, which looks like `02 Jan 06 15:04 MST`
|
||||
* You can also use `2021-11-26T15:04:56`
|
||||
|
||||
## Advanced Setup
|
||||
## Advanced Configuration
|
||||
|
||||
### 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.
|
||||
|
||||
### Setting up Slack Notification
|
||||
|
||||
Put your slack bot token in the .env.local file:
|
||||
|
||||
```sh
|
||||
SLACK_TOKEN=xxoox
|
||||
```
|
||||
- [Setting up Telegram notification](./doc/configuration/telegram.md)
|
||||
- [Setting up Slack notification](./doc/configuration/slack.md)
|
||||
|
||||
### Synchronizing Trading Data
|
||||
|
||||
|
|
23
doc/configuration/slack.md
Normal file
23
doc/configuration/slack.md
Normal 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"
|
||||
```
|
32
doc/configuration/telegram.md
Normal file
32
doc/configuration/telegram.md
Normal 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.
|
Loading…
Reference in New Issue
Block a user