lsunsi / pamela

1 stars 0 forks source link

Telegram Bot Proposal #3

Open luizParreira opened 6 years ago

luizParreira commented 6 years ago

Implement Pamela's client as a Telegram Bot

Telegram has 2 ways of receiving updates, either from a webhook or a a getUpdate method. Most wrappers [0] implement the webhook strategy as its default way. In order to be able to implement Pamela as a bot we need to decide a few things:

What will Pamela do?

Commands

How often ?

How much control will we have over Pamela through the bot?

How can we authenticate or make the bot initially private?

How will the bot work?

My first proposal for us to accomplish this is to divide this problem into 3 parts:

  1. Web Server written in Rocket.rs that receives an authenticated request and initiates the trading period using https://stackoverflow.com/a/28366739/4320404
  2. A Trading Agent that is responsible for making all the trading decisions based on the data it receives
  3. A Telegram bot that is used as the client, to initiate the requests that the server will receive

What features?

At first we can look for ways of making the bot private for internal testing and incompleteness. But then we can periodically use Telegram's + Crypto features to enrich the bot:

  1. Authenticate the user and the bot on the exchange
  2. Implement other exchanges
  3. Implemnent other trading strategies
  4. Allow the bot to be doing more than 1 trading session at the same time with different assets or exchanges.
  5. Implement private features
  6. Implement integration with real blockchains where user can see his wallet balance
  7. A lot more hahaha

How can we simplify all that and ship the simplest bot and then improve upon?

  1. We should make the bot as dum as possible and only implement the necessary features for him to trade and rebalance our portfolio. While also making the bot private.
  2. We should allow the bot to trade automatically, thats when we plug the PAMR bot and allow the bot to rebalance it based on the trading period the user inputs.
  3. We should be able to authenticate the bot and the user. 4.The bot should be able to trade on different exchanges and more than 1 trading session at the same time. Also, trading sessions should be able to be customisable.

0 - API Wrappers:

luizParreira commented 6 years ago

@lsunsi What do you think about it?