API Reference
Technical documentation for TradeAlert.Pro webhook API. Learn about endpoint specifications, request/response formats, rate limits, and error handling.
Webhook Endpoint
Your unique webhook URL is displayed in your dashboard after account creation. It follows this format:
POST https://api.tradealert.pro/webhook/{user_id}/{api_key}Security Note
Keep your webhook URL private. The user_id and api_key are unique to your account. Anyone with this URL can trigger phone calls to your number.
Request Format
HTTP Method
TradingView sends webhooks via POST requests with application/json content type.
Request Headers
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON payload |
| User-Agent | TradingView-Webhook | Identifies TradingView |
Simple Text Payload
The simplest format is plain text. This is what gets read in the phone call:
Bitcoin crossed above $50,000 - long signal triggered
In your TradingView alert message field, enter the text you want to hear.
JSON Payload
For structured data, send JSON with a message field:
{
"message": "Bitcoin crossed above $50,000",
"ticker": "BTCUSD",
"price": 50000,
"action": "BUY",
"strategy": "Breakout",
"timestamp": "2024-10-28T14:30:00Z"
}TradeAlert.Pro extracts the message field for the phone call. Additional fields are stored in your call history for reference.
TradingView Placeholders
TradingView supports dynamic placeholders that are replaced with real-time values:
| Placeholder | Description | Example |
|---|---|---|
| {{ticker}} | Symbol | BTC/USD |
| {{close}} | Close price | 49832.50 |
| {{open}} | Open price | 49500.00 |
| {{high}} | High price | 50100.00 |
| {{low}} | Low price | 49200.00 |
| {{volume}} | Volume | 125432 |
| {{time}} | Bar timestamp | 2024-10-28 14:30 |
| {{interval}} | Timeframe | 15 |
Example with Placeholders:
{{ticker}} broke resistance at {{close}} with volume {{volume}}
Becomes:
"BTC/USD broke resistance at 50000 with volume 125432"
Response Format
Success Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"success": true,
"message": "Alert received and call initiated",
"call_id": "call_abc123xyz789",
"timestamp": "2024-10-28T14:30:15Z"
}Error Responses
| Status Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid payload format |
| 401 | Unauthorized | Invalid webhook URL/credentials |
| 403 | Forbidden | Account suspended or limit exceeded |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
Example Error Response:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"success": false,
"error": "Monthly call limit exceeded",
"limit": 3,
"used": 3,
"resets_at": "2024-11-01T00:00:00Z"
}Rate Limits
TradingView Webhook Limits
TradingView imposes the following rate limits on webhook calls:
- 60 webhooks per minute per TradingView account
- 500 webhooks per hour per TradingView account
If you exceed these limits, TradingView will queue or drop excess webhooks. Design your alerts to stay well below these thresholds.
TradeAlert.Pro Limits
| Plan | Monthly Limit | Burst Limit |
|---|---|---|
| Free | 3 calls/month | 1 call/minute |
| Premium | Unlimited | 10 calls/minute |
Rate Limit Tips
- • Use "Once Per Bar Close" frequency in TradingView to reduce alert volume
- • Avoid "Every Time" frequency unless absolutely necessary
- • Monitor your usage in the dashboard
- • Set up only high-quality alerts to avoid noise
Message Length Limits
- Maximum message length: 500 characters
- Recommended length: 50-100 characters for clarity
- Messages longer than 500 characters will be truncated
- Keep messages concise for best phone call experience
Phone Call Behavior
Call Flow
- Webhook received and validated (< 100ms)
- Phone call initiated (< 500ms)
- Phone rings (1-5 seconds depending on carrier)
- Message played when answered (text-to-speech)
- Call ends after message completes
- If unanswered and SMS backup enabled, SMS sent (5-10 seconds)
Call Retry Logic
- We attempt the call once
- If phone is busy/unreachable, SMS backup is sent (if enabled)
- No automatic retries to avoid duplicate alerts
- Call status is logged in your dashboard
Webhook Testing
Using cURL
Test your webhook endpoint with cURL:
curl -X POST https://api.tradealert.pro/webhook/{user_id}/{api_key} \
-H "Content-Type: application/json" \
-d '{"message": "Test alert from cURL"}'Using Dashboard
The easiest way to test is through your dashboard:
- Log in to your dashboard
- Click "Send Test Call"
- Your phone will ring within 1-2 seconds
- Verify the call appears in your call history
Best Practices
Message Design
- Start with ticker/symbol: "BTC/USD..."
- Include action: "long entry", "stop loss hit", "target reached"
- Add price context: "at $50,000"
- Keep under 20 words for clarity
- Avoid special characters that don't speak well
Alert Frequency
- Use "Once Per Bar Close" for strategy signals
- Use "Only Once" for one-time levels
- Avoid "Every Time" to prevent spam
- Test on demo first before going live
Error Handling
- Check your dashboard for webhook delivery status
- Enable SMS backup as a failsafe
- Monitor your monthly usage to avoid hitting limits
- Set up critical alerts with multiple notification methods
Security
Webhook URL Protection
- Never share your webhook URL publicly
- Don't commit webhook URLs to public repositories
- Regenerate your URL if compromised
- Each URL is unique and tied to your account
HTTPS Only
All webhook requests must use HTTPS. Unencrypted HTTP requests are rejected.
Support & Troubleshooting
Having issues with the API? Check our Troubleshooting Guide or review Frequently Asked Questions.
Ready to Get Started?
Sign up for a free account and get 3 calls per month - no credit card required.
Create Free Account