tvbit-bot
                                
                                 tvbit-bot copied to clipboard
                                
                                    tvbit-bot copied to clipboard
                            
                            
                            
                        tvbit-bot is TradingView webhook handler for Bybit.
tvbit-bot
tvbit-bot is TradingView webhook handler for Bybit.
tvbit = T(rading)V(iew) (By)bit
Twitter @rarirureluis
Introduction
- Set an alert with webhook and a message as JSON like below:
{
  "name": "alert name, description or something",
  "symbol": "BTCUSDT",
  "type": "Market",
  "price": "0",
  // If type is "Limit" set it as an int greater than 0
  "side": "Buy",
  "qty": "0.014",
  "tp": "0",
  // see below
  "sl": "{{high}}"
  // see below
}
more details, see curl.txt
TP and SL
You have to set tp and sl as a string.
- {{high}}is an embedded value of TradingView, Also you can set any other TradingView's embedded values.
- Other methods, you can set as a percent like "tp": "10%"calculate from mark price.
- "tp": "+40", "sl": "-20"means,- TP: mark price + 40and- SL: mark price - 20.
see tv.go or Bybit API Documentation
Path
| Path | Method | Description | 
|---|---|---|
| /tv | POST | Create order | 
Setup
You have to set environment variables
- bybit
- mysql
Container
ghcr.io/rluisr/tvbit-bot:latest
MySQL
tvbit-bot saves the order history to MySQL.
Limitation
tvbit-bot does not support to close/cancel positions, recommend to use TP/SL.
Welcome your PR.
Twitter @rarirureluis