Crypto Price Bot for Slack, which posts price and market cap updates from CoinMarketCap at regular intervals. Originally built for the Golem Slack.
Example Screenshot:
- A web server with PHP 5 and cURL installed
- In Slack, create a new incoming webhook integration and choose the chanel, label, name and icon that you want the bot to use.
- Optionally, create a second incoming webhook integration to be used for testing any code changes you want to make to the bot (you will probably want this second webhook to post to a private group rather than a public channel).
- Add the 3 png files as custom emoji. Alternatively, you can use your own emoji and edit the required variables in
variables.php
.
- Download the files (or do a git pull) to a directory on your webserver
- Edit
variables.php
with the settings you require. At a minimum you will need to set the following:
$url_slack
- the webhook URL created above$url_slack_dev
- the optional second webhook URL created above$script_name
- the location of index.php on your webserver$script_name_dev
- the location of dev.php on your webserver$token_symbol
- the 3 or 4 letter token symbol$token_api_name
- theid
(not name) of the token used by the CoinMarketCap API
- Create a cron job or scheduled task to run index.php at the required interval.
If you wish to have regular updates on multiple different tokens/coins, you will need to create multiple directories on your webserver (one for each token/coin) and have a copy of the php files in each. You will also need to create a cron job or scheduled task for the index.php in each directory. As long as they are posting to the same slack channel, you will not need to create additional webhooks.
- running
index.php?mode=live
in a web browser will output the result to the browser, rather than posting it to the Slack channel dev.php
is an exact copy ofindex.php
. It exists so that you can edit and test the code without it affecting the scheduled posts whenindex.php
is run by cron or scheduled tasks.- If you come across any bugs, please create a new issue.
- If you have any improvements or bug fixes, feel free to submit a pull request.
- This project is licensed under the MIT license, and you are free to use it acording to the license. However, if you do wish to make a donation, you can send ETH or any ethereum based tokens to 0x3D4e1756810fa293e9Fd9B351c15A3689929F32e