Giter Site home page Giter Site logo

terraswap-monitor's Introduction

Terraswap tokens swap rate monitor

Telegram bot for Terra tokens swap rate monitoring with automated notifications

Pre-requisites

  1. Node.js installed
  2. Telegram bot token (If you don't have a telegram bot created just go to https://core.telegram.org/bots#3-how-do-i-create-a-bot and follow the steps)

How to run

Option A. Local machine

  1. Add your telegram bot token to .env.sample file
  2. Rename .env.sample file to .env
  3. Run npm install or yarn install
  4. Run node index.js

Option B. Deploy to cloud

  1. Add your telegram bot token to .env.sample file
  2. Rename .env.sample file to .env
  3. Deploy to cloud

Commands

  1. help (list all commands available)
  2. swap [assetA] [assetB] (get rate for assetA-assetB pair) Example: /swap spec ust
  3. autoswap [assetA] [assetB] [swaprate_higher_than] [swaprate_lower_than] (enable automatically checks for the assetA-assetB swap rate - bot will send notifications every time the swap rate is over [swaprate_higher_than] or under [swaprate_lower_than]) Example: /autoswap lota ust 1.15 1.02
  4. autoswap [assetA] [assetB] (turns on/off auto monitor for an already added pair) Example: /autoswap lota ust
  5. query_frequency [frequency in ms] (configure frequency of the bot to monitor swap rate - Default value: 10 sec) - Example: /query_frequency 360000 - which means every 5 minutes
  6. swaprate_higherthan [assetA] [assetB] [rate] (bot will send notifications every time the swap rate is higher than the amount defined based on the query frequency for assetA-assetB pair) Example: /swaprate_higherthan lota ust 1.15
  7. swaprate_lowerthan [assetA] [assetB] [rate] (bot will send notifications every time the swap rate is lower than the amount defined based on the query frequency for assetA-assetB pair) - Example: /swaprate_lowerthan lota ust 1.02
  8. list_auto (returns a list with all the current pairs with swap rate auto-monitoring enabled)

Buy me a coffee

Did you like the bot? Send a tip! =) Terra wallet terra1exw8kvva3s7yqjkeakunagmnjc2r95h0w2ekvy

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.