Giter Club home page Giter Club logo

kitraderbot's Introduction

KiTraderBot

Trading bot simulator for Telegram. Supports Bitstamp & Binance APIs.

ko-fi

Commands

/start - Shows this message
/ping - Test connection with trading API
/list - Show the available symbols
/price symbol - Current price for provided symbol
/account [KiTrader, Carleslc] - View your account or the bot account
/newAccount [balance] [currency] - Creates an account for trading
/deleteAccount - Deletes your trading account
/history [KiTrader, Carleslc] - View your trades or the bot trades
/trade [BUY, SELL] amount symbol [comment] - Order a trade for your account
/tradeAll [BUY, SELL] symbol [comment] - Order a trade for your account with maximum available amount
/subscribe - Receive updates from the KiTrader auto-trading account
/update - Forces an update of the KiTrader auto-trading subscription
/unsubscribe - Stop receiving updates from the KiTrader auto-trading account

Install

Dependencies

https://python-telegram-bot.org/

python3 -m pip install -r dependencies.txt

Telegram

Create your bot and get an Access Token with https://core.telegram.org/bots#6-botfather

Create a new folder tokens

Create a new file tokens/telegram and paste your bot token there.

Bitstamp

Get API key and secret from https://www.bitstamp.net/account/security/api/

tokens/bitstamp

tokens/bitstamp_secret

Binance

Change import bitstamp as trading to import binance as trading in bot.py and account.py.

Get API key and secret from https://www.binance.com/en/usercenter/settings/api-management

tokens/binance

tokens/binance_secret

Allow users to subscription / trading

Create a file users and enter each user in a new line for granting permissions.

Read alerts from Gmail

This bot can read alerts from email and put buy/sell orders in a simulated account for testing strategies.

Update gmail.py constants to identify alerts.

Read header and use oauth2.py to get your token credentials.

tokens/gmail_at your email address

tokens/gmail token credentials

Deploy

Run

python3 bot.py

Docker

docker build -t kitraderbot .
docker-compose up -d

# Update (after build)
docker-compose restart kitraderbot

# Update (single line rebuild)
docker-compose up --build --force-recreate --no-deps -d kitraderbot

kitraderbot's People

Contributors

carleslc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kitraderbot's Issues

API Errors

Starting bot...
Traceback (most recent call last):
File "bot.py", line 190, in
updater = Updater(TELEGRAM_API_TOKEN, use_context=True)
TypeError: init() got an unexpected keyword argument 'use_context'

File "bot.py", line 50, in start
user = update.message.from_user
AttributeError: 'Bot' object has no attribute 'message'

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.