Coder Social home page Coder Social logo

oren0e / check-crypto-investments Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 155 KB

Automatically check and alert to Telegram on returns regarding an initial investment in cryptocurrencies

License: MIT License

Python 97.09% Makefile 2.91%
cryptocurrencies telegram cryptocurrency

check-crypto-investments's Introduction

example workflow name

Get Alerts for Your Crypto Investments

Overview

Allows you to monitor the returns on your coin investments with an alerts via Telegram. Further alert senders can be implemented as well.

Installation

Note: Currently this tool is only available for Mac or Linux users.

  1. Clone this repo.

  2. pip install pycoingecko

  3. pip install etherscan-python (Go to https://etherscan.io/, sign up and get your API key).

  4. Create a environment variable called INITIAL_INVESTMENTS. Each line in this variable should contain the id of the coin you are interested to monitor followed by a single space followed by the initial price you bought this coin for (price per 1 coin).

    • If you're not sure about the id of your coin you should check at coingecko's API - i.e.:
    curl -X 'GET' 'https://api.coingecko.com/api/v3/coins/list' -H 'accept: application/json'
    
  5. For using telegram:

    • Check out this link and get a token.
    • Get the chat_id by writing something in the chat of your new bot and then visit https://api.telegram.org/bot<YourBOTToken>/getUpdates and get the chat_id under the key mesasge['chat']['id']
    • Add a configuration environment variable with a yml structure, you can see an example in the tests/data/correct_config.yml file. You need to add the bot you implemented with the abstract methods in the backend/interfaces folder and it's corresponding API key and chat ID of the Telegram chat you want the messages to be sent to.

Usage

The main purpose of this tool is for scheduling a cron-job on an always available instance (i.e., server). The usage is simple: python cci.py <BOT NAME>.

TODO

  1. Make a library for easy installation
  2. Add an option for a threshold only above which alerts will be sent to Telegram
  3. Write more tests
  4. Make available for Windows users as well
  5. Use poetry for requirements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.