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.
-
Create your channel/room and your platform bot
- Telegram via Telegram @BotFather if you use Telethon create an api key
- Discord via Discord Dev portal
- Matrix via Matrix.org
-
Get your
- CEX API Keys supported by CCXT or
- DEX keys and RPC supported by Web3. You can use chainlist, awesome rpc list or cointool for chain/RPC details
-
Update the config (bot token, bot channel and exchange details). Point or copy your config settings.toml to the volume /code/)
-
Deploy via:
- docker
docker push mraniki/tt:latest
ordocker pull ghcr.io/mraniki/tt:latest
- locally
git clone https://github.com/mraniki/tt:main
&&pip install -r requirements.txt
- docker
-
Start your container or if deployed locally use
python3 bot.py
to start -
More details in Wiki
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
sell BTCUSDT sl=6000 tp=4500 q=1%
orsell 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
- 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)
- 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
- Refactoring of more complex functions
- 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
- 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)
- 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
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