Skip to content
Robot de trading
Interfaces
Format d'une alerte

Format des alertes TradingView

La traduction française de cette page est en cours.

Créer des ordres

Contenu minimal d’une alerte

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

alert-message

For a buy signal.

EXCHANGE={{exchange}}
SYMBOL={{ticker}}
SIGNAL=SELL

For a sell signal.

Parametres d’alertes additionels

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 be MARKET, LIMIT or STOP
  • VOLUME is the volume of the order in base asset (BTC for BTC/USDT), it supports the orders amount syntax.
  • 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 LIMIT ORDER_TYPE, the stop loss will be created instantly. Required when ORDER_TYPE=STOP.
  • 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 LIMIT ORDER_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
  • TAG is an identifier to associate to the order(s) to create. Any value can be used as tag. Tags can later be used to cancel specific orders.

Exemples

Un ordre d’achat limité de 0.01 BTC à 30000 USDT avec un take profit

EXCHANGE=binance
SYMBOL=BTCUSDT
VOLUME=0.01
PRICE=30000
TAKE_PROFIT_PRICE=35000
SIGNAL=BUY
ORDER_TYPE=LIMIT

Un ordre de vente limité de 0.01 ETH à 0.1 BTC

EXCHANGE=binance
SYMBOL=ETHBTC
VOLUME=0.01
PRICE=0.1
SIGNAL=SELL
ORDER_TYPE=LIMIT

Un ordre de vente en stop loss de 10 ATOM à 5 USDT avec un tag “exit1”

EXCHANGE=binance
SYMBOL=ATOMUSDT
VOLUME=10
STOP_PRICE=5
SIGNAL=SELL
ORDER_TYPE=STOP
TAG=exit1

Annuler des ordres

Use SIGNAL=CANCEL to cancel orders identified buy their SYMBOL and EXCHANGE

Annuler tous les ordres d’ETH/BTC sur Binance

EXCHANGE=binance
SYMBOL=ETHBTC
SIGNAL=CANCEL

Annuler tous les ordres vente d’ATOM/USDT avec le tag “exit1” sur Binance

EXCHANGE=binance
SYMBOL=ATOMUSDT
SIGNAL=CANCEL
PARAM_SIDE=SELL
TAG=exit1

Additional cancel parameters are available:

  • PARAM_SIDE is the side of the orders to cancel, it can be buy or sell to only cancel buy or sell orders.
  • TAG is the tag to select orders to cancel with. When provided, only orders created with the given tag and symbols will be canceled.

Sécurité des alertes

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