tvbit-bot is TradingView webhook handler for Bybit.
tvbit = T(rading)V(iew) (By)bit
Twitter @rarirureluis
- 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
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 + 40
andSL: mark price - 20
.
see tv.go or Bybit API Documentation
Path | Method | Description |
---|---|---|
/tv | POST | Create order |
You have to set environment variables
ghcr.io/rluisr/tvbit-bot:latest
tvbit-bot saves the order history to MySQL.
tvbit-bot does not support to close/cancel positions, recommend to use TP/SL.
Welcome your PR.
Twitter @rarirureluis