Skip to content
/ tt Public
forked from mraniki/tt

Submit trading order to CEX & DEX with messaging platform (Telegram, Matrix and Discord)

License

Notifications You must be signed in to change notification settings

suggggam1/tt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Talky Trader

LogoScreenshot 2023-02-28 at 20 39 47Screenshot 2023-03-05 at 10 51 04

Docker Pulls

CEX & DEX integration with multi messaging platform support (Telegram, Matrix and Discord). Place order for CEFI or DEFI exchanges, query balance and quote ticker. Deploy it via docker on selfhosted platform or PaaS.

telegrambot telethon pycord simplematrixbotlib

python3.10 ccxt Web3 tinyDB apprise FastAPI coingecko

sublime workingcopy

If you like it, feel free to donate

Build status

Docker DockerNightly

Install

  1. Create your channel/room and your platform bot

  2. Get your

  3. Update the config (bot token, bot channel and exchange details). Point or copy your config db.json to the volume /code/config)

  4. Deploy via:

    • docker docker push mraniki/tt:latest or docker pull ghcr.io/mraniki/tt:latest
    • locally git clone https://github.com/mraniki/tt:main && pip install -r requirements.txt
  5. Start your container or if deployed locally use python3 bot.py to start

  6. More details in Wiki

Config

Quick start approach: Update the sample db with your parameters and save it as db.json. If you deploy the bot on a PaaS cloud platform, you can use DB_URL environment variable to import db.json from a secure location. MOre detail on the config: https://github.com/mraniki/tt/wiki/Configuration

DB Structure

DB sample

Env

env sample

Bot commands

  • sell BTCUSDT sl=6000 tp=4500 q=1% or sell BTCUSDT Order processing (direction symbol sl=stoploss tp=takeprofit q=percentagequantity% or direction symbol)
  • /bal Query user account exchange balance
  • /cex name or /dex name Switch between any CEX or DEX (e.g /cex kraken, /dex pancake)
  • /trading Disable or Enable trading
  • /testmode Switch between testnet,sandbox or mainnet
  • /q BTCB Retrieve ticker quote and token information from exchange and coingecko

Features Available

v1

  • Enable bot in Telegram (ptb v20 and telethon), Matrix (simplematrixbotlib) and Discord (pycord) messaging platform
  • Place order for CEX and DEX, Query Balance and quote ticker
  • Push your order signal manually or from system like trading view webhook alert. Verified with Binance, Binance Testnet, FTX😠, Kraken, Huobi, BSC & pancakeswap, polygon and quickswap). If SL / TP or QTY are missing values are defaulted
  • Support DEX automatic token approval
  • Support uniswap v2 and 1inch api
  • Support % of stablecoin balance when placing order

Other Features

  • Support bot in private channel and multiple channel per environment
  • Support multiple environment via variable (e.g. DEV, PRD, PRD CEX, UNI1 or UNI2)
  • Handle libraries exceptions in one function and notification delivery with apprise
  • Enable dev and main branches with auto release and docker deployment pipeline setup for continueous deployment in dockerhub
  • Support all messaging bot as asynchrousnous process
  • Support common notification via Apprise for all nessaging platform
  • Support deployment on PaaS or selfhosting
  • Support config folder and config file in the dockerfile to automatically create the volume folder and its config
  • Support config file as variable to deploy on PaaS (tested with northflank, koyeb, GKE, render and fly.io)
  • Create DB if it is missing and check bot variables for failover
  • Support bot restart capability
  • Support contract with standard json tokenlist.org vetted tokenlist, personal list for testnet (example)
  • Support coingecko API as backup of tokenlist for contract search
  • Configure the default exchange and default test mode when starting the bot.
  • Support multiple messaging platform (Telegram, Matrix and Discord)
  • Include healthcheck, webhook and notify capability via FastAPI webserver on port 8080 with build-in JSON API swagger

WIKI

Wiki

Questions? Want to help?

discord telegram

📷 Screenshots

Screenshot 2023-02-28 at 20 39 47

more screenshots

🚧 Roadmap

🚧 Roadmap

V1.3

  • Refactoring of more complex functions

v1.4

  • Support Uniswap V3
  • Support limit order for DEX (1inch) and review feasibility for dydx / GMX
  • Review testmode command to be part of the switch command

v1.5

  • Support limit order for DEX (Uniswap v3)
  • Support futures and margin for CEX (to be tested via CCXT)
  • Support STOPLOSS TAKEPROFIT for CEX
  • Support multiple TAKEPROFIT target for CEX
  • View free margin for futures in /bal
  • View opened position via /pos (futures and limit order)

v2 backlog

  • Create / modify db via bot chat nested conversation
  • Review DEX private key strategy (walletconnect authentification via pywalletconnect)
  • Support Web3 ENS
  • View daily pnl in /bal
  • View weekly pnl with /w command and scheduling

v3 backlog

  • Merge with MQL4 version for MT4 TradFi supportmql

⚠️ Disclaimer

This is an education tool and should not be considered professional financial investment system nor financial advice. Use a testnet account or USE AT YOUR OWN RISK. For DEX, Never share your private keys.

NEVER use your main account for automatic trade

About

Submit trading order to CEX & DEX with messaging platform (Telegram, Matrix and Discord)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Dockerfile 1.2%