Code Monkey home page Code Monkey logo

btc-change-bot's Introduction

Change bot

Change bot is an universal exchange where you can buy and sell BTC, LTC, ETH and other popular currencies. Service use escrow mechanism to ensure the safety of your money.

Getting started

Requirements

  • Python 3
  • MySQL

Installation

Clone repository

git clone https://github.com/30mb1/BTC-change-bot.git
cd Telegram-mailer

Create virtual environment and install requirements.

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

Create database for bot

mysql -u <user> -p < database.sql

Usage

Bot is still in development.

Some details

  • Bot store all temporary information in object called user_data - dictionary, unique for every user. Information about messages state(for example page in list of orders and etc.), choosed language and other data.

  • Bot use this library for work.

  • Bot supports localization via gettext. All texts that bot use are stored in texts.py file. To create new localization file, generate .po file using texts.py, moderate it and compile. Then place compiled .mo file in an appropriate folder in /locale. Insert translation function in utils/decorators.py in LANGS variable, so @info decorator would provide it to all bot functions. (function for choosing language is not created yet)

  • When inline button is pressed, bot get special callback update, which contains callback_data. It usually has next structure:

    โ€‹ (level1) (level2) (additional info)

    App use this data for routing. At first, high level router send update(user's message) to section depending on level1 value; then, next section-router sends update to appropriate function-handler using level2. Every section has its own router in file, named same as directory.

To do:

  • create function for choosing language and create appropriate interface element
  • develop trade process - at the moment nothing happens when pressing button 'start bargain'
  • complete 'create new bargain' process
  • develop mechanism of getting prices from exchanges - values are hardcoded now
  • connect nodes to bot - there is no real work with currencies at the moment. Need to create wallets for clients and develop exchange mechanism

btc-change-bot's People

Contributors

30mb1 avatar kugusha avatar pavlovdog avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ryasnoy r1s2e3

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.