TradingView alerts format
Creating orders
Minimal alert content
The alert format is designed to be easily used from TradingView. Minimal alerts contain the exchange name, the alert symbol (BTCUSDT for BTC/USDT and BTC/USDT:USDT) and the side of the order to create. Example:
EXCHANGE={{exchange}}
SYMBOL={{ticker}}
SIGNAL=BUY
For a buy signal.
EXCHANGE={{exchange}}
SYMBOL={{ticker}}
SIGNAL=SELL
For a sell signal.
Additional alert parameters
Additional order details can be added to the alert. These are optional:
ORDER_TYPE=LIMIT
VOLUME=0.01
PRICE=42000
STOP_PRICE=38000
TAKE_PROFIT_PRICE=55000
REDUCE_ONLY=true
ORDER_TYPE
is the type of order, it can beMARKET
orLIMIT
VOLUME
is the volume of the order in base asset (BTC for BTC/USDT) it can be- A flat amount, ex:
0.1
to trade 0.1 BTC on BTC/USD. %
: A percent of the total portfolio value, ex:2%
to trade 2% of the total portfolio value.a%
: A percent of the available holdings, ex:12a%
to trade 2% of the available portfolio value.s%
: A percent of available holdings associated to the alert symbol assets, ex:12s%
to trade 12% of available BTC+USDT holdings upon a BTC/USDT alert. Unliket%
,s%
ignores other traded pairs assets holdings.t%
: A percent of available holdings associated to all configured trading pairs assets, ex:12t%
to trade 12% of available BTC+ETH+SOL+USDT holdings upon BTC/USDT alert while also trading ETH and SOL in other trading pairs. Unlike%
ora%
,t%
ignores assets in your holdings that are not associated to any currently traded pairs.
- A flat amount, ex:
PRICE
is the price of the limit order in quote asset (USDT for BTC/USDT)STOP_PRICE
is the price of the stop order to create. When increasing the position or buying in spot trading, the stop loss will automatically be created once the initial order is filled. When decreasing the position (or selling in spot) using a LIMITORDER_TYPE
, the stop loss will be created instantly.TAKE_PROFIT_PRICE
is the price of the take profit order to create. When increasing the position or buying in spot trading, the take profit will automatically be created once the initial order is filled. When decreasing the position (or selling in spot) using a LIMITORDER_TYPE
, the take profit will be created instantly.REDUCE_ONLY
when true, only reduce the current position (avoid accidental short position opening when reducing a long position). Only used in futures trading. Default is false
Examples
A limit buy order of 0.01 BTC at 30000 USDT with a take profit
EXCHANGE=binance
SYMBOL=BTCUSDT
VOLUME=0.01
PRICE=30000
TAKE_PROFIT_PRICE=35000
SIGNAL=BUY
ORDER_TYPE=LIMIT
A limit sell order of 0.01 ETH at 0.1 BTC
EXCHANGE=binance
SYMBOL=ETHBTC
VOLUME=0.01
PRICE=0.1
SIGNAL=SELL
ORDER_TYPE=LIMIT
Canceling orders
Use ORDER_TYPE=CANCEL
to cancel orders identified buy their SYMBOL
and EXCHANGE
EXCHANGE=binance
SYMBOL=ETHBTC
ORDER_TYPE=CANCEL
Additional cancel parameters are available:
PARAM_SIDE
is the side of the orders to cancel, it can bebuy
orsell
to only cancel buy or sell orders.
Alerts security
You can use a token to add a security layer on your webhook using an identification token, this token is randomly generated by your OctoBot and can be found on the configuration interface and in execution logs.
To add your token on the tradingview.com signal: add the following line to the alert message:
TOKEN=YOUR_TOKEN