TradingView Integration
Connect TradingView alerts to UTM for automated trade execution.
Overview
UTM can receive alerts from TradingView and automatically execute trades based on your strategy signals.
Setup
1. Create an API Key
- Navigate to Settings > API Keys in UTM
- Click Create API Key
- Select the
signals:writescope - Copy the generated key
2. Configure TradingView Alert
In TradingView, create an alert with:
Webhook URL:
https://api.universaltrademanager.com/api/signals/ingest
Message (JSON):
{
"symbol": "{{ticker}}",
"action": "openLong",
"accountId": "your-account-id",
"quantity": 100,
"processAt": "now"
}
3. Add Headers
TradingView Pro+ supports custom headers. Add:
X-API-Key: your-api-key
Content-Type: application/json
Alert Message Variables
Use TradingView placeholders in your alert message:
| Placeholder | Description |
|---|---|
{{ticker}} | Symbol (e.g., AAPL) |
{{close}} | Current price |
{{time}} | Alert timestamp |
{{interval}} | Chart timeframe |
Example Strategies
Simple Long Entry
{
"symbol": "{{ticker}}",
"action": "openLong",
"accountId": "your-account-id",
"quantity": 100,
"processAt": "now"
}
Entry with MOC Exit
{
"symbol": "{{ticker}}",
"action": "openLong",
"accountId": "your-account-id",
"quantity": 100,
"processAt": "now",
"exitRule": {
"trigger": "market_close",
"immediate": true
}
}
Limit Order
{
"symbol": "{{ticker}}",
"action": "openLong",
"accountId": "your-account-id",
"quantity": 50,
"orderType": "limit",
"limitPrice": {{close}},
"processAt": "now"
}
Troubleshooting
Alert Not Triggering
- Verify the webhook URL is correct
- Check that your API key has
signals:writescope - Ensure the JSON is valid (use a JSON validator)
Order Not Executing
- Check the signal status in UTM Dashboard
- Verify the account has sufficient buying power
- Confirm market hours for the symbol