This guide will show you how to generate TradingView alerts that trigger buy or sell orders using our webhook server. The webhook server listens for these alerts and places the order based on the signals sent by TradingView. Follow these steps to set up the alert with a predefined message/template.
2. You can also select a symbol based on the exchange name. For instance, you may choose Binance:XRP/USDT if you want to track XRP/USDT on Binance.
strategy
and you can choose from a list of built-in strategies or create your own.Once the strategy is applied to your chart, follow these steps:
Click on the 'Alert' Icon:
Configure Alert Conditions:
Set Alert Message/Template:
message
section, enter the predefined template in the Message fieldExample Template:
{
"apiKey": "key123",
"secret": "secret456",
"accountId": "abc789",
"quantity": "50 USDT",
"ticker": "{{ticker}}",
"exchange": "{{exchange}}",
"bar": {
"price": "{{close}}"
},
"strategy": {
"signal": "{{strategy.order.action}}"
},
"syminfo": {
"currency": "{{syminfo.currency}}",
"basecurrency": "{{syminfo.basecurrency}}"
}
}
apiKey: This is the unique identifier assigned to you.
secret: Your personal signal password for authentication.
accountId: Enter your exchange account ID.
quantity: This represents the amount of the asset you wish to trade. You can specify the quantity in one of the following ways:
unit: "10"
means 10 BTC or 10 ETH). You can also use decimal values (e.g., unit: "0.01"
means 0.01 BTC or 0.01 ETH).unit: "10%"
means 10% of your available funds will be used). You can also use decimal values (e.g., unit: "0.5%"
means 0.5% of your available funds).unit: "10 USDT"
means you want to trade 10 USDT worth of the asset). You can also use decimal values (e.g., unit: "0.5 USDT"
means you want to trade 0.5 USDT worth of the asset).{{ticker}}: The asset pair you are trading (e.g., XRP/USDT
).
{{exchange}}: The exchange you are trading on (e.g., binance
).
{{close}}: The closing price at the time the alert is triggered.
{{syminfo.currency}}: The quote currency (e.g., USDT
).
{{syminfo.basecurrency}}: The base currency (e.g., XRP
).
{{strategy.order.action}}: This will automatically populate with the action triggered by the strategy, either "buy" or "sell".
Notifications
section, you’ll see a field to enter the Webhook URL.https://api.tradegrub.com/webhook
6. Click on the Create
button.
Once the alert is created, you can follow these steps to monitor its status:
Viewing Your Alerts:
Alerts
icon. Click on it to open the Alert Manager.Triggered Alerts:
This allows you to easily monitor and track the alerts triggered by your strategy, and view the associated data that was passed along with the alert to the webhook server.