/tt

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

Primary LanguagePythonMIT LicenseMIT

Talky Trader

Logo

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 dxsp

apprise FastAPI

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 settings.toml to the volume /code/)

  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 env with your parameters start as a docker service. Parameter can be added as env or as settings.toml example Config is using dynaconf module. refer to its documentation for more details or https://github.com/mraniki/tt/wiki/Configuration

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
  • /q BTCB Retrieve ticker quote and token information from exchange and coingecko

Features Available

  • 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 DXSP library (automatic token approval, uniswap v2 and 1inch api protocol, % of stablecoin balance when placing order, coingecko API, contract search)

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 using semantic release numbering
  • Support all messaging bot as asynchrousnous process
  • Support common notification via Apprise for all nessaging platform
  • Support deployment on PaaS or selfhosting
  • Support standard config via dynaconf (tested with northflank, koyeb, GKE, render and fly.io)
  • Support bot restart capability
  • Support multiple messaging platform (Telegram, Matrix and Discord)
  • Include healthcheck capability via FastAPI webserver on port 8080

WIKI

Wiki

Questions? Want to help?

discord telegram

📷 Screenshots

Screenshot 2023-02-28 at 20 39 47

Screenshot 2023-03-05 at 10 51 04

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