API
Webhooks

TradingView Webhooks

Overview

The very robust and popular charting tool, TradingView, includes Whispertrades integration in the form of webhooks. Webhooks offer the ability to enable bots, open and close positions, or set bot variables based on your own chart alerts and price levels within TradingView.

You can, for instance, enable a bot when the underlying stock/index moves above the 200 daily moving average. You could also close a bot position at a certain price level or send the price level to a Whispertrades variable and incorporate the current price into your bot configuration.

Go here to learn more about TradingView webhooks.

Requirements

Whispertrades API Terms Agreement

Before you can utilize webhooks, you must read and agree to the API terms and acknowledge that you have done so within your account. To do this, please refer to the "API" section in your account settings.

Document image


After you agree to the API terms, you will be taken to a page where you can manage webhooks for TradingView to connect to.

TradingView Subscription

Webhooks are only available for paid TradingView plans. These start at $14.95/month or $12.95/month if paid yearly (pricing as of December 2023).

TradingView Two-Factor Authentication

Two-factor authentication must be enabled on your TradingView account to utilize webhooks. This is a necessary security precaution, because unauthorized access to your webhooks means unauthorized access to your brokerage account.

How it Works

TradingView webhooks are alerts that you place on your own TradingView chart. These alerts are typically placed on a certain price level or technical indicator like moving average or bollinger band.

When your alert triggers, TradingView will notify Whispertrades using webhook data that you configure. Whispertrades will make sure that the webhook is valid, and if so, process your requested action (ie: enable bot, open/close a position, set a variable).

The setup process is easy:

  1. Visit your Whispertrades API page and create a new webhook
  2. Set up your chart alert on TradingView (right click on the chart and "Add alert")
  3. Copy the Whispertrades webhook URL and body (from your Whispertrades API page) into the TradingView alert

Once all 3 steps are complete, TradingView will monitor your alert, and when the alert is triggered, it'll immediately notify Whispertrades. Whispertrades will then execute your configured action!

For more detail on how to set up webhooks, view our next article: How to Set Up a Webhook

Webhooks only work from TradingView

Webhooks are not an API open to any application or caller. Whispertrades will only accept and process webhook requests that come from TradingView. You cannot send webhooks from your own application.

To integrate Whispertrades into your own application outside of TradingView, please reference our REST API

Consider using Paper Trading while testing TradingView webhook integration