2021-12-06 15:48:07 +00:00
|
|
|
### Setting up Slack Notification
|
|
|
|
|
2021-12-06 16:45:38 +00:00
|
|
|
Go to the Slack apps page to create your own slack app:
|
|
|
|
|
|
|
|
<https://api.slack.com/apps>
|
|
|
|
|
2022-09-16 11:27:23 +00:00
|
|
|
Click "Install your app" -> "Install to Workspace" in *Settings/Basic Information*.
|
2021-12-06 16:45:38 +00:00
|
|
|
|
2022-09-16 11:27:23 +00:00
|
|
|
Copy the *Bot User OAuth Token* in *Features/OAuth & Permissions*.
|
2021-12-06 16:45:38 +00:00
|
|
|
|
2021-12-06 16:20:18 +00:00
|
|
|
Put your slack bot token in the `.env.local` file:
|
2021-12-06 15:48:07 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
SLACK_TOKEN=xxoox
|
|
|
|
```
|
|
|
|
|
|
|
|
And add the following notification config in your `bbgo.yml`:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
notifications:
|
|
|
|
slack:
|
|
|
|
defaultChannel: "bbgo-xarb"
|
|
|
|
errorChannel: "bbgo-error"
|
|
|
|
|
2022-09-20 17:17:33 +00:00
|
|
|
switches:
|
|
|
|
trade: true
|
|
|
|
orderUpdate: true
|
|
|
|
submitOrder: true
|
2021-12-06 16:20:18 +00:00
|
|
|
```
|
2021-12-06 16:45:38 +00:00
|
|
|
|
|
|
|
Besure to add your bot to the public channel by clicking "Add slack app to channel".
|
|
|
|
|
|
|
|
## See Also
|
|
|
|
|
|
|
|
- <https://www.ibm.com/docs/en/z-chatops/1.1.0?topic=slack-adding-your-bot-user-your-channel>
|