Tích hợp TradingView
Alert webhook từ TradingView vào Miracle Network: format payload, bảo mật và debug.
Tích hợp TradingView
TradingView cho phép Alert gửi HTTP request khi điều kiện chiến lược thỏa. Miracle Network nhận request qua Webhook trigger và đưa vào workflow.
Tạo alert
- Trên chart, tạo Alert với điều kiện strategy hoặc giá.
- Bật Webhook URL — dán URL từ node Webhook trong workflow (sau khi Save).
- Message JSON: khuyến nghị dùng placeholder
{{strategy.order.action}},{{ticker}},{{close}}theo tài liệu TradingView.
Payload mẫu (minh họa)
{
"symbol": "HPG",
"side": "buy",
"qty": 100,
"strategy": "ema-cross-v1"
}
Workflow nên validate symbol và side trước khi gọi broker.
Bảo mật
- Dùng secret trong header hoặc query token — rotate định kỳ.
- Không public URL webhook trên forum; regenerate nếu lộ.
- Rate limit: từ chối burst bất thường.
Debug
- Tab Executions của workflow — xem body alert thực tế.
- So sánh timezone alert vs phiên HOSE/HNX.
Tiếp theo: HSC · Setup tổng thể