This application is a scraper built with puppeteer that will send on discord your crypto assets balance with screenshot or simply with text.
You can also retrieve your assets list in image (⚠If you have lot of assets in your wallet, the image preview sent on discord may be unreadable, but no panic, just open the original in your browser and you'll be able to perfectly zoom)
It is highly recommended using this app under a process manager like pm2, as it become a background process that will run on your server. If you don't have a dedicated server that is always on, consider using Heroku.
node
>= v11.7npm
pm2
npm install
cp .env.sample .env
pm2 start app.js --name "CoinMarketCapScraper"
Before running for the first time, you need to fill your .env
file with your own values.
CHROME_PATH=/usr/bin/chromium-browser
DISCORD_WEBHOOK_ID=
DISCORD_WEBHOOK_TOKEN=
CMC_LOGIN=email
CMC_PASS=password
CMC_DISCORD_MSG="Today Crypto Assets Balance :"
CMC_CRONJOB="44 11 * * *"
CMC_SEND_MODE="screenshot"
CMC_CURRENCY="EUR"
CMC_LIGHTMODE="night"
CMC_TIMERANGE=24H
CMC_SEND_ASSETS_LIST=true
- CHROME_PATH: The path to a chromium browser used by puppeteer
- DISCORD_WEBHOOK_ID: The discord webhook ID used to send crypto assets balance on your discord server (More info on Discord Support)
- DISCORD_WEBHOOK_TOKEN: The discord webhook TOKEN used to send crypto assets balance on your discord server
- CMC_LOGIN: Your email of your CoinMarketCap account
- CMC_PASS: Your password of your CoinMarketCap account
- CMC_DISCORD_MSG: The specific message to send before the text balance, working only if
CMC_SEND_MODE=text
- CMC_CRONJOB: The cronjob rule on you want to retrieve your crypto assets balance. By default, the cronjob rule is set at
11 PM 44 every day
. (More info on Crontab.guru) - CMC_SEND_MODE: Which format to use to send balance on discord.
text
orscreenshot
1 - CMC_CURRENCY: Currency to use (default to
EUR
) - CMC_LIGHTMODE: Website theme to use for the screenshot (
day
ornight
) - CMC_TIMERANGE: Time range to use for the screenshot. (Format:
24H
|7D
|30D
|90D
|ALL
- it's case-sensitive) - CMC_SEND_ASSETS_LIST: Send your complete assets list as screen. (
true
orfalse
)
1 : If you set the CMC_SEND_MODE
to text
, you'll have a diff with the previous captured balance. Maybe useful for automatic short time range scraping. See examples.