Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

zahin-mohammad/crypto-balance-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Balance Check Slack Bot

ko-fi

Banner

Example of working bot

Crypto Balance Check is a slack integration that will send periodic messages to inform users of their: - Their crypto balance per exchange - Their fiat value of their crypto balance

Requirements:

  • Heroku account
  • Heroku CLI
  • git
  • Slack workspace with admin privilege

Deploying to Heroku

  • Create a slack custom integration if you have not already
git clone git@github.com:zahin-mohammad/crypto-balance-check.git
cd crypto-balance-check
  • Create a heroku project (skip if its already set up)
heroku login
heroku create
git push heroku master
  • Setup Firebase
    • Create a firebase project at https://firebase.google.com/
    • Create a database
    • Download a private key from settings -> Service Accounts
    • Rename this file to firestore-admin.json
  • Setup Environment Variables:
  • These can also be configured on the web client for heroku
  • Setup Environment Variables:
  • These can also be configured on the web client for heroku
# Mandatory
heroku config:set SLACK_WEBHOOK="..." 
heroku config:set IMGUR_CLIENT_ID="..." 
heroku config:set IMGUR_CLIENT_SECRET="..." 
# Optional
heroku config:set BINANCE_API_KEY="{binance api_key}" 
heroku config:set BINANCE_API_SECRET="{binance api_secret}" 
heroku config:set COINBASE_API_KEY="{coinbase api_key}" 
heroku config:set COINBASE_API_SECRET="{coinbase_api_secret}"
heroku config:set NEWTON_CLIENT_ID="{newton client_id}" 
heroku config:set NEWTON_API_SECRET="{newton api_key}" 
heroku config:set KUCOIN_API_KEY="{kucoin api_key}" 
heroku config:set KUCOIN_API_SECRET="{kucoin api_secret}" 
heroku config:set KUCOIN_API_PASSPHRASE="{kucoin api_api_passphrase}" 
heroku config:set FIAT_CURRENCY="{e.g. CAD}"
  • FIRESTORE_ADMIN environment variable needs to be manually updated in the heroku UI with the contents of firestore-admin.json
  • Verify that the script works
heroku run python3 ./__main__.py
  • Install and configure the scheduler via the CLI
  • configure frequency as desired
heroku addons:create scheduler:standard
heroku addons:open scheduler
# Under Run Command: python3 ./__main__.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages