{"@context": "https://schema.org", "@type": "Article", "headline": "TradingView webhook + Smart Money API confirmation | Smart Money API", "description": "Relay TradingView alert webhooks through a small Flask service that confirms each signal against Smart Money API before acting on it.", "url": "https://smartmoneyapi.com/resources/integrations/tradingview-webhook", "author": {"@type": "Organization", "name": "Smart Money API"}, "publisher": {"@type": "Organization", "name": "Smart Money API", "logo": {"@type": "ImageObject", "url": "https://smartmoneyapi.com/icon-32.png"}}, "mainEntityOfPage": {"@type": "WebPage", "@id": "https://smartmoneyapi.com/resources/integrations/tradingview-webhook"}}>

Integration Guide

Confirm TradingView alerts with Smart Money API

TradingView can't add custom HTTP headers to its webhooks, so route alerts through a tiny relay that calls Smart Money API with your X-API-Key and only forwards HIGH-confirmed signals.

Who this is for

Traders who fire entries from TradingView alerts and want an independent smart-money confirmation step between the alert and their execution or notification layer.

Get your API key

Every request authenticates with the X-API-Key header. To get a key:

  1. 1Create a free account, then open your dashboard.
  2. 2Copy the API key shown under API Access. The free tier covers BTC at 20 requests/day — enough to test this guide end to end.
  3. 3Need more symbols or higher limits? Compare tiers on the pricing page.

Keep the key secret — store it in an environment variable, never commit it to source control.

Setup

  1. 1Deploy the relay below somewhere reachable over HTTPS (your own host/reverse proxy). Set SMA_API_KEY in its environment.
  2. 2In TradingView, create an alert and set the webhook URL to https://your-host/tv-hook.
  3. 3Set the alert message to JSON, e.g. {"symbol":"BTC","direction":"long"}.
  4. 4The relay calls /v1/confirm and only forwards the alert to your order/notification logic when the confirmation is HIGH.

Working example

The relay receives the TradingView alert, then calls GET /v1/confirm?symbol=BTC&direction=long with the key in the X-API-Key header (TradingView itself never sees the key).

webhook_relay.py
# webhook_relay.py -- tiny Flask relay between TradingView and Smart Money API
# Run it on a public URL (e.g. behind your own reverse proxy) and point a
# TradingView alert webhook at  https://your-host/tv-hook
import os
import requests
from flask import Flask, request, jsonify

SMA_API_KEY = os.environ["SMA_API_KEY"]
SMA_BASE = "https://api.smartmoneyapi.com"
app = Flask(__name__)

@app.post("/tv-hook")
def tv_hook():
    # TradingView alert message (JSON), e.g. {"symbol":"BTC","direction":"long"}
    alert = request.get_json(force=True, silent=True) or {}
    symbol = alert.get("symbol", "BTC")
    direction = alert.get("direction", "long")

    r = requests.get(
        f"{SMA_BASE}/v1/confirm",
        params={"symbol": symbol, "direction": direction},
        headers={"X-API-Key": SMA_API_KEY},
        timeout=8,
    )
    r.raise_for_status()
    result = r.json()

    # Only forward HIGH-confirmed alerts to your execution / notification layer
    if result.get("confirmation") == "HIGH":
        # TODO: place order, send Telegram, etc.
        return jsonify(ok=True, forwarded=True, score=result.get("score"))
    return jsonify(ok=True, forwarded=False, reason=result.get("confirmation"))

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8080)

Expected response

A successful call to /v1/confirm returns JSON like this (fields abbreviated):

200 OK · application/json
{
  "symbol": "BTC",
  "direction": "long",
  "confirmation": "HIGH",
  "score": 0.78,
  "smart_money": {
    "net_flow_usd": 4250000,
    "long_short_ratio": 1.62,
    "whales_long": 38,
    "whales_short": 14
  },
  "derivatives": {
    "funding_rate": 0.00011,
    "oi_change_24h": 0.067
  },
  "as_of": "2026-06-30T12:00:00Z"
}

confirmation is one of HIGH / MEDIUM / LOW / NONE and score is a 0–1 conviction blend of smart-money flow and derivatives positioning for the requested side. See the full field reference in the API docs.

Ready to build?

Grab a free key and make your first confirmation call in under a minute.

Not financial advice. Crypto trading involves risk.