https://github.com/knutkirkhorn/coinmarketcap-reward-notifier
Get notified when new rewards are available on CoinMarketCap
https://github.com/knutkirkhorn/coinmarketcap-reward-notifier
cmc coinmarketcap crypto cryptocurrency discord docker nodejs notification notifier reward
Last synced: 3 months ago
JSON representation
Get notified when new rewards are available on CoinMarketCap
- Host: GitHub
- URL: https://github.com/knutkirkhorn/coinmarketcap-reward-notifier
- Owner: knutkirkhorn
- License: mit
- Created: 2021-09-21T15:54:57.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T18:23:47.000Z (over 2 years ago)
- Last Synced: 2024-04-23T23:05:14.392Z (over 1 year ago)
- Topics: cmc, coinmarketcap, crypto, cryptocurrency, discord, docker, nodejs, notification, notifier, reward
- Language: JavaScript
- Homepage:
- Size: 303 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coinmarketcap-reward-notifier
> Get notified when new rewards are available on [CoinMarketCap](https://coinmarketcap.com/)
[](https://discord.gg/CBtDPB5eFE) [](https://hub.docker.com/r/knutkirkhorn/coinmarketcap-reward-notifier) [](https://hub.docker.com/r/knutkirkhorn/coinmarketcap-reward-notifier)
Notifies on Discord if new rewards are available on [CoinMarketCap](https://coinmarketcap.com/). Fetches newest rewards from their [API](https://api.coinmarketcap.com/shop/v3/product/list). It notifies to a Discord channel using [Discord Webhooks](https://discord.com/developers/docs/resources/webhook).
## Usage
### Join my Discord server
You can follow notifications in my [notifier server on Discord](https://discord.gg/CBtDPB5eFE) if you don't want to set this up yourself. It is possible to forward the messages from this server to your own.
### Within a Docker container
#### From Docker Hub Image
This will pull the image from [Docker Hub](https://hub.docker.com/) and run the image with the provided configuration for web hooks as below. It's required to provide account addresses, names and the Webhook URL or both the Webhook ID and token.
```sh
# Providing a Discord Webhook URL
docker run -d -e DISCORD_WEBHOOK_URL= knutkirkhorn/coinmarketcap-reward-notifier
```
#### From source code
```sh
# Build container from source
docker build -t coinmarketcap-reward-notifier .
# Providing a Discord Webhook URL
docker run -d -e DISCORD_WEBHOOK_URL= coinmarketcap-reward-notifier
```
### Outside of a Docker container
```sh
# Install
npm install
# Run
npm start
```
### Environment variables
Provide these with the docker run command or store these in a `.env` file.
- `DISCORD_WEBHOOK_URL`
- URL to the Discord Webhook containing both the ID and the token
- Format: `DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks//`
- `DISCORD_WEBHOOK_ID`
- ID for the Discord Webhook
- `DISCORD_WEBHOOK_TOKEN`
- Token for the Discord Webhook
- `WAIT_TIMEOUT` ***(optional)***
- The time interval in milliseconds between each check of CoinMarketCap rewards.
- Default: `3600000` (60 minutes)